Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ingest): add PostgreSQL ETL script #1712

Merged
merged 1 commit into from
Jun 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions metadata-ingestion/sql-etl/postgres.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3.1'

services:

postgres:
image: postgres
restart: always
environment:
POSTGRES_USER: datahub
POSTGRES_PASSWORD: datahub
ports:
- "5432:5432"
8 changes: 8 additions & 0 deletions metadata-ingestion/sql-etl/postgres_etl.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from common import run

# See https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#module-sqlalchemy.dialects.postgresql.psycopg2 for more details
URL = '' # e.g. postgresql+psycopg2://user:password@host:port
OPTIONS = {} # e.g. {"client_encoding": "utf8"}
PLATFORM = 'postgresql'

run(URL, OPTIONS, PLATFORM)
1 change: 1 addition & 0 deletions metadata-ingestion/sql-etl/postgres_etl.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
psycopg2-binary==2.8.5