diff --git a/tap_db2/__init__.py b/tap_db2/__init__.py index 6e4089c..4e5375f 100644 --- a/tap_db2/__init__.py +++ b/tap_db2/__init__.py @@ -301,6 +301,7 @@ def discover_catalog(db2_conn, config): LOGGER.info("Tables fetched, fetching columns") # Query for LUW DB2 instances only - SYSCAT may not exist on Z/OS + # 1.0.4 - updated to include BASE_TABNAME check for aliases column_results = open_conn.execute( """ SELECT @@ -318,7 +319,7 @@ def discover_catalog(db2_conn, config): SYSCAT.TABLES t LEFT JOIN SYSCAT.COLUMNS c - ON c.TABNAME = t.TABNAME + ON (c.TABNAME = t.TABNAME or C.TABNAME = t.BASE_TABNAME) AND c.TABSCHEMA = t.TABSCHEMA WHERE t.TABSCHEMA NOT LIKE 'SYS%' ORDER BY t.TABSCHEMA,t.TABNAME,c.COLNO; diff --git a/tap_db2/connection.py b/tap_db2/connection.py index eade246..3a41c45 100644 --- a/tap_db2/connection.py +++ b/tap_db2/connection.py @@ -60,7 +60,7 @@ def get_db2_sql_engine(config) -> Engine: # connection_string = "ibm_db_sa+pyodbc://db2inst1:* # @localhost:50000/TESTDB" - connection_string = "ibm_db_sa+pyodbc://{}:{}@{}:{}/{}".format( + connection_string = "ibm_db_sa://{}:{}@{}:{}/{}".format( config["username"], config["password"], config["hostname"],