Adding uniqueness constraints on the nodes - 7.0

Neo4j

author
Talend Documentation Team
EnrichVersion
7.0
EnrichProdName
Talend Big Data
Talend Big Data Platform
Talend Data Fabric
Talend Open Studio for Big Data
Talend Real-Time Big Data Platform
task
Data Governance > Third-party systems > Database components > Neo4j components
Data Quality and Preparation > Third-party systems > Database components > Neo4j components
Design and Development > Third-party systems > Database components > Neo4j components
EnrichPlatform
Talend Studio

Procedure

  1. Double-click the tNeo4jBatchSchema component to open its Component view.
  2. Select the Use an existing connection check box to reuse the Neo4j database connection opened by the tNeo4jConnection component.
  3. Select the Shutdown after Job check box to properly close the connection after the execution.
  4. In the Schema definition table, add two rows by clicking the [+] button twice:
    1. In the Schema type column, select Node property is unique for both of the rows to add uniqueness constraints to nodes in Neo4j.
    2. In the For node with Label column, enter, within double quotation marks, Actor and Movie respectively, which are the labels used by the actor nodes and the movie nodes. Therefore, what you enter here must be identical with the labels previously used when creating those nodes.
    3. In the On property column, enter, within double quotation marks, the node properties to which you need to add uniqueness constraints. For the actor nodes, enter name and for the movie nodes, enter title. The values you enter here must be identical with the column names previously defined to provide actor names and movie names for the nodes to be created by the tNeo4jBatchOutput components.
  5. Press Ctrl+S to save the Job, and press F6 or click Run on the Run tab to execute the Job.

Results

Once the Job runs successfully to the end, check the result in your Neo4j browser: