cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

How do I define a LOAD CSV FIELDTERMINATOR in hexidecimal notation

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 paramter FIELDTERMINATOR, for example

LOAD CSV WITH HEADERS from 'file:///actors.csv' as row
FIELDTERMINATOR ';'
RETURN row.name;

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 hexidecimal representation of its ASCII character. This can be
helpful if you have choosen a field delimiter as a non-printable character, for example

LOAD CSV WITH HEADERS from 'file:///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 hexidecimal value 80, which is decimal character 128 of the ASCII extended characters and represents the cedilla character.

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online