Neo4j Cypher builder
Description
The Neo4j Cypher builder transform builds a Cypher statement from a list of operations you define in the dialog: match, merge, create, delete or set nodes and relationships, order the result and return values.
The generated Cypher is shown in the Cypher tab and executed over the Bolt protocol for every input row, or for a batch of rows at once with UNWIND.
Use it when you want the structure of the statement to be visible and editable in the dialog rather than typed as free text. When you need something the operations cannot express, use the Neo4j Cypher transform, which runs any statement you give it.
Options
Options tab
| Option | Description |
|---|---|
Transform name |
Unique name of the transform in the pipeline. |
Neo4j Connection |
The Neo4j connection to use. |
Batch size (rows) |
How many input rows are sent to Neo4j in one transaction. Default |
Unwind map alias |
The alias used in the generated |
Maximum retries |
How many times a failed batch is retried before the transform errors out. Default |
Parameters tab
Parameters make input field values available to the operations. Click Get parameters to add every input field.
| Column | Description |
|---|---|
Parameter |
The name used to reference the value in the operations. |
Input field |
The input field whose value is passed. |
Neo4j type |
The type the value is converted to before it is sent to Neo4j. |
Parameters can be used for property values and keys. They can not be used for node labels or relationship labels.
Operations tab
The list on the left holds the operations, executed in the order shown; use the buttons to add, delete and reorder them. Every operation has a name and a type, and the fields on the right depend on the type:
| Operation type | What it generates |
|---|---|
Match node |
|
Merge node |
|
Create node |
|
Delete node |
|
Set values |
|
Match relationship |
|
Merge relationship |
|
Create relationship |
|
Order by |
|
Return values |
|
Cypher tab
Shows the statement the operations generate, with the UNWIND clause on top when an alias is set.
It is read-only; change the operations to change the Cypher.
Output
-
Without a Return values operation the transform only writes to the graph and passes the input rows through unchanged.
-
With Return values and an Unwind map alias, the output rows are the records Neo4j returns for the whole batch. They can not be matched back to individual input rows, so the output layout consists of the return values only.
-
With Return values and no unwind alias, every returned record is appended to the input row it was produced for, so the output has the input fields followed by the return values.
The transform opens a read transaction when the operations only match, order and return, and a write transaction as soon as one of them merges, creates, deletes or sets values.
Metadata injection
All options support metadata injection.
Related pages
-
Neo4j Cypher for hand-written statements
-
Neo4j output for loading nodes and relationships from a row layout