Name | nodestream-plugin-neo4j JSON |
Version |
0.13.0
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-08-09 17:34:05 |
maintainer | None |
docs_url | None |
author | Zach Probst |
requires_python | <4.0,>=3.10 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Neo4j Nodestream Plugin for Nodestream
This plugin provides a [Nodestream](https://github.com/nodestream-proj/nodestream) interface to Neo4j.
## Installation
```bash
pip install nodestream-plugin-neo4j
```
## Usage
```yaml
# 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:
```yaml
- 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.
Raw data
{
"_id": null,
"home_page": null,
"name": "nodestream-plugin-neo4j",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": null,
"author": "Zach Probst",
"author_email": "Zach_Probst@intuit.com",
"download_url": "https://files.pythonhosted.org/packages/5a/8b/47acd334596a9901768664c1622bdcf63784e52488233347ae6c852ca450/nodestream_plugin_neo4j-0.13.0.tar.gz",
"platform": null,
"description": "# Neo4j Nodestream Plugin for Nodestream\n\nThis plugin provides a [Nodestream](https://github.com/nodestream-proj/nodestream) interface to Neo4j. \n\n## Installation\n\n```bash\npip install nodestream-plugin-neo4j\n```\n\n## Usage\n\n```yaml\n# nodestream.yaml\ntargets:\n neo4j:\n database: neo4j\n uri: bolt://localhost:7687\n username: neo4j\n password: neo4j\n database_name: neo4j # optional; name of the database to use.\n use_enterprise_features: false # optional; use enterprise features (e.g. node key constraints)\n```\n\n### Extractor \n\nThe `Neo4jExtractor` class represents an extractor that reads records from a Neo4j database. It takes a single Cypher query as\ninput 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:\n\n```yaml\n- implementation: nodestream_plugin_neo4j.extractor:Neo4jExtractor\n arguments:\n query: MATCH (p:Person) WHERE p.name = $name RETURN p.name SKIP $offset LIMIT $limit\n uri: bolt://localhost:7687\n username: neo4j\n password: neo4j\n database_name: my_database # Optional; defaults to neo4j\n limit: 100000 # Optional; defaults to 100\n parameters:\n # Optional; defaults to {}\n # Any parameters to be passed to the query\n # For example, if you want to pass a parameter called \"name\" with the value \"John Doe\", you would do this:\n name: John Doe\n```\n\nThe 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. \n\n## Concepts \n\n### Migrations \n\nThe plugin supports migrations. Migrations are used to create indexes and constraints on the database. \n\nAs part of the migration process, the plugin will create `__NodestreamMigration__` nodes in the database. \nThis node will have a `name` property that is set to the name of the migration. \n\nAdditionally, the plugin will create a `__NodestreamMigrationLock__` node in the database. \nThis node will be exit when the migration process is running and will be deleted when the migration process is complete.\nThis is used to prevent multiple migration processes from running at the same time.\n\n",
"bugtrack_url": null,
"license": null,
"summary": null,
"version": "0.13.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "1598b727278bdccce31920e3a55be974ab769750158e111f0b17da1dc7e06b67",
"md5": "431dc0c742e5c84ae5ffdd69cfb9f25d",
"sha256": "29b3fdb4cc590395a08ca692be0e872c4329d6312db87b9e23b4dd2490921227"
},
"downloads": -1,
"filename": "nodestream_plugin_neo4j-0.13.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "431dc0c742e5c84ae5ffdd69cfb9f25d",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 13897,
"upload_time": "2024-08-09T17:34:04",
"upload_time_iso_8601": "2024-08-09T17:34:04.179433Z",
"url": "https://files.pythonhosted.org/packages/15/98/b727278bdccce31920e3a55be974ab769750158e111f0b17da1dc7e06b67/nodestream_plugin_neo4j-0.13.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5a8b47acd334596a9901768664c1622bdcf63784e52488233347ae6c852ca450",
"md5": "bd0966ec484f2da5e685c6e6ba343dfb",
"sha256": "46a94ab386b0bfa673276df5f510aeedc0b45fe8a1d5cf402185e8046aa5502c"
},
"downloads": -1,
"filename": "nodestream_plugin_neo4j-0.13.0.tar.gz",
"has_sig": false,
"md5_digest": "bd0966ec484f2da5e685c6e6ba343dfb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 11285,
"upload_time": "2024-08-09T17:34:05",
"upload_time_iso_8601": "2024-08-09T17:34:05.123260Z",
"url": "https://files.pythonhosted.org/packages/5a/8b/47acd334596a9901768664c1622bdcf63784e52488233347ae6c852ca450/nodestream_plugin_neo4j-0.13.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-09 17:34:05",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "nodestream-plugin-neo4j"
}