File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -539,10 +539,11 @@ def to_sqlmesh(
539
539
optional_kwargs ["partitioned_by" ] = partitioned_by
540
540
541
541
if self .cluster_by :
542
- if isinstance (kind , ViewKind ):
542
+ if isinstance (kind , ( ViewKind , EmbeddedKind ) ):
543
543
logger .warning (
544
- "Ignoring cluster_by config for model '%s'; cluster_by is not supported for views ." ,
544
+ "Ignoring cluster_by config for model '%s'; cluster_by is not supported for %s ." ,
545
545
self .name ,
546
+ "views" if isinstance (kind , ViewKind ) else "ephemeral models" ,
546
547
)
547
548
else :
548
549
clustered_by = []
Original file line number Diff line number Diff line change @@ -2074,6 +2074,17 @@ def test_model_cluster_by():
2074
2074
)
2075
2075
assert model .to_sqlmesh (context ).clustered_by == []
2076
2076
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
+
2077
2088
2078
2089
def test_snowflake_dynamic_table ():
2079
2090
context = DbtContext ()
You can’t perform that action at this time.
0 commit comments