Replies: 2 comments
-
You can provide your own ExportFormatter in this bean: You can clone the CSVExportFormatter, make any fixes, and use the clone instead. Let me know if that solves this issue. Also, if you have a patch to the CSVExportFormatter to address this issue, please submit. We'll review and merge it. Thanks. |
Beta Was this translation helpful? Give feedback.
-
I have created a repro test case at https://github.com/justin-tay/elide/tree/csvexport. Given the current design and implementation I'm not sure what is an appropriate approach. The output from the test is
The header is actually being generated just from the attributes in the projection, but Json2Flat actually needs to process the data to determine the headers. The actual headers generated by Json2Flat for the 3 records are.
The current design of the |
Beta Was this translation helpful? Give feedback.
-
For the Export CSV and JSON feature, some of our entities have attributes similar to your AddressFragment (https://github.com/yahoo/elide/tree/master/elide-datastore/elide-datastore-jpa/src/test/java/example) using both a Type and an AttributeConverter.
I've noticed the csv produced skips the json attribute completely which throws off the column values. The set of strings seems to be listed last in the csv even though the header column is in a different spot. For the json produced the set of strings is handled properly and the json attirbute is omitted from the final json. Is there any way to provide a custom formatter for these fields to be exported properly?
Beta Was this translation helpful? Give feedback.
All reactions