Skip to content

Commit

Permalink
Merge pull request #26 from mjsqu/feature/ibm_db
Browse files Browse the repository at this point in the history
Preparing for testing using GitHub actions and db2 image
  • Loading branch information
mjsqu authored May 1, 2023
2 parents 7602395 + ebfd808 commit 074a68e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion tap_db2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion tap_db2/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand Down

0 comments on commit 074a68e

Please sign in to comment.