tuan_cao
12/16/2019, 6:16 AMTraceback (most recent call last):
File "target-psql/bin/target-postgres", line 11, in <module>
load_entry_point('target-postgres==1.1.3', 'console_scripts', 'target-postgres')()
File "/Users/tuancao/.virtualenvs/target-psql/lib/python3.7/site-packages/target_postgres-1.1.3-py3.7.egg/target_postgres/__init__.py", line 138, in main
File "/Users/tuancao/.virtualenvs/target-psql/lib/python3.7/site-packages/target_postgres-1.1.3-py3.7.egg/target_postgres/__init__.py", line 100, in persist_lines
File "/Users/tuancao/.virtualenvs/target-psql/lib/python3.7/site-packages/target_postgres-1.1.3-py3.7.egg/target_postgres/db_sync.py", line 116, in __init__
KeyError: 'schema'
....tuan_cao
12/16/2019, 6:18 AMpython setup.py install .
Using following config.json file as below:
{
"postgres_host": "localhost",
"postgres_port": 54320,
"postgres_database": "postgres",
"postgres_username": "postgres",
"postgres_password": "123456",
"postgres_schema": "gitlab",
"invalid_records_threshold": 10000
}tuan_cao
12/16/2019, 6:21 AMmkvirtualenv target-psql
cd target-psql
git clone <https://github.com/meltano/target-postgres.git>
cd target-postgres
python setup.py install
cd ..
deactivate
tap-gitlab/bin/tap-gitlab -c gitlab-config.json | target-psql/bin/target-postgres -c postgres_config.json >> state.json
workon target-psql
cdvirtualenv
pip install psycopg2-binary
tap-gitlab/bin/tap-gitlab -c gitlab-config.json | target-psql/bin/target-postgres -c postgres_config.json >> state.jsontuan_cao
12/16/2019, 6:22 AMtuan_cao
12/16/2019, 6:24 AMmkvirtualenv singer-target-psql
cdvirtualenv
pip install singer-target-postgres
cd ..
deactivate
tap-gitlab/bin/tap-gitlab -c gitlab-config.json | singer-target-psql/bin/target-postgres -c postgres_config.json >> state.jsontuan_cao
12/16/2019, 8:01 AMkey from official one.
below config correct the issue:
{
"host": "localhost",
"port": 54320,
"dbname": "postgres",
"user": "postgres",
"password": "123456",
"schema": "gitlab",
"invalid_records_threshold": 10000
}micael_bergeron
12/18/2019, 4:34 PMtarget-postgres changed to use the datamill implementation IIRC.
We are still running off a fork of the old one, which explains why the configuration is not the same.tuan_cao
12/18/2019, 4:54 PM