Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all.
I tried to load csv data using Rest connector.
TabName:
SQL SELECT
field 1,
field 2
FROM CSV (header on, delimiter ",", quote """") "CSV_source"
WITH CONNECTION (
URL = "some url");
And for one file I received error message:
Unexpected symbol ' '(#32) at (line 2908, col 27). Delimiter ',' or EOL is expectd.
This happens because some fields in csv looks likr this : SPÓ£KA Z O.O., PUÑSK
Is there any ways to upload data with such charters?
The issue appeared easier than i thought. I should replased
quote """"
with
quote "''"
and upload become successful
Maybe you can try to read row by row first with some Replace (or MapSubstring) to clean the data and then process to a decomposition using SubField to create your 2 fields.
Thank you for your idea @vincent_ardiet_ Unfortunately as I see, I can't use Qlik functions inside SQL select.
Something like this (i have picked £ as a delimiter but you have to be sure that it is not present in your data).
But by the way, maybe just the "no quotes" could help you to retrieve correct data...
TabName:
Select
subfield(fullrow,',',1) as field 1,
subfield(fullrow,',',2) as field 2;
Select Replace(fullrow,chr(34),'somethingelse') as fullrow;
SQL SELECT
fullrow
FROM CSV (header on, delimiter "£", no quotes) "CSV_source"
WITH CONNECTION (
URL = "some url");
The issue appeared easier than i thought. I should replased
quote """"
with
quote "''"
and upload become successful