Skip to content

Commit fc59d16

Browse files
committed
Fix: Replace double quotes with single quotes in elementary_database_and_schema
- Replace double quotes with single quotes for proper SQL compatibility - Fixes SQL errors in Slack alert messages when database/schema names contain quotes - Added conditional check to handle None values safely
1 parent 792cd1b commit fc59d16

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

elementary/monitor/data_monitoring/data_monitoring.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,8 @@ 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 single quotes for proper SQL compatibility
83+
relation = relation.replace('"', "'") if relation else relation
8284
logger.info(f"Elementary's database and schema: '{relation}'")
8385
return relation
8486
except Exception as ex:

0 commit comments

Comments
 (0)