I am beggining with neo4j and i have a problem for importing some data from a csv file.
My code is the following :
CREATE CONSTRAINT ON (w:word) ASSERT w.stem IS UNIQUE
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM "file:/home/quentin/.pfe/short_abstracts_fr0.csv" AS row
MATCH (a:article {title: row.article})
MATCH (w:word {stem: row.word})
MERGE (a)-[r:contains {count:row.count}]->(w)
This is not creating any error, but it doesn't import anything. My csv file location is the good one, and it's content is the following :
article,word,count
Aux_couleurs_du_Moyen_Âge,accompagné,1
Aux_couleurs_du_Moyen_Âge,auss,1
Aux_couleurs_du_Moyen_Âge,banquet,1
I have already imported 2 similar csv files using : :
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM "file:/home/quentin/.pfe/category_relations_csv" AS row
MATCH (a:article {title: row.article})
MATCH (cat:category {label: row.categorie})
MERGE (a)-[:is_under]->(cat)
and
MATCH (c0:category {label: row.cat0})
MATCH (c1:category {label: row.cat1})
MERGE (c0)-[r:relates {type:row.link}]->(c1)"
If someone has any idea what is wrong with it.