Open albinkjellin opened 2 years ago
Describe the bug When running analyze Soda SQL does seem to disregard the schema. When comparing the implementation of SQL Server with postgres it seems to be missing the schema part.
This is from postgres:
def sql_columns_metadata_query(self, table_name: str) -> str: sql = (f"SELECT column_name, data_type, is_nullable \n" f"FROM information_schema.columns \n" f"WHERE lower(table_name) = '{table_name}'") if self.database: sql += f" \n AND table_catalog = '{self.database}'" if self.schema: sql += f" \n AND table_schema = '{self.schema}'" return sql
Compared to SQL Server:
def sql_columns_metadata_query(self, table_name: str) -> str: sql = (f"SELECT column_name, data_type, is_nullable \n" f"FROM INFORMATION_SCHEMA.COLUMNS \n" f"WHERE TABLE_NAME = '{table_name}'") return sql
This seems to explain the issue.
To Reproduce Steps to reproduce the behavior:
scan.yml
soda scan ...
Context Include your scan.yml or warehouse.yml when relevant
OS: Python Version: Soda SQL Version: Warehouse Type:
Describe the bug When running analyze Soda SQL does seem to disregard the schema. When comparing the implementation of SQL Server with postgres it seems to be missing the schema part.
This is from postgres:
Compared to SQL Server:
This seems to explain the issue.
To Reproduce Steps to reproduce the behavior:
scan.yml
soda scan ...
3 ...Context Include your scan.yml or warehouse.yml when relevant
OS: Python Version: Soda SQL Version: Warehouse Type: