Skip to main content Skip to complementary content

Importing data and creating relationships


  1. Double-click the second tNeo4jRow component to open its Basic settings view on the Component tab.
  2. From the DB Version list, select Neo4J 2.X.X.
  3. Select the Remote server check box and specify the URL of the Neo4j server in the Server URL field, "http://localhost:7474/db/data" in this example.
  4. In the Query field, type in the following Cypher query to import family data from the CSV file, create relevant Person and Family nodes, and create relationships between persons and families:
    "LOAD CSV WITH HEADERS FROM 'file:E:/Talend/Data/Input/families.csv' AS csvLine FIELDTERMINATOR ';' 
    MERGE (family:Family { name: csvLine.Family })
    CREATE (person:Person { name: csvLine.Name, gender: csvLine.Gender, age: toInt(csvLine.Age)})
    CREATE (person)-[:From]->(family)"

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!