Reader options
| Setting name | Description | Default value | Required |
|---|---|---|---|
|
Cypher® query to read the data |
(none) |
Yes* |
|
List of node labels separated by colon. The first label is to be the primary label. |
(none) |
Yes* |
|
Type of a relationship |
(none) |
Yes* |
|
Number of records to be used to create the Schema (only if APOC is not installed,
or for custom Cypher queries provided via |
|
No |
|
Strategy used by the connector in order to compute the Schema definition for the Dataset.
Possible values are |
|
No |
|
Enable or disable the PushdownFilters support. |
|
No |
|
Enable or disable the PushdownColumn support. |
|
No |
|
Enable or disable the PushdownAggregate support. |
|
No |
|
Enable or disable the PushdownLimit support. |
|
No |
|
Enable or disable the PushDownTopN support. |
|
No |
|
This defines the parallelization level while pulling data from Neo4j. Note: as more parallelization does not mean better query performance, tune wisely in according to your Neo4j installation. |
|
No |
|
Data conversion logic. When set to |
|
No |
|
Number of times a partition may retry its read query after a transient failure. See Read retries. |
|
No |
|
The time in milliseconds to wait before each retry. |
|
No |
Query specific options |
|||
|
Query count is used only in combination with MATCH (p:Person)-[r:BOUGHT]->(pr:Product) WHERE pr.name = 'An Awesome Product' RETURN count(p) AS count or a simple number that represents the number of records returned by |
(empty) |
No |
Relationship specific options |
|||
|
If it’s set to |
|
No |
|
List of source node labels separated by colon. |
(empty) |
Yes |
|
List of target node labels separated by colon. |
(empty) |
Yes |
Cypher options [role=label—new-6.0] |
|||
|
Set a custom Cypher language version to a custom value.
The expected value is the version number itself, for example |
5 |
No |
|
Set any cypher query tuning parameter with this prefix. See more details on how to properly use this feature on /docs/spark/current/performance/cypher-tuning. |
(emtpy) |
No |
Optimization options |
|||
|
Apply a custom Cypher query which will run once before any write operations.
Use this option to apply optimizations such as the use of a custom index and constraint queries.
Can not be used together with the numbered |
(empty) |
No |
|
Similar to |
(empty) |
No |
* Just one of the options can be specified at the time.
Read retries
Each partition runs its own query in its own transaction.
If that query fails with a transient error, the partition retries it, up to transaction.retries times, waiting transaction.retry.timeout milliseconds between attempts.
An error is transient when the Neo4j driver marks it as retryable, which covers a lost connection (ServiceUnavailableException), a server that can no longer serve the request (SessionExpiredException), transient server errors such as deadlocks (TransientException), and expired authorization.
|
A retry re-runs the query from the beginning. The connector does not track how far the partition had already read, so rows the failed attempt had already produced are read and emitted again. If a read fails partway through and is retried, the partition can therefore contain duplicate rows. Set |
Retries also interact with partitioned reads.
With partitions greater than 1, each partition reads a different SKIP/LIMIT window in a separate transaction, so the partitions do not share a consistent snapshot of the graph.
If the data changes while the read is in progress, a retried partition sees the newer state, and rows can be missed or read twice.
When you need a consistent result, read from a database that is not being written to for the duration of the read.