Importing CSV doesn't work properly

(Mehdi Ajroud) #1

Hey everyone ,

I am using this query to import my CSV file :

LOAD CSV WITH HEADERS FROM 'file:///Contrats2018.csv' AS Contracts FIELDTERMINATOR ';'
CREATE (c:Contrat18 { id:Contracts.contract_id , cpv:Contracts.contract_CPV_3_digits})

And after executing , I find the same number of nodes that I have in my file but for IDs they re just generated by neo4j for my nodes , and it doesn't import my properties .
Help please !!

(Benoit Simard) #2

Can you give the result of this query : MATCH (c:Contrat18) RETURN c LIMIT 5 ?

Can you also share the header of your csv ?

(Mehdi Ajroud) #3

Hey Benoit ,

Here is the file csv that I am using
and here is the result after importing in neo4j :

Knowing that I imported other nodes and I have all properties .

(12kunal34) #4

Hi mehdi ,

could you please open your file in notepad and share it.
i doubt that it is not ' ; ' separated

(Mehdi Ajroud) #5

exactly ! that's why I added FIELDTERMINATOR ';'