dagster
dagster copied to clipboard
[dagster-tableau] Use get_asset_spec().key in DagsterTableauTranslator
Summary & Motivation
Following an internal discussion here and product review here, get_asset_spec().key is the new recommended way to access the asset key in the Translator.
Asset keys can now be customized in a custom translator using replace_attributes, like:
class MyCustomTableauTranslator(DagsterTableauTranslator):
def get_asset_spec(self, data: TableauContentData) -> dg.AssetSpec:
default_spec = super().get_asset_spec(data)
return replace_attributes(
default_spec,
key=default_spec.key.with_prefix("prefix"),
)
This PR stack will be merged after #25941 lands, so that replace_attributes() can be called as AssetSpec().replace_attributes()
These changes will also be done to the following integrations:
- Power BI
- Sigma
- Looker
- dlt
- Sling
- sdf
We will need to rework dbt to use this pattern.
How I Tested These Changes
Updated unit test with BK
-
#26029
-
#26028
-
#26027
👈 (View in Graphite)
-
master
This stack of pull requests is managed by Graphite. Learn more about stacking.