From d42ed8a45c89103ff9b6843867013731af9b7d3d Mon Sep 17 00:00:00 2001 From: Patrick Yost <159199360+theyostalservice@users.noreply.github.com> Date: Wed, 11 Dec 2024 07:24:33 -0800 Subject: [PATCH] Add tags to SavedQueries (#1564) Adds tags to saved queries. This is modeled off of [this](https://github.com/dbt-labs/metricflow/pull/1334/files) PR. --- .changes/unreleased/Features-20241210-172725.yaml | 6 ++++++ metricflow/engine/models.py | 2 ++ 2 files changed, 8 insertions(+) create mode 100644 .changes/unreleased/Features-20241210-172725.yaml diff --git a/.changes/unreleased/Features-20241210-172725.yaml b/.changes/unreleased/Features-20241210-172725.yaml new file mode 100644 index 000000000..32886d48c --- /dev/null +++ b/.changes/unreleased/Features-20241210-172725.yaml @@ -0,0 +1,6 @@ +kind: Features +body: Adds tags to SavedQueries +time: 2024-12-10T17:27:25.368395-08:00 +custom: + Author: theyostalservice + Issue: None diff --git a/metricflow/engine/models.py b/metricflow/engine/models.py index ced963c8e..2b057cdc0 100644 --- a/metricflow/engine/models.py +++ b/metricflow/engine/models.py @@ -183,6 +183,7 @@ class SavedQuery: query_params: SavedQueryQueryParams metadata: Optional[Metadata] exports: Sequence[Export] + tags: Sequence[str] @classmethod def from_pydantic(cls, pydantic_saved_query: SemanticManifestSavedQuery) -> SavedQuery: @@ -194,4 +195,5 @@ def from_pydantic(cls, pydantic_saved_query: SemanticManifestSavedQuery) -> Save query_params=pydantic_saved_query.query_params, metadata=pydantic_saved_query.metadata, exports=pydantic_saved_query.exports, + tags=pydantic_saved_query.tags, )