@@ -106,7 +106,31 @@ def project_config_update(self):
106106 "models" : {
107107 "+incremental_strategy" : "insert_overwrite" ,
108108 "+partition_by" : "id" ,
109- }
109+ },
110+ }
111+
112+ @pytest .fixture (scope = "class" )
113+ def seeds (self ):
114+ return {
115+ "upsert_expected.csv" : fixtures .upsert_expected ,
116+ }
117+
118+ def test_incremental (self , project ):
119+ self .seed_and_run_twice ()
120+ util .check_relations_equal (project .adapter , ["overwrite_model" , "upsert_expected" ])
121+
122+
123+ # Only runs under SQL warehouse profile, but overrides compute at model level
124+ @pytest .mark .skip_profile ("databricks_uc_cluster" , "databricks_cluster" )
125+ class TestInsertOverwriteWithModelComputeOverride (IncrementalBase ):
126+ @pytest .fixture (scope = "class" )
127+ def project_config_update (self ):
128+ return {
129+ "models" : {
130+ "+incremental_strategy" : "insert_overwrite" ,
131+ "+partition_by" : "id" ,
132+ "+databricks_compute" : "alternate_uc_cluster" ,
133+ },
110134 }
111135
112136 @pytest .fixture (scope = "class" )
@@ -115,6 +139,12 @@ def seeds(self):
115139 "upsert_expected.csv" : fixtures .upsert_expected ,
116140 }
117141
142+ @pytest .fixture (scope = "class" )
143+ def models (self ):
144+ return {
145+ "overwrite_model.sql" : fixtures .base_model ,
146+ }
147+
118148 def test_incremental (self , project ):
119149 self .seed_and_run_twice ()
120150 util .check_relations_equal (project .adapter , ["overwrite_model" , "upsert_expected" ])
0 commit comments