Skip to content

Commit

Permalink
[dagster-sigma] Mark get_asset_key as deprecated in DagsterSigmaTrans…
Browse files Browse the repository at this point in the history
…lator (#26036)

## Summary & Motivation

Like #26028 but for Sigma

## Changelog

[dagster-sigma] `DagsterSigmaTranslator.get_asset_key` is deprecated in
favor of `DagsterSigmaTranslator.get_asset_spec().key`
  • Loading branch information
maximearmstrong authored Nov 25, 2024
1 parent c3b63cf commit d360e33
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from typing import AbstractSet, Any, Dict, List, Optional, Union

from dagster import AssetKey, AssetSpec, MetadataValue, TableSchema
from dagster._annotations import deprecated
from dagster._core.definitions.metadata.metadata_set import TableMetadataSet
from dagster._core.definitions.metadata.table import TableColumn
from dagster._record import record
Expand Down Expand Up @@ -97,6 +98,10 @@ def __init__(self, context: SigmaOrganizationData):
def organization_data(self) -> SigmaOrganizationData:
return self._context

@deprecated(
breaking_version="1.10",
additional_warn_text="Use `DagsterSigmaTranslator.get_asset_spec(...).key` instead",
)
def get_asset_key(self, data: Union[SigmaDataset, SigmaWorkbook]) -> AssetKey:
"""Get the AssetKey for a Sigma object, such as a workbook or dataset."""
return self.get_asset_spec(data).key
Expand Down

0 comments on commit d360e33

Please sign in to comment.