diff --git a/.circleci/config.yml b/.circleci/config.yml index a0580f0..26c76f1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -10,6 +10,7 @@ jobs: command: | aws s3 cp s3://com-stitchdata-dev-deployment-assets/environments/tap-tester/sandbox dev_env.sh source dev_env.sh + export LC_ALL=C python3 -m venv /usr/local/share/virtualenvs/tap-postgres source /usr/local/share/virtualenvs/tap-postgres/bin/activate pip install . diff --git a/tap_postgres/__init__.py b/tap_postgres/__init__.py index 00afb6c..38dfe6a 100644 --- a/tap_postgres/__init__.py +++ b/tap_postgres/__init__.py @@ -691,9 +691,9 @@ def main_impl(): if args.discover: do_discovery(conn_config) - elif args.properties or args.catalog: + elif args.properties: state = args.state - do_sync(conn_config, args.catalog.to_dict() if args.catalog else args.properties, args.config.get('default_replication_method'), state) + do_sync(conn_config, args.properties, args.config.get('default_replication_method'), state) else: LOGGER.info("No properties were selected") diff --git a/tap_postgres/sync_strategies/logical_replication.py b/tap_postgres/sync_strategies/logical_replication.py index d857f82..bddf10c 100644 --- a/tap_postgres/sync_strategies/logical_replication.py +++ b/tap_postgres/sync_strategies/logical_replication.py @@ -134,8 +134,8 @@ def create_array_elem(elem, sql_datatype, conn_info): #custom datatypes like enums cast_datatype = 'text[]' - sql = """SELECT $stitch_quote${}$stitch_quote$::{}""".format(elem, cast_datatype) - cur.execute(sql) + sql_stmt = """SELECT $stitch_quote${}$stitch_quote$::{}""".format(elem, cast_datatype) + cur.execute(sql_stmt) res = cur.fetchone()[0] return res