When using LOAD CSV one can define the field delimiter used, whereby the default is the ',' character.
If you want to override the default this can be accomplished via the parameter FIELDTERMINATOR, for example:
LOAD CSV WITH HEADERS from "https://raw.githubusercontent.com/username/actors.csv" as row FIELDTERMINATOR ';' RETURN row.name;
Note: that for Aura the file must be publicly hosted HTTP/HTTPS or FTP
This will read a file named actors.csv and expect each field is delimited by the semi-colon character ';'
One can also define the FIELDTERMINATOR as a hexadecimal representation of its ASCII character. This can be helpful if you have chosen a field delimiter as a non-printable character, for example
LOAD CSV WITH HEADERS from "https://raw.githubusercontent.com/username/actors.csv" as row FIELDTERMINATOR '\u0080' RETURN row.name;
the usage of '\u' as a FIELDTERMINATOR needs to be a 4 character zero padded value. In the above example the field terminator is now defined to be hexadecimal value 80, which is decimal character 128 of the ASCII extended characters and represents the non printable padding character.
Comments
0 comments
Please sign in to leave a comment.