Skip to content

Commit

Permalink
catch NotFoundError and ignore when list_tables
Browse files Browse the repository at this point in the history
  • Loading branch information
doryokujin committed Feb 14, 2024
1 parent ce15eb0 commit e9806a3
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ def run(

client = pytd.Client(apikey=os.environ['TD_API_KEY'], endpoint='https://%s' % api_endpoint, database=dest_db)

tables_obj = client.list_tables(cdp_audience_db)
try:
tables_obj = client.list_tables(cdp_audience_db)
except Exception as e:
print(e)
return

input_tables = []
for tbl in tables_obj:
input_tables.append(tbl.name)
Expand Down

0 comments on commit e9806a3

Please sign in to comment.