File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
elementary/monitor/data_monitoring Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,12 @@ 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- # Replace double quotes with backticks for proper SQL compatibility
83- relation = relation .replace ('"' , "`" ) if relation else relation
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 } "'
8488 logger .info (f"Elementary's database and schema: '{ relation } '" )
8589 return relation
8690 except Exception as ex :
You can’t perform that action at this time.
0 commit comments