Setting up subJob 2
Procedure
-
Double-click tFixedFlowInput_1 to open its Basic
settings view and do the following:
- Open the schema editor by clicking the [...] button next to Edit schema and add two columns in the schema editor: name, type String; gender, type String.
- Enter 5 in the Number of rows field.
-
Select Use Inline Content(delimited file) and enter
the following in the Content field.
Jane;f John;m Marry;
- Leave the other options as they are.
This component generates 15 records. Each of the record has two fields: name and gender (optional).
-
Double-click tMap_1 to open its map editor and do the
following:
-
Add three rows in the out1 table with the
Column of seq, lastname,
and age; and Type of Integer,
String, and Integer.
You can add a row in the table by clicking the plus button under the table.
-
Map the name column in the row1
section to the name column in the
out1 section.
You can map a column by dragging and dropping the source column in the row1 section to the Expression field of the target column in the out1 section.
- Map the gender column in the row1 section to the gender column in the out1 section.
- Enter Numeric.sequence("s1",0,1) in the Expression field of the seq column.
- Enter TalendDataGenerator.getLastName() in the Expression field of the lastname column.
- Enter Numeric.random(25,99) in the Expression field of the age column.
- Click OK to close map editor.
This component receives name and gender information from the tFixedFlowInput_1 component and adds extra information for creating nodes in the Neo4jv4 database, including sequence number, lastname, and age.
-
Add three rows in the out1 table with the
Column of seq, lastname,
and age; and Type of Integer,
String, and Integer.
-
Double-click tNeo4jv4Output_1 to open its Basic
settings view and do the following:
- Select the Use an existing connection option and select tNeo4jv4Connection_1 from the Component List drop-down list.
- Click the Sync column button to make sure the component has the same columns as the output of tMap_1.
-
Select Send data as list and enter
rows in the Data list
name.
This step specifies to treat the input data as a list and assign a name to the list (that is, rows), so that the list can be referenced.
-
Enter the following clauses in the Query field.
UNWIND $rows as row MERGE (p:Person:UpdateMe {id: row.seq} ) SET p.name = row.name, p.lastName = row.lastname, p.age = row.age, p.gender = row.gender
- Leave the other options as they are.
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 – please let us know!