File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -503,6 +503,7 @@ def to_sqlmesh(
503503 """Converts the dbt model into a SQLMesh model."""
504504 model_dialect = self .dialect (context )
505505 query = d .jinja_query (self .sql_no_config )
506+ kind = self .model_kind (context )
506507
507508 optional_kwargs : t .Dict [str , t .Any ] = {}
508509 physical_properties : t .Dict [str , t .Any ] = {}
@@ -521,7 +522,7 @@ def to_sqlmesh(
521522 partitioned_by .append (self ._big_query_partition_by_expr (context ))
522523 optional_kwargs ["partitioned_by" ] = partitioned_by
523524
524- if self .cluster_by :
525+ if self .cluster_by and not isinstance ( kind , ViewKind ) :
525526 clustered_by = []
526527 for c in self .cluster_by :
527528 try :
@@ -627,7 +628,6 @@ def to_sqlmesh(
627628 if physical_properties :
628629 model_kwargs ["physical_properties" ] = physical_properties
629630
630- kind = self .model_kind (context )
631631 allow_partials = model_kwargs .pop ("allow_partials" , None )
632632 if (
633633 allow_partials is None
You can’t perform that action at this time.
0 commit comments