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

Line Separators for CSV files don't have an effect #299

Open
MBuchalik opened this issue Jan 5, 2021 · 0 comments
Open

Line Separators for CSV files don't have an effect #299

MBuchalik opened this issue Jan 5, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@MBuchalik
Copy link
Collaborator

It seems like the setting "lineSeparator" for CSV files has no effect.

I loaded two CSV files using the Adapter (the "preview" endpoint). One file has LF line endings and the other one uses CRLF. For both files, no matter if I set "lineSeparator" to LF or CRLF, I get the exact same response from the server.

The file looks like this:

column1,column2,column3
first,second,third
fourth,fifth,sixth

Expected result

I would expect some kind of error message from the server if the selected line ending does not match the one the server got from the data source.

Actual result

I always get the exact same response from the server, looking like this:

{"id":123,"data":"[[\"column1\",\"column2\",\"column3\"],[\"first\",\"second\",\"third\"],[\"fourth\",\"fifth\",\"sixth\"]]"}

Here are two sample CSV files for you to try it out:
csv-files.zip

Possible solutions

From my point of view, it would be really nice if we could simply drop the "lineSeparator" setting. This would reduce the amount of work the user has to do when configuring a data source.
Also, it would allow loading files with mixed line endings. (Not sure if this is really a thing, but imagine a user opened a LF file with a bad editor in Windows and edited 2 lines. Then the line endings could become "mixed".)

The alternative solution would be to return an error if the line ending of the selected file does not match the config.

@MBuchalik MBuchalik added the bug Something isn't working label Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant