Neo4j Batch

Neo4j Batch

Certified

Run Cypher batch with UNWIND

Reads records from internal storage, binds them to an UNWIND Cypher statement, and executes in a single transaction using chunked batches (default 1000). Ensure the query is idempotent.

yaml
type: io.kestra.plugin.neo4j.Batch
yaml
id: neo4j_batch
namespace: company.team

tasks:
  - id: batch
    type: io.kestra.plugin.neo4j.Batch
    url: "{{ url }}"
    username: "{{ username }}"
    password: "{{ password }}"
    query: |
       UNWIND $props AS properties
       MERGE (y:Year {year: properties.year})
       MERGE (y)<-[:IN]-(e:Event {id: properties.id})

       RETURN e.id AS x ORDER BY x

    from: "{{ outputs.previous_task_id.uri }}"
    chunk: 1000
Properties

Source file URI

Internal storage URI (e.g. kestra://...) containing JSON lines to stream into the batch.

Cypher UNWIND statement

Must include UNWIND $props AS ...; $props is populated from each chunk of the source file. Rendered with Flow variables before execution.

Bearer token

Base64-encoded bearer token used when basic credentials are not provided.

Default1000

Chunk size per request

Number of records sent in each bulk call (default 1000). Lower to reduce memory use; raise to speed up large imports.

Password for basic auth

Used with username; ignored if credentials are absent.

Reference (ref) of the pluginDefaults to apply to this task.

Neo4j endpoint URL

Bolt or HTTP(S) URI used to open the driver connection.

Username for basic auth

Used with password; takes precedence over bearer tokens when both are set.

The count of executed queries

The updated rows count

The total number of records processed in the batch.

The total number of records updated in the batch.