diff --git a/docs/content/api/modules.json.gz b/docs/content/api/modules.json.gz index e79b2da88487c..b2756ad4a487f 100644 Binary files a/docs/content/api/modules.json.gz and b/docs/content/api/modules.json.gz differ diff --git a/docs/content/api/searchindex.json.gz b/docs/content/api/searchindex.json.gz index aacb354ace970..c011afbc2ad48 100644 Binary files a/docs/content/api/searchindex.json.gz and b/docs/content/api/searchindex.json.gz differ diff --git a/docs/content/api/sections.json.gz b/docs/content/api/sections.json.gz index 4fc9f175197c3..718a61060af89 100644 Binary files a/docs/content/api/sections.json.gz and b/docs/content/api/sections.json.gz differ diff --git a/docs/content/integrations/tableau.mdx b/docs/content/integrations/tableau.mdx index 2c4ef2c89da6a..417156c5ba6e7 100644 --- a/docs/content/integrations/tableau.mdx +++ b/docs/content/integrations/tableau.mdx @@ -109,7 +109,7 @@ from dagster_tableau import ( TableauCloudWorkspace, load_tableau_asset_specs, ) -from dagster_tableau.translator import TableauContentData, TableauContentType +from dagster_tableau.translator import TableauContentType, TableauTranslatorData import dagster as dg @@ -126,7 +126,7 @@ tableau_workspace = TableauCloudWorkspace( # A translator class lets us customize properties of the built # Tableau assets, such as the owners or asset key class MyCustomTableauTranslator(DagsterTableauTranslator): - def get_asset_spec(self, data: TableauContentData) -> dg.AssetSpec: + def get_asset_spec(self, data: TableauTranslatorData) -> dg.AssetSpec: # We create the default asset spec using super() default_spec = super().get_asset_spec(data) # We customize the metadata and asset key prefix for all assets, including sheets, @@ -143,7 +143,8 @@ class MyCustomTableauTranslator(DagsterTableauTranslator): tableau_specs = load_tableau_asset_specs( - tableau_workspace, dagster_tableau_translator=MyCustomTableauTranslator + tableau_workspace, + dagster_tableau_translator=MyCustomTableauTranslator(), ) defs = dg.Definitions(assets=[*tableau_specs], resources={"tableau": tableau_workspace}) ``` diff --git a/examples/docs_snippets/docs_snippets/integrations/tableau/customize-tableau-asset-defs.py b/examples/docs_snippets/docs_snippets/integrations/tableau/customize-tableau-asset-defs.py index e3af4a5b524dd..2b5d23c5d3d51 100644 --- a/examples/docs_snippets/docs_snippets/integrations/tableau/customize-tableau-asset-defs.py +++ b/examples/docs_snippets/docs_snippets/integrations/tableau/customize-tableau-asset-defs.py @@ -3,7 +3,7 @@ TableauCloudWorkspace, load_tableau_asset_specs, ) -from dagster_tableau.translator import TableauContentData, TableauContentType +from dagster_tableau.translator import TableauContentType, TableauTranslatorData import dagster as dg @@ -20,9 +20,9 @@ # A translator class lets us customize properties of the built # Tableau assets, such as the owners or asset key class MyCustomTableauTranslator(DagsterTableauTranslator): - def get_asset_spec(self, data: TableauContentData) -> dg.AssetSpec: + def get_asset_spec(self, data: TableauTranslatorData) -> dg.AssetSpec: # We create the default asset spec using super() - default_spec = super().get_asset_spec(data) # type: ignore + default_spec = super().get_asset_spec(data) # We customize the metadata and asset key prefix for all assets, including sheets, # and we customize the team owner tag only for sheets. return default_spec.replace_attributes( @@ -38,6 +38,6 @@ def get_asset_spec(self, data: TableauContentData) -> dg.AssetSpec: tableau_specs = load_tableau_asset_specs( tableau_workspace, - dagster_tableau_translator=MyCustomTableauTranslator, # type: ignore + dagster_tableau_translator=MyCustomTableauTranslator(), ) defs = dg.Definitions(assets=[*tableau_specs], resources={"tableau": tableau_workspace})