
Neo4j Query
CertifiedExecute a Neo4j Cypher query
Neo4j Query
Execute a Neo4j Cypher query
Runs a rendered Cypher statement on a Neo4j database and handles results as fetch, fetch-one, store to internal storage, or no-op (default NONE).
type: io.kestra.plugin.neo4j.QueryExamples
id: neo4j_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.neo4j.Query
url: "{{ url }}"
username: "{{ username }}"
password: "{{ password }}"
query: |
MATCH (p:Person)
RETURN p
storeType: FETCH
Bind Cypher parameters
id: neo4j_query_params
namespace: company.team
inputs:
- id: name
type: STRING
defaults: aDeveloper
tasks:
- id: query
type: io.kestra.plugin.neo4j.Query
url: "{{ secret('NEO4J_URL') }}"
username: "{{ secret('NEO4J_USERNAME') }}"
password: "{{ secret('NEO4J_PASSWORD') }}"
query: |
MATCH (p:Person {name: $name})
RETURN p
parameters:
name: "{{ inputs.name }}"
storeType: FETCH
Connect with a private CA certificate
id: neo4j_query_private_ca
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.neo4j.Query
url: "bolt://localhost:7687"
username: "{{ secret('NEO4J_USERNAME') }}"
password: "{{ secret('NEO4J_PASSWORD') }}"
encryption: true
trustStrategy: CUSTOM
trustedCertificate: "{{ secret('NEO4J_CA_PEM') }}"
query: |
MATCH (p:Person)
RETURN p
storeType: FETCH
Target a specific database
id: neo4j_query_database
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.neo4j.Query
url: "{{ secret('NEO4J_URL') }}"
username: "{{ secret('NEO4J_USERNAME') }}"
password: "{{ secret('NEO4J_PASSWORD') }}"
database: neo4j
query: "MATCH (n) RETURN n"
storeType: FETCHONE
Route to read servers
id: neo4j_query_read
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.neo4j.Query
url: "{{ url }}"
username: "{{ secret('NEO4J_USERNAME') }}"
password: "{{ secret('NEO4J_PASSWORD') }}"
accessMode: READ
query: |
MATCH (p:Person)
RETURN p
storeType: FETCHONE
Properties
accessMode string
WRITEREADWRITESession access mode
Routes units of work to read or write servers in a cluster. Ignored against a single server (default WRITE).
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. Cannot be combined with any other authentication mode.
connectionTimeout string
PT30SConnection timeout
Maximum time to establish a socket connection (default 30 seconds).
customAuthCredentials string
Custom authentication credentials
Credentials for custom authentication. Must be set together with customAuthScheme and customAuthPrincipal.
customAuthPrincipal string
Custom authentication principal
Principal for custom authentication. Must be set together with customAuthScheme and customAuthCredentials.
customAuthScheme string
Custom authentication scheme
Scheme name for custom authentication. Must be set together with customAuthPrincipal and customAuthCredentials, and cannot be combined with any other authentication mode.
database string
Neo4j database name
Target database for the session (e.g. neo4j). When empty, the server default database is used.
encryption booleanstring
Enable TLS encryption
When true, encrypted traffic is forced with withEncryption(); when false, unencrypted traffic is forced with withoutEncryption(). When unset, the driver default applies so the connection URI scheme keeps working (bolt+s, bolt+ssc, neo4j+s, neo4j+ssc stay encrypted, plain bolt/neo4j stay unencrypted), except that supplying trustStrategy or trustedCertificate with a plain bolt:// or neo4j:// URL enables encryption automatically since trust settings are meaningless over plaintext.
kerberosTicket string
Kerberos ticket
Base64-encoded Kerberos service ticket. Cannot be combined with any other authentication mode.
maxConnectionPoolSize integerstring
100Maximum connection pool size
Maximum number of pooled connections towards a single database, or per cluster member with routing (default 100).
parameters object
Query parameters
Map of parameter names to values bound as $name in the Cypher query. Nested maps and lists are rendered recursively. Values produced by a Pebble expression are bound as strings; cast in Cypher when another type is required, e.g. toInteger($age).
password string
Password for basic auth
Must be used together with username.
query string
Cypher query to run
Rendered with Flow variables before execution; must be valid for the chosen result mode.
storeType string
NONESTOREFETCHFETCHONENONEResult handling mode
FETCHONE returns the first row; FETCH returns all rows; STORE writes all rows to internal storage; NONE skips result handling (default).
trustStrategy string
SYSTEMCUSTOMALLTLS trust strategy
SYSTEM trusts system CA certificates (default), CUSTOM trusts the CA given in trustedCertificate, ALL trusts every certificate blindly and must only be used for development or tests. When unset and trustedCertificate is supplied, CUSTOM is inferred; otherwise SYSTEM applies.
trustedCertificate string
Trusted CA certificate
PEM-encoded CA certificate used with the CUSTOM trust strategy. Accepts either the PEM content itself (e.g. "{{ secret('NEO4J_CA_PEM') }}") or a Kestra internal storage URI (e.g. kestra://.../ca.crt).
url string
Neo4j endpoint URL
Bolt or HTTP(S) URI used to open the driver connection.
username string
Username for basic auth
Must be used together with password.
Outputs
row object
First fetched row
Populated when storeType is FETCHONE. A map keyed by the column names of the RETURN clause (e.g. RETURN count(n) AS total gives row.total).
rows array
Fetched rows
Populated when storeType is FETCH. One map per record, keyed by the column names of the RETURN clause (e.g. RETURN p gives rows[0].p.name); nodes and relationships are exposed as their properties.
size integer
Row count
Number of rows fetched or stored.
uri string
uriStored result URI
Populated when storeType is STORE; points to internal storage.
Metrics
fetch.size counter
The number of records fetched in FETCH or FETCHONE mode.
store.size counter
The number of records stored in STORE mode.