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

CSVPrinter quotes empty string if it is the first on a line #20

Open
Miguel-g-c opened this issue Nov 22, 2021 · 0 comments
Open

CSVPrinter quotes empty string if it is the first on a line #20

Miguel-g-c opened this issue Nov 22, 2021 · 0 comments

Comments

@Miguel-g-c
Copy link
Contributor

Expected Behavior

SimaPro CSV format does not quote empty string when exporting a dataset, as in the following ProcessBlock:

Process

PlatformId


Category type
waste scenario

Process identifier
Dev99229000009369600014

Status


Infrastructure
No

Date
11/18/2021


End

In this block, properties such as platformId or Status has an empty line. So in order to be consequent with that, during the writing process of null or "" values, an empty line should be placed in the output file.

Actual Behavior

However, the current API produces files as the following:

Process

PlatformId
""

Category type
waste scenario

Process identifier
Dev99229000009369600014

Status
""

Infrastructure
No

Date
11/18/2021


End

In this output file, empty strings are quoted which is not consistent with SimaPro behavior.

CSVPrinter issue

olca-simapro-csv uses Apache commons csv library and this behavior is produced by a known issue of the library:
https://issues.apache.org/jira/browse/CSV-63

Importing olca-simapro-csv produced files to SimaPro

Despite of this, output files from the API can be imported to SimaPro without any issue or wrong data imported, as far as we have tested. So this seems to be harmless for olca-simapro-csv users.

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

1 participant