Skip to content
This repository has been archived by the owner on Aug 20, 2024. It is now read-only.

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Credgate committed Mar 14, 2023
1 parent 90f1d4c commit 7fa332e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tap_redshift/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def transform_db_schema_type(db_schemas):
else:
return f"('{db_schemas[0]}')"


def discover_catalog(conn, db_name, db_schemas):
'''Returns a Catalog describing the structure of the database.'''
db_schemas = transform_db_schema_type(db_schemas)
Expand Down Expand Up @@ -137,11 +138,11 @@ def discover_catalog(conn, db_name, db_schemas):
"""
)
entries = []
LOGGER.warning(f"column_specs before transformation: {column_specs}")
table_columns = [{'name': k, 'columns': [
{'pos': t[1], 'name': t[2], 'type': t[3],
'nullable': t[4]} for t in v]}
for k, v in groupby(column_specs, key=lambda t: t[0])]

{'pos': t[1], 'name': t[2], 'nullable': t[3], 'type': t[4]} for t in v
]} for k, v in groupby(column_specs, key=lambda t: t[0])]
LOGGER.warning(f"Table_columns after transformation: {table_columns}")
table_pks = {k: [t[1] for t in v]
for k, v in groupby(pk_specs, key=lambda t: t[0])}
table_spec_dict = table_spec_to_dict(table_spec)
Expand Down

0 comments on commit 7fa332e

Please sign in to comment.