Skip to content

Commit 34b875e

Browse files
Merge pull request #1987 from mschmidoev/fix/replace-double-quotes-with-single-quotes
Fix: Properly quote database and schema identifiers for SQL compatibility
2 parents e938870 + a4d5a1c commit 34b875e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

elementary/monitor/data_monitoring/data_monitoring.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +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-
logger.info(f"Elementary's database and schema: '{relation}'")
83-
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
8486
except Exception as ex:
8587
logger.error("Failed to parse Elementary's database and schema.")
8688
if self.tracking:

0 commit comments

Comments
 (0)