No project description provided
Project description
Neo4j Nodestream Plugin for Nodestream
This plugin provides a Nodestream interface to Neo4j.
THIS PLUGIN IS IN BETA. USE AT YOUR OWN RISK.
Installation
pip install nodestream-plugin-neo4j
Usage
# nodestream.yaml
targets:
neo4j:
database: neo4j
uri: bolt://localhost:7687
username: neo4j
password: neo4j
database_name: neo4j # optional; name of the database to use.
use_enterprise_features: false # optional; use enterprise features (e.g. node key constraints)
Extractor
The Neo4jExtractor
class represents an extractor that reads records from a Neo4j database. It takes a single Cypher query as
input and yields the records read from the database. The extractor will automatically paginate through the database until it reaches the end. Therefore, the query needs to include a SKIP
and LIMIT
clause. For example:
- implementation: nodestream_plugin_neo4j.extractor:Neo4jExtractor
arguments:
query: MATCH (p:Person) WHERE p.name = $name RETURN p.name SKIP $offset LIMIT $limit
uri: bolt://localhost:7687
username: neo4j
password: neo4j
database_name: my_database # Optional; defaults to neo4j
limit: 100000 # Optional; defaults to 100
parameters:
# Optional; defaults to {}
# Any parameters to be passed to the query
# For example, if you want to pass a parameter called "name" with the value "John Doe", you would do this:
name: John Doe
The extractor will automatically add the SKIP
and LIMIT
clauses to the query. The extractor will also automatically add the offset
and limit
parameters to the query. The extractor will start with offset
set to 0
and limit
set to 100
(unless overridden by setting limit
) The extractor will continue to paginate through the database until the query returns no results.
Concepts
Migrations
The plugin supports migrations. Migrations are used to create indexes and constraints on the database.
As part of the migration process, the plugin will create __NodestreamMigration__
nodes in the database.
This node will have a name
property that is set to the name of the migration.
Additionally, the plugin will create a __NodestreamMigrationLock__
node in the database.
This node will be exit when the migration process is running and will be deleted when the migration process is complete.
This is used to prevent multiple migration processes from running at the same time.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nodestream_plugin_neo4j-0.12.0rc1.tar.gz
.
File metadata
- Download URL: nodestream_plugin_neo4j-0.12.0rc1.tar.gz
- Upload date:
- Size: 11.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4a2a855fd2d89c6a7893e3bbf817c086424a8f65dc6d0cc2f3886e36f3f83c64 |
|
MD5 | 29a1063ab4b2c2d059f42daf4a1ab6ea |
|
BLAKE2b-256 | 25ca443bfaf9016bfa880c71075bd47cdec51d28b51810d891341c39e873956e |
File details
Details for the file nodestream_plugin_neo4j-0.12.0rc1-py3-none-any.whl
.
File metadata
- Download URL: nodestream_plugin_neo4j-0.12.0rc1-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.0 Darwin/23.4.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e18d4fceebea3322ff0a354a19871276e554e1fb5773ab12541d2f5b47d48f8e |
|
MD5 | a0b6942b02698c5fec30905374ae0662 |
|
BLAKE2b-256 | f86e0285e85a8fcc720296807046ca9ea315ef5115a9777a65e762eb2a3717b0 |