File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -544,6 +544,11 @@ def to_sqlmesh(
544544 "Ignoring cluster_by config for model '%s'; cluster_by is not supported for views." ,
545545 self .name ,
546546 )
547+ elif isinstance (kind , EmbeddedKind ):
548+ logger .warning (
549+ "Ignoring cluster_by config for model '%s'; cluster_by is not supported for embedded models." ,
550+ self .name ,
551+ )
547552 else :
548553 clustered_by = []
549554 for c in self .cluster_by :
Original file line number Diff line number Diff line change @@ -2074,6 +2074,17 @@ def test_model_cluster_by():
20742074 )
20752075 assert model .to_sqlmesh (context ).clustered_by == []
20762076
2077+ model = ModelConfig (
2078+ name = "model" ,
2079+ alias = "model" ,
2080+ package_name = "package" ,
2081+ target_schema = "test" ,
2082+ cluster_by = ["Bar" , "qux" ],
2083+ sql = "SELECT * FROM baz" ,
2084+ materialized = Materialization .EPHEMERAL .value ,
2085+ )
2086+ assert model .to_sqlmesh (context ).clustered_by == []
2087+
20772088
20782089def test_snowflake_dynamic_table ():
20792090 context = DbtContext ()
You can’t perform that action at this time.
0 commit comments