Skip to content

[Roadmap] Improve Data Export Functionality #6389

Closed

Description

@SchrodingersGat

The data export functionality (i.e. exporting datasets to a file such as .csv or .xlsx) is currently very inefficient, to the point where it causes session timeout when exporting more than a few hundred records.

django-import-export

We use django-import-export to export records - however this has not been optimized and makes a LOT of database hits. In particular, it does not do any of the clever query annotations which we have implemented for the API. So, we have the ability to extract lots of records quickly (via queryset annotation) but django-import-export does not make use of this.

We can refactor the export process to use our optimized API serializers, and use this data for file export.

This has the huge advantage that the exported file data would then exactly match the data exported via the API - currently there is a discrepancy between the two export formats

Background Worker

We can also potentially offload the export process to the background worker thread. This would allow for longer running processes that do not get prematurely killed by short connection timeouts from the frontend worker...

related issues

Activity

  1. added
    enhancement
    import / export
    Seeking Funding
    on Feb 2, 2024
  2. added this to the horizon milestone on Feb 2, 2024
  3. matmair commented on Feb 5, 2024

    @matmair
    Member

    @SchrodingersGat is this in relation to #5125?

  4. SchrodingersGat commented on Feb 5, 2024

    @SchrodingersGat
    MemberAuthor

    @matmair yes, thanks, I have updated the related issues list now.

  5. removed
    Seeking Funding
    on Mar 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementimport / export

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions