diff --git a/docs/content/api/modules.json.gz b/docs/content/api/modules.json.gz index e79b2da88487c..531da17ac9908 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..58a7399dcafbe 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..ef5d93e1c5eba 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/looker.mdx b/docs/content/integrations/looker.mdx index b901c8ad6e3d6..5f0cb32bfc6c7 100644 --- a/docs/content/integrations/looker.mdx +++ b/docs/content/integrations/looker.mdx @@ -93,8 +93,8 @@ By default, Dagster will generate asset specs for each Looker asset based on its ```python file=/integrations/looker/customize-looker-assets.py from dagster_looker import ( DagsterLookerApiTranslator, + LookerApiTranslatorStructureData, LookerResource, - LookerStructureData, LookerStructureType, load_looker_asset_specs, ) @@ -109,7 +109,9 @@ looker_resource = LookerResource( class CustomDagsterLookerApiTranslator(DagsterLookerApiTranslator): - def get_asset_spec(self, looker_structure: LookerStructureData) -> dg.AssetSpec: + def get_asset_spec( + self, looker_structure: LookerApiTranslatorStructureData + ) -> dg.AssetSpec: # We create the default asset spec using super() default_spec = super().get_asset_spec(looker_structure) # We customize the team owner tag for all assets, @@ -125,8 +127,7 @@ class CustomDagsterLookerApiTranslator(DagsterLookerApiTranslator): looker_specs = load_looker_asset_specs( - looker_resource, - dagster_looker_translator=CustomDagsterLookerApiTranslator, + looker_resource, dagster_looker_translator=CustomDagsterLookerApiTranslator() ) defs = dg.Definitions(assets=[*looker_specs], resources={"looker": looker_resource}) ``` diff --git a/examples/docs_snippets/docs_snippets/integrations/looker/customize-looker-assets.py b/examples/docs_snippets/docs_snippets/integrations/looker/customize-looker-assets.py index e10a286d8d6ba..23dff3a7cdfaa 100644 --- a/examples/docs_snippets/docs_snippets/integrations/looker/customize-looker-assets.py +++ b/examples/docs_snippets/docs_snippets/integrations/looker/customize-looker-assets.py @@ -1,7 +1,7 @@ from dagster_looker import ( DagsterLookerApiTranslator, + LookerApiTranslatorStructureData, LookerResource, - LookerStructureData, LookerStructureType, load_looker_asset_specs, ) @@ -16,9 +16,11 @@ class CustomDagsterLookerApiTranslator(DagsterLookerApiTranslator): - def get_asset_spec(self, looker_structure: LookerStructureData) -> dg.AssetSpec: + def get_asset_spec( + self, looker_structure: LookerApiTranslatorStructureData + ) -> dg.AssetSpec: # We create the default asset spec using super() - default_spec = super().get_asset_spec(looker_structure) # type: ignore + default_spec = super().get_asset_spec(looker_structure) # We customize the team owner tag for all assets, # and we customize the asset key prefix only for dashboards. return default_spec.replace_attributes( @@ -32,7 +34,6 @@ def get_asset_spec(self, looker_structure: LookerStructureData) -> dg.AssetSpec: looker_specs = load_looker_asset_specs( - looker_resource, - dagster_looker_translator=CustomDagsterLookerApiTranslator, # type: ignore + looker_resource, dagster_looker_translator=CustomDagsterLookerApiTranslator() ) defs = dg.Definitions(assets=[*looker_specs], resources={"looker": looker_resource}) diff --git a/python_modules/libraries/dagster-looker/dagster_looker/__init__.py b/python_modules/libraries/dagster-looker/dagster_looker/__init__.py index 73845344bad1d..534a0bfbe457f 100644 --- a/python_modules/libraries/dagster-looker/dagster_looker/__init__.py +++ b/python_modules/libraries/dagster-looker/dagster_looker/__init__.py @@ -5,6 +5,7 @@ ) from dagster_looker.api.dagster_looker_api_translator import ( DagsterLookerApiTranslator as DagsterLookerApiTranslator, + LookerApiTranslatorStructureData as LookerApiTranslatorStructureData, LookerStructureData as LookerStructureData, LookerStructureType as LookerStructureType, RequestStartPdtBuild as RequestStartPdtBuild,