# Neo4j Cypher

## <img src="/files/moRLkEZbAFSQPGQYBQUG" alt="" data-size="line"> Neo4j Cypher

### Description <a href="#description" id="description"></a>

The Neo4j Cypher transform allows you to execute any Cypher through the Neo4j Bolt protocol using the Java driver.

Both reading, writing or both are supported. You can also call procedures and get the output.

| Hop Engine | <sup>✓</sup> |
| ---------- | ------------ |
| Spark      | <sup>✓</sup> |
| Flink      | <sup>✓</sup> |
| Dataflow   | <sup>✓</sup> |

### Notable options

| Option                                  | Description                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| --------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Get Cypher from input field             | instead of hard coding statements you can actually have them created in for example a bit of JavaScript. Then each row can contain a different statement to be executed by this transform.                                                                                                                                                                                                                                                            |
| Cypher                                  | the cypher statement to execute. You can use variables substitution (for example `${MY_VARIABLE}`) or parameter substitution (for example `{MY_PARAMETER}`). Note the missing `$`. Parameters can be specified in the next section of the options.                                                                                                                                                                                                    |
| Use UNWIND to collect parameter values? | <p>This option collects all the parameters in a map, adds all the row maps together in a list and passes this to the UNWIND statement. Consider this example:</p><p><code>UNWIND $customers AS customer CREATE (c:Customer { id : customer.id, name : customer.name })</code></p><p>we pick up <code>customer.id</code> and <code>customer.name</code> as parameters. The <code>customers</code> parameter comes from the name of the unwind map.</p> |
| Name of UNWIND values map               | the name of the map containing all the rows and values for the UNWIND statement.                                                                                                                                                                                                                                                                                                                                                                      |
| Parameters                              | You can pick any Neo4j approved parameter name (without spaces and so on), the field to use and the Neo4j data type to convert to.                                                                                                                                                                                                                                                                                                                    |
| Returns                                 | this transform can return one or more rows of data. You can specify the return values here. For every input row you can then have 0, 1 or more output rows. If you do not specify any return values the output will simply be the same as the input.                                                                                                                                                                                                  |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.primeur.com/data-shaper-1.21/knowing-the-data-shaper-designer/pipelines/transforms/neo4j-cypher.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
