We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9900ddb commit 60faf1cCopy full SHA for 60faf1c
1 file changed
elementary/monitor/data_monitoring/data_monitoring.py
@@ -79,8 +79,12 @@ def get_elementary_database_and_schema(self):
79
relation = self.internal_dbt_runner.run_operation(
80
"elementary_cli.get_elementary_database_and_schema", quiet=True
81
)[0]
82
- # Replace double quotes with backticks for proper SQL compatibility
83
- relation = relation.replace('"', "`") if relation else relation
+ # Split on dot and wrap each part in double quotes for standard SQL compatibility
+ 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
90
except Exception as ex:
0 commit comments