Skip to content

Commit

Permalink
added fix
Browse files Browse the repository at this point in the history
  • Loading branch information
souravg-db2 committed Dec 21, 2023
1 parent 3387bee commit 3767133
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions discoverx/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ def _rule_matching_sql(self, table_info: TableInfo):
if not expressions:
raise Exception(f"There are no rules to scan for.")

catalog_str = f"{table_info.catalog}." if table_info.catalog else ""
catalog_str = f"`{table_info.catalog}`." if table_info.catalog else ""
matching_columns = [
f"INT(regexp_like(value, '{format_regex(r.definition)}')) AS `{r.name}`" for r in expressions
]
Expand Down Expand Up @@ -328,7 +328,7 @@ def _rule_matching_sql(self, table_info: TableInfo):
FROM (
SELECT
stack({len(cols)}, {unpivot_columns}) AS (column_name, value)
FROM {catalog_str}{table_info.schema}.{table_info.table}
FROM {catalog_str}`{table_info.schema}`.`{table_info.table}`
TABLESAMPLE ({self.sample_size} ROWS)
)
)
Expand Down

0 comments on commit 3767133

Please sign in to comment.