I was able to execute your import query with a same data file I made and it created nodes and such. What does you data file look like?
Thanks for your response ! it's a CSV file with 2127F lines
can you see it with me we can have a call by google meet if you can?
I joined a photo of my data
Hi
Your info is not properly loaded do to the delimiter used.
You should use the FIELD TERMINATOR annotation. Take a look on (e.g) https://neo4j.com/developer/kb/how-do-i-define-a-load-csv-fieldterminator-in-hexidecimal-notation/
Looks like you have some null vales on the Asset Class column. You may need to discard them with line where line.AssetClass is not null
@bennu_neo is correct. Here is the updated file with his suggestion.
LOAD CSV WITH HEADERS FROM
"file:///oddobhfamm.csv" as line
FIELDTERMINATOR ';'
CREATE (produit:LIBELLEPDT {id: line.LIBELLEPDT })
MERGE (assetClass:AssetClass {name: line.AssetClass })
MERGE (libSocieteGestion:LibSocieteGestion {name: line.LibSocieteGestion })
CREATE (produit)-[:AGAINST]->(assetClass)
CREATE (libSocieteGestion)-[r:TO]->(produit);
Let's know if there is any further issue.
i checked my file there is no null values, but I did it this is the result:
with line where line.AssetClass is not nullHi!
Try placing the with statement before the merge.
You have uniqueness constraint. Change the first create to a merge, so it will not try to create the node if it exists.
it worked
Thank you very much sir! there are two things left:
- relationships between columns are not visible
- the LIBELLEPDT column is displayed in numbers or it is a character string
this is a record video
Thanks for your help!
this is what i got, i don't see the relationship between nodes and in the
MATCH (n:LIBELLEPDT) RETURN n LIMIT 25 query I wanted to see the product label not the id .. what should I do ?
Hey, to ensure you have the right file and the data looks good, run the following query. What does the output look like?
LOAD CSV WITH HEADERS FROM "file:///oddobhfamm.csv" as line
return line
limit 10
Think I know what the problem is. You have a condition for ‘line.id’ not nul, but you don’t have a column with an ‘’id’ field. Remove the following:
with line where line.id is not null
Please post couple of rows from your .csv file
I was able to execute your import query with a same data file I made and it created nodes and such. What does you data file look like?