Skip to content

Commit

Permalink
Fixed issue
Browse files Browse the repository at this point in the history
  • Loading branch information
souravg-db2 committed Dec 28, 2023
1 parent e96fe2e commit 44eccf6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion discoverx/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ def _resolve_scan_content(self) -> ScanContent:
else:
info_fetcher = InfoFetcher(self.spark, information_schema=self.information_schema)
table_list = info_fetcher.get_tables_info(
self.catalogs, self.schemas, self.tables, self.data_source_formats
catalogs=self.catalogs,
schemas=self.schemas,
tables=self.tables,
data_source_formats=self.data_source_formats,
)
catalogs = set(map(lambda x: x.catalog, table_list))
schemas = set(map(lambda x: f"{x.catalog}.{x.schema}", table_list))
Expand Down
1 change: 1 addition & 0 deletions discoverx/table_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ def _get_table_list_sql(
if columns:
match_any_col = "|".join([f'({c.replace("*", ".*")})' for c in columns])
columns_sql = f"""AND regexp_like(column_name, "^{match_any_col}$")"""

data_source_formats_values = ",".join("'{0}'".format(f) for f in data_source_formats)

with_column_info_sql = f"""
Expand Down

0 comments on commit 44eccf6

Please sign in to comment.