Skip to content

Commit

Permalink
add saved query resource type (#10168)
Browse files Browse the repository at this point in the history
* add saved query resource type

* nits
  • Loading branch information
ChenyuLInx authored May 21, 2024
1 parent 09243d1 commit 6813007
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .changes/unreleased/Fixes-20240516-223510.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
kind: Fixes
body: Add resource type to saved_query
time: 2024-05-16T22:35:10.287514-07:00
custom:
Author: ChenyuLInx
Issue: "10168"
4 changes: 3 additions & 1 deletion core/dbt/artifacts/resources/v1/saved_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

import time
from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
from typing import Any, Dict, List, Literal, Optional

from dbt_semantic_interfaces.type_enums.export_destination_type import (
ExportDestinationType,
)

from dbt.artifacts.resources.base import GraphResource
from dbt.artifacts.resources.types import NodeType
from dbt.artifacts.resources.v1.components import DependsOn, RefArgs
from dbt.artifacts.resources.v1.semantic_layer_components import (
SourceFileMetadata,
Expand Down Expand Up @@ -82,6 +83,7 @@ class SavedQueryMandatory(GraphResource):

@dataclass
class SavedQuery(SavedQueryMandatory):
resource_type: Literal[NodeType.SavedQuery]
description: Optional[str] = None
label: Optional[str] = None
metadata: Optional[SourceFileMetadata] = None
Expand Down

0 comments on commit 6813007

Please sign in to comment.