
Neo4j Batch
CertifiedRun Cypher batch with UNWIND
Neo4j Batch
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.
type: io.kestra.plugin.neo4j.BatchExamples
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
from *string
Source file URI
Internal storage URI (e.g. kestra://...) containing JSON lines to stream into the batch.
Pebble expression referencing an Internal Storage URI e.g. {{ outputs.mytask.uri }}.
query *string
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
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.
io.kestra.core.models.assets.AssetsDeclaration
IGNOREFAILWARNAsset 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.
Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.
The assets consumed as inputs.
io.kestra.core.models.assets.AssetIdentifier
1The assets produced as outputs.
io.kestra.plugin.ee.assets.Dataset
1150{}1150io.kestra.plugin.ee.assets.File
1150{}1150io.kestra.plugin.ee.assets.Table
1150{}1150io.kestra.plugin.ee.assets.VM
1150{}1150io.kestra.core.models.assets.External
1150{}1150io.kestra.core.models.assets.Custom
11501Custom asset type
{}1150bearerToken string
Bearer token
Base64-encoded bearer token used when basic credentials are not provided.
chunk integerstring
1000Chunk size per request
Number of records sent in each bulk call (default 1000). Lower to reduce memory use; raise to speed up large imports.
database string
Neo4j database name
Target database for the session (e.g. neo4j). When empty, the server default database is used.
password string
Password for basic auth
Used with username; ignored if credentials are absent.
url string
Neo4j endpoint URL
Bolt or HTTP(S) URI used to open the driver connection.
username string
Username for basic auth
Used with password; takes precedence over bearer tokens when both are set.
Outputs
rowCount integer
The processed records count
The number of input records read from from and sent to the statement.
updatedCount integer
The updated rows count
The number of rows returned by the statement across all chunks.
Metrics
records.processed counter
The total number of records processed in the batch.
records.updated counter
The total number of rows returned by the statement across all chunks.