Skip to content

Commit da1246a

Browse files
author
Michael Schmid
committed
Simplify by just stripping the "
1 parent 1fe1ed3 commit da1246a

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

elementary/monitor/data_monitoring/data_monitoring.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,10 @@ def get_elementary_database_and_schema(self):
7979
relation = self.internal_dbt_runner.run_operation(
8080
"elementary_cli.get_elementary_database_and_schema", quiet=True
8181
)[0]
82-
# Split on dot and wrap each part in double quotes for standard SQL compatibility
83-
if relation and "." in relation:
84-
db, schema = relation.split(".", 1)
85-
relation = f'"{db}"."{schema}"'
86-
elif relation:
87-
relation = f'"{relation}"'
88-
logger.info(f"Elementary's database and schema: '{relation}'")
89-
return relation
82+
# Strip quotes from relation to avoid case sensitivity issues and double-quoting
83+
strip_relation = relation.strip('"')
84+
logger.info(f"Elementary's database and schema: '{strip_relation}'")
85+
return strip_relation
9086
except Exception as ex:
9187
logger.error("Failed to parse Elementary's database and schema.")
9288
if self.tracking:

0 commit comments

Comments
 (0)