Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dagster-tableau] Use get_asset_spec().key in DagsterTableauTranslator #26027

Merged

Conversation

maximearmstrong
Copy link
Contributor

@maximearmstrong maximearmstrong commented Nov 20, 2024

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

@maximearmstrong maximearmstrong force-pushed the maxime/use-get-asset-spec-key-in-tableau-translator branch from 7c1d54d to c274578 Compare November 20, 2024 17:58
@maximearmstrong maximearmstrong force-pushed the maxime/use-get-asset-spec-key-in-tableau-translator branch from c274578 to 3e70494 Compare November 25, 2024 19:08
@maximearmstrong maximearmstrong merged commit a77d4e8 into master Nov 25, 2024
1 check passed
@maximearmstrong maximearmstrong deleted the maxime/use-get-asset-spec-key-in-tableau-translator branch November 25, 2024 19:32
maximearmstrong added a commit that referenced this pull request Nov 25, 2024
…26035)

## Summary & Motivation

Like #26027 but for Sigma

## How I Tested These Changes

Updated unit test with BK
maximearmstrong added a commit that referenced this pull request Nov 25, 2024
#26051)

## Summary & Motivation

Like #26027 but for Power BI

## How I Tested These Changes

Updated unit test with BK
maximearmstrong added a commit that referenced this pull request Nov 25, 2024
…or (#26048)

## Summary & Motivation

Like #26027 but for Looker API

## How I Tested These Changes

Updated unit test with BK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants