CSV Reader Strange Header

I have CSV file with header. The first field in a file "User Domain". After loading in KNIME it has strange prefix ï»¿User Domain.

Hi izaychik63,

Could you please share a sample of the csv that you are trying to read in KNIME Analytics Platform? This will help to investigate more what is the issue there.

Cheers,

Vincenzo

Sorry, I cannot share the file. And this is the only issue. I believe, if you create CSV with header word I provided the result should be the same.

Hi izaychik63,

Please find attached a csv file that I've used to test the issue you are describing. Actually, I did not get any issue in reading it in KNIME Analytics Platform. I have used both the CSV Reader node and the File Reader node. What I would suggest in this case is that you take a look at your CSV file. Probably there is a space or a special character before "User Domain".

Hope that helps,

Best,

Vincenzo

Thank you, for checking. Need to add my header has double quotes. Could you please check your file with this modification?

 

I'm lucky. I've got empty file today and attached it here.

Hi izaychik63,

You can try to use the File Reader to read the file you shared. It will work just fine (see attachment). I will investigate why I got the same issue as you had with the CSV Reader node.

Hope that helps,

Best,

Vincenzo

Hi izaychik63,

It sounds like the file has a byte order mark as its first character in the file. It's a UTF-8 Unicode (with BOM) text, with very long lines, with CRLF line terminators (https://en.wikipedia.org/wiki/Byte_order_mark).

To read the file correctly with the CSV Reader node, you should go to the Encoding tab (in the configuration window of the CSV Reader node) and try "UTF-8".

Hope that helps,

Best,

Vincenzo

2 Likes