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.

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150

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.

Neo4j database name

Target database for the session (e.g. neo4j). When empty, the server default database is used.

Password for basic auth

Used with username; ignored if credentials are absent.

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 processed records count

The number of input records read from from and sent to the statement.

The updated rows count

The number of rows returned by the statement across all chunks.

The total number of records processed in the batch.

The total number of rows returned by the statement across all chunks.