Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-10-2022 04:02 PM
Solved! Go to Solution.
06-12-2022 02:25 AM
Hi @Hajer
Couple of things.
1. Change line 5 into a Merge statement. You may like adding a *toInteger*
2. Have you read about the WITH clause already? It somehow limit your scope. So In line 6, add produit to the pipe. WITH product, line where....
3. Get graphy!! Those are not columns, those are nodes.
06-10-2022 04:19 PM
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?
06-11-2022 02:53 AM
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
06-10-2022 10:46 PM
Please post couple of rows from your .csv file
06-11-2022 03:01 AM
Hello,
Thanks for your response
yes
06-11-2022 03:21 AM
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
06-11-2022 03:29 AM
i deleted it
this is the result
06-11-2022 04:08 AM
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
06-11-2022 04:37 AM
i checked my file there is no null values, but I did it this is the result: with line where line.AssetClass is not null
06-11-2022 04:42 AM
Hi!
Try placing the with statement before the merge.
06-11-2022 06:41 AM - edited 06-11-2022 06:41 AM
Done!! thank you
and now how can i see the graphs with nodes?
06-11-2022 06:59 AM
Thanks for your help!
this is what i got, i don't see the relationship between nodes and in the
06-11-2022 05:11 AM - edited 06-11-2022 05:12 AM
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
06-11-2022 06:53 AM
i runned it
this is the result
06-11-2022 07:34 AM - edited 06-11-2022 07:35 AM
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/
06-11-2022 10:43 AM
@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.
06-11-2022 12:21 PM
yes i tried it, i had this as an error
06-11-2022 01:32 PM
You have uniqueness constraint. Change the first create to a merge, so it will not try to create the node if it exists.
06-11-2022 01:48 PM
And please, take a (long) look on
https://neo4j.com/graphacademy/online-training/
06-11-2022 01:58 PM
it worked
Thank you very much sir! there are two things left:
this is a record video
06-12-2022 02:25 AM
Hi @Hajer
Couple of things.
1. Change line 5 into a Merge statement. You may like adding a *toInteger*
2. Have you read about the WITH clause already? It somehow limit your scope. So In line 6, add produit to the pipe. WITH product, line where....
3. Get graphy!! Those are not columns, those are nodes.
All the sessions of the conference are now available online