File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -449,6 +449,7 @@ def to_sqlmesh(
449449 """Converts the dbt model into a SQLMesh model."""
450450 model_dialect = self .dialect (context )
451451 query = d .jinja_query (self .sql_no_config )
452+ kind = self .model_kind (context )
452453
453454 optional_kwargs : t .Dict [str , t .Any ] = {}
454455 physical_properties : t .Dict [str , t .Any ] = {}
@@ -467,7 +468,7 @@ def to_sqlmesh(
467468 partitioned_by .append (self ._big_query_partition_by_expr (context ))
468469 optional_kwargs ["partitioned_by" ] = partitioned_by
469470
470- if self .cluster_by :
471+ if self .cluster_by and not isinstance ( kind , ViewKind ) :
471472 clustered_by = []
472473 for c in self .cluster_by :
473474 try :
@@ -573,7 +574,6 @@ def to_sqlmesh(
573574 if physical_properties :
574575 model_kwargs ["physical_properties" ] = physical_properties
575576
576- kind = self .model_kind (context )
577577 allow_partials = model_kwargs .pop ("allow_partials" , None )
578578 if (
579579 allow_partials is None
You can’t perform that action at this time.
0 commit comments