From d0289903862084998891dc9153670af27917b433 Mon Sep 17 00:00:00 2001 From: Baris Terzioglu Date: Tue, 4 Feb 2025 15:50:27 +0100 Subject: [PATCH] skip views --- pkg/snowflake/operator.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/snowflake/operator.go b/pkg/snowflake/operator.go index c9603ff8..bb7304a2 100644 --- a/pkg/snowflake/operator.go +++ b/pkg/snowflake/operator.go @@ -202,6 +202,12 @@ func (o *MetadataOperator) Run(ctx context.Context, ti scheduler.TaskInstance) e return errors.New("no writer found in context, please create an issue for this: https://github.com/bruin-data/bruin/issues") } + // Skip metadata push for views + if ti.GetAsset().Materialization.Type == pipeline.MaterializationTypeView { + _, _ = writer.Write([]byte("\"Skipping metadata update: Column comments are not supported for Views.\n")) + return nil + } + err = client.PushColumnDescriptions(ctx, ti.GetAsset()) if err != nil { _, _ = writer.Write([]byte("Failed to push metadata to Snowflake, skipping...\n"))