Skip to content

Commit

Permalink
Added more filtering on initial checks
Browse files Browse the repository at this point in the history
  • Loading branch information
edurdevic committed Nov 8, 2023
1 parent 895722a commit 7d2d9ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion discoverx/dx.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def __init__(

def _can_read_columns_table(self) -> bool:
try:
self.spark.sql(f"SELECT * FROM {self.INFORMATION_SCHEMA}.columns WHERE table_catalog = 'system' LIMIT 1")
self.spark.sql(
f"SELECT * FROM {self.INFORMATION_SCHEMA}.columns WHERE table_catalog = 'system' AND table_schema = 'columns' LIMIT 1"
)
return True
except Exception as e:
self.logger.error(f"Error while reading table {self.INFORMATION_SCHEMA}.columns: {e}")
Expand Down

0 comments on commit 7d2d9ff

Please sign in to comment.