Skip to content

manage_metric_views: comment field ordering causes METRIC_VIEW_INVALID_VIEW_DEFINITION #402

@shuji-db

Description

@shuji-db

Bug Description

When using manage_metric_views with the create action and a comment field, the generated YAML places comment before source, causing a parse error:

METRIC_VIEW_INVALID_VIEW_DEFINITION: Missing required creator property 'source' (index 1)

Steps to Reproduce

Use manage_metric_views with create action including a comment field.

Actual Behavior

Generated YAML has incorrect field ordering:

version: 1.1
comment: "..."
source: catalog.schema.table

The parser expects source as the 2nd field (index 1), but comment appears there instead.

Expected Behavior

version: 1.1
source: catalog.schema.table
comment: "..."

Workaround

Using execute_sql with raw YAML (manually specifying correct field order) works as expected.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions