Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSV export optimisation #2755

Merged
merged 53 commits into from
Jan 15, 2025
Merged

CSV export optimisation #2755

merged 53 commits into from
Jan 15, 2025

Conversation

kelvin-muchiri
Copy link
Contributor

@kelvin-muchiri kelvin-muchiri commented Jan 7, 2025

Changes / Features implemented

Optimise CSV export process. Avoid traversing data to build CSV columns for repeat responses. Instead use a register that has a record of how many columns we should have for each repeat question.

If the register for a form is unavailable, fall back to building the columns from data and trigger an asynchronous task to create the register

Fixed flaky test onadata.apps.api.tests.viewsets.test_organization_profile_viewset.TestOrganizationProfileViewSet.test_add_members_to_owner_role

Steps taken to verify this change does what is intended

  • QA

Side effects of implementing this change

Faster CSV exports and loading of linked datasets

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

Closes #2695

@kelvin-muchiri kelvin-muchiri force-pushed the 2695-csv-optimisation branch 2 times, most recently from fefffc4 to d993ac9 Compare January 8, 2025 12:21
@kelvin-muchiri kelvin-muchiri marked this pull request as ready for review January 13, 2025 08:21
@kelvin-muchiri kelvin-muchiri requested review from FrankApiyo and ukanga and removed request for FrankApiyo January 13, 2025 08:21
FrankApiyo
FrankApiyo previously approved these changes Jan 14, 2025
Copy link
Member

@FrankApiyo FrankApiyo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@kelvin-muchiri kelvin-muchiri merged commit f9caeb5 into main Jan 15, 2025
10 checks passed
@kelvin-muchiri kelvin-muchiri deleted the 2695-csv-optimisation branch January 15, 2025 06:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Optimize CSV export by improving how CSV headers are created.
3 participants