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

feat(catalogue): ability to specify 'within-cell' separator in array cells in CSV export #4617

Open
YpeZ opened this issue Jan 20, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@YpeZ
Copy link
Contributor

YpeZ commented Jan 20, 2025

Issue

Currently the CSV API joins the items of an array type in a cell with a comma, encapsulating terms that contain a comma with double quotation marks.
This makes it difficult for the user to unpack the values within these cells, especially when the field is an ontology array type containing a large number of values.
Consider the following 'psuedo-CSV' example where the terms within the cells are joined by a comma.

name work days
A Mon,Tue,Wed,Thu
B Mon,Wed,Thu or Fri
C Mon,Tue,"Wed, Thu or Fri"
D "Tue, Wed or Fri",Mon,Thu

Note that the entries for persons C and D contain a term with a comma. This makes it difficult for programs parsing this input to distinguish between the comma that separates the values and the comma.

Solution

If the user were to be able to select a separator or specify a separator the situation above could be prevented.
Consider for example a small sequence of characters of which it can be assumed that it does not occur in the data itself and is 'safe' to use for other programs.

For example the separator ~~~ would enable a user parsing the export to separate the values again in their respective programming language

name work days
A Mon~~~Tue,Wed,Thu
B Mon~~~Wed~~~Thu or Fri
C Mon~~~Tue~~~"Wed, Thu or Fri"
D "Tue, Wed or Fri"~~~Mon~~~Thu

Alternatives

No response

Additional context

Currently with Pyclient is not able to distinguish between the commas. The issue #4502 is related to this

@YpeZ YpeZ added the enhancement New feature or request label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant