Creating relationships in bulk - Cloud - 8.0

Neo4j

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > NoSQL components > Neo4j components
Data Quality and Preparation > Third-party systems > NoSQL components > Neo4j components
Design and Development > Third-party systems > NoSQL components > Neo4j components
Last publication date
2024-02-20

Procedure

  1. Double-click the third tFileInputDelimited component to open its Component view.
  2. In the File name/Stream field, enter the path or browse to the CSV file that describes the actor-movie relationships.

    The input CSV file used in this example reads as follows:

    keanu,"Neo",tt0133093,ACTED_IN
    keanu,"Neo",tt0234215,ACTED_IN
    keanu,"Neo",tt0242653,ACTED_IN
    laurence,"Morpheus",tt0133093,ACTED_IN
    laurence,"Morpheus",tt0234215,ACTED_IN
    laurence,"Morpheus",tt0242653,ACTED_IN
    carrieanne,"Trinity",tt0133093,ACTED_IN
    carrieanne,"Trinity",tt0234215,ACTED_IN
    carrieanne,"Trinity",tt0242653,ACTED_IN

    The double quotation marks on the role names are not mandatory. The value ACTED_IN is an user-defined relationship type that explains the relationship between the actors and the movies.

  3. Click the [...] button next to Edit schema to open the schema editor, and define the input schema based on the structure of the input file.

    In this example, the columns are from, role, to and type.

  4. Click OK to close this editor and accept the propagation of the schema to the next component.
  5. In the Field separator field, enter a comma (,) to replace the default semicolon (;).
  6. Double-click the tNeo4jBatchOutputRelationship component to open its Component view.
  7. Select the Use an existing connection check box to reuse the Neo4j database connection opened by the tNeo4jConnection component.
  8. Verify that the Shutdown after Job check box is clear.
  9. From the Field for relationship type drop-down list, select the column that provides the relationship types.
  10. From the Direction of the relationship drop-down list, select Outgoing.
  11. In the Start node of the relationship area, select the tNeo4jBatchOutput component that provides the index of the start nodes, which is the asActors index in this example from the first tNeo4jBatchOutput. Then from the Field name for the batch index drop-down list, select the column that provides the actor names as the start nodes.
  12. Repeat this action in the End node of the relationship area to select the asMovie index from the second tNeo4jBatchOutput and then select the column that provides the movie names as the end nodes.