pg4j¶
Documentation: https://pg4j.modelyst.com
Github: https://github.com/modelyst/pg4j
pg4j is a package designed to perform etl from a postgres database to a neo4j database.
pg4j was written to expedite the creation of neo4j graph databases from postgresql databases by leveraging the information stored in the postgresql schema. While there does exist a neo4j-etl tool does exist, it is written primarily in java and not open-source. In contrast, pg4j was meant to be a fully open-source python package for interacting with postgresql and neo4j databases.
pg4j Feautures¶
The key features of pg4j:
- Automatic mapping of a postgresql schema to nodes, edges in neo4j
- Simple customization of the mapping between postgresql and neo4j entities
- Utilizes the well-tested sqlalchemy package to allow for future interactions with all SQL type databases.
- The use of custom SQL for creation of entities in neo4j
pg4j was initially developed by Modelyst.
Getting pg4j¶
Via Pip (Recommended)¶
pip install pg4j
Via Github¶
For development purposes pg4j can be obtained from github. This is best done by using the poetry package manager. To do this, first clone the repo to a local directory. Then use the command poetry install
in the directory to install the required dependencies. You will need at least python 3.7 to install the package.
# Get DBgen
git clone https://github.com/modelyst/pg4j
cd ./pg4j
# Get Poetry
curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 -
# Install Poetry
poetry install
poetry shell
# Test pg4j
pg4j version
Reporting bugs¶
Please report any bugs and issues at pg4j's Github Issues page.
License¶
pg4j is released under the Apache 2.0 License.