@@ -39,9 +39,9 @@ def __init__(self, strProjectCode, strTestSuiteId, strTestSuite, strSQLFlavor, m
3939 def _get_rollup_scores_sql (self ) -> CRollupScoresSQL :
4040 if not self ._rollup_scores_sql :
4141 self ._rollup_scores_sql = CRollupScoresSQL (self .test_run_id , self .table_groups_id )
42-
42+
4343 return self ._rollup_scores_sql
44-
44+
4545 def _ReplaceParms (self , strInputString ):
4646 strInputString = strInputString .replace ("{MAX_QUERY_CHARS}" , str (self .max_query_chars ))
4747 strInputString = strInputString .replace ("{TEST_RUN_ID}" , self .test_run_id )
@@ -51,6 +51,7 @@ def _ReplaceParms(self, strInputString):
5151 strInputString = strInputString .replace ("{TABLE_GROUPS_ID}" , self .table_groups_id )
5252
5353 strInputString = strInputString .replace ("{SQL_FLAVOR}" , self .flavor )
54+ strInputString = strInputString .replace ("{ID_SEPARATOR}" , "`" if self .flavor == "databricks" else '"' )
5455 strInputString = strInputString .replace ("{CONCAT_OPERATOR}" , self .concat_operator )
5556
5657 strInputString = strInputString .replace ("{SCHEMA_NAME}" , self .target_schema )
@@ -71,8 +72,9 @@ def _ReplaceParms(self, strInputString):
7172
7273 strInputString = replace_templated_functions (strInputString , self .flavor )
7374
74- # Adding escape character where ':' is referenced
75- strInputString = strInputString .replace (":" , "\\ :" )
75+ if self .flavor != "databricks" :
76+ # Adding escape character where ':' is referenced
77+ strInputString = strInputString .replace (":" , "\\ :" )
7678
7779 return strInputString
7880
@@ -110,12 +112,12 @@ def PushTestRunStatusUpdateSQL(self):
110112 def FinalizeTestSuiteUpdateSQL (self ):
111113 strQ = self ._ReplaceParms (read_template_sql_file ("ex_update_test_suite.sql" , "execution" ))
112114 return strQ
113-
115+
114116 def CalcPrevalenceTestResultsSQL (self ):
115117 return self ._ReplaceParms (read_template_sql_file ("ex_calc_prevalence_test_results.sql" , "execution" ))
116118
117119 def TestScoringRollupRunSQL (self ):
118120 return self ._get_rollup_scores_sql ().GetRollupScoresTestRunQuery ()
119-
121+
120122 def TestScoringRollupTableGroupSQL (self ):
121123 return self ._get_rollup_scores_sql ().GetRollupScoresTestTableGroupQuery ()
0 commit comments