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 exporter #14

Closed
juergen-albert opened this issue Aug 15, 2023 · 4 comments
Closed

csv exporter #14

juergen-albert opened this issue Aug 15, 2023 · 4 comments

Comments

@juergen-albert
Copy link
Contributor

Similar to the ODT Exporter, we need a csv Exporter registered with the content type "application/csv" (an others if more mimetypes for csv exist).

It should support 2 Modes (similar to ODT):

Flat Mode

All Contained Objects land in one flat csv file. An exported person could e.g. look as follows:

id, name, address.id, address.street, contact.1.id, contact.1.name, contact.2.id, contact.2.name

Zip Mode

The result will be a zip, containing a csv for each exported EClass, similar to the different Sheets in the ODT Export, plus a csv file with the metadata of the EClass.

We could use the URI to determine the mode (e.g if the URI ends in .zip) or an Option. I'm open for suggestions.

The delimiter should be , by default and should be additionally configurable via an Option.

@juergen-albert
Copy link
Contributor Author

I do remember that Jackson, we already use with EMFJson also supports csv and may be worth looking into that first. I do remember that it needed an individually configured ObjectMapper, so it knows how to handle the headers.

Thus I believe it would make sense to look at this first and see how this can be utilized.

@ideas-into-software
Copy link
Contributor

@juergen-albert

For now, two questions:

  1. In flat mode, since all data lands in one file, there would be no meta-data - i.e. such export would contain data only; is that correct ?

  2. In the R EMF tool to be created ("R" Importer / Exporter for EMF - requirements and initial solution #15), you asked for both exporter AND importer - for this CSV format, is exporter sufficient, or is importer needed as well ?

@juergen-albert
Copy link
Contributor Author

In flat mode, since all data lands in one file, there would be no meta-data - i.e. such export would contain data only; is that correct ?

correct

In the R EMF tool to be created (#15), you asked for both exporter AND importer - for this CSV format, is exporter sufficient, or is importer needed as well ?

Export only for now, as a csv is usually a result of an Excel export and I can hardly imagine that they will conform to our models.

@ideas-into-software
Copy link
Contributor

Both ZIP mode and flat mode exporters delivered in #23

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

No branches or pull requests

2 participants