Skip to content

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

@MBuchalik

Description

@MBuchalik

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions