Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rdeak/neo4j-schema-enforcment-in-etl

About Basic example how Graphql API can enforce schema in neo4j in ETL process executed with Airflow
https://github.com/rdeak/neo4j-schema-enforcment-in-etl

airflow etl neo4j

Last synced: 3 days ago
JSON representation

About Basic example how Graphql API can enforce schema in neo4j in ETL process executed with Airflow

Awesome Lists containing this project

README

        

# ETL sample

This repo contains example how enforce neo4j database schema with Graphql API in ETL process.

## Installation

1. `echo -e "AIRFLOW_UID=$(id -u)" > .env`
2. `docker-compose up airflow-init`
3. `docker-compose up`
4. Add `pg_conn` connection for pg service into Connections
5. Create neo4j database (can be done with neo4j browser)
```cypher
:use system;
create database data
``
7. In `api` directory run
```bash
nvm use
pnpm install
pnpm dev
```

To remove all just run
`docker compose down --volumes --rmi all`

## Usage

| Service | Host | User | Pass | Database |
|-----------------------------------|--------------------------------|----------|--------------|----------|
| Airflow | http://localhost:8080 | airflow | airflow | |
| Graphql API (interface for Neo4J) | http://localhost:4000 | | | |
| Postgres (data source) | localhost | etl_user | etl_password | data |
| Neo4j | http://localhost:7474/browser/ | neo4j | password | data |

## Useful links

* [Neo4j Graphql Toolbox](https://graphql-toolbox.neo4j.io/)
* [Custom Scalars](https://neo4j.com/docs/graphql/current/type-definitions/types/)

## Licence

MIT