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

Feature Request: Support nested arrays #44

Open
jvacek opened this issue Dec 4, 2021 · 2 comments
Open

Feature Request: Support nested arrays #44

jvacek opened this issue Dec 4, 2021 · 2 comments

Comments

@jvacek
Copy link

jvacek commented Dec 4, 2021

I work a lot with related fields which are 1-M, and currently anything that is an array of objects just gets the whole child json dumped into one field.

It would be nice to have some further "flatification" in one way or another

I can imagine two sensible ways to do this nonsense I'm describing:

  • 1NF table: "left-join"ing all the columns into one massive table)
  • 2NF multiple sheets: a sheet per every key which holds an array, and dropping just the "row" references back into the "parent"
@jvacek jvacek changed the title Feature Request: Support Related Fields Feature Request: Support nested arrays Dec 4, 2021
@willtho89
Copy link
Collaborator

@jvacek 1NF tables seems to be the most easiest way to implement it, but the file gets big easily on highly nested serializers. The 2NF approach seems more reasonable but I have never worked on linked sheets.

I'll leave this open in case someone wants to give it a shot.

@rptmat57
Copy link
Collaborator

rptmat57 commented Jan 3, 2022

This would be a really nice feature to have.
I use drf-flex-fields to expand related fields on demand, and it just breaks when trying to export in XLSX after expanding any field. this would probably fix the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants