
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 *Requiredstring
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 *Requiredstring
Cypher UNWIND statement
Must include UNWIND $props AS ...; $props is populated from each chunk of the source file. Rendered with Flow variables before execution.
bearerToken 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.
password string
Password for basic auth
Used with username; ignored if credentials are absent.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
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 count of executed queries
updatedCount integer
The updated rows count
Metrics
records.processed counter
The total number of records processed in the batch.
records.updated counter
The total number of records updated in the batch.