diff --git a/docs/content/api/modules.json.gz b/docs/content/api/modules.json.gz index e79b2da88487c..fa0297e11889b 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..1a8e5bc6b83db 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..e0f438223a6c1 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/powerbi.mdx b/docs/content/integrations/powerbi.mdx index 5f9a81b736901..27f3b65bd2449 100644 --- a/docs/content/integrations/powerbi.mdx +++ b/docs/content/integrations/powerbi.mdx @@ -89,7 +89,7 @@ from dagster_powerbi import ( PowerBIWorkspace, load_powerbi_asset_specs, ) -from dagster_powerbi.translator import PowerBIContentData, PowerBIContentType +from dagster_powerbi.translator import PowerBIContentType, PowerBITranslatorData import dagster as dg @@ -106,7 +106,7 @@ power_bi_workspace = PowerBIWorkspace( # A translator class lets us customize properties of the built # Power BI assets, such as the owners or asset key class MyCustomPowerBITranslator(DagsterPowerBITranslator): - def get_asset_spec(self, data: PowerBIContentData) -> dg.AssetSpec: + def get_asset_spec(self, data: PowerBITranslatorData) -> dg.AssetSpec: # We create the default asset spec using super() default_spec = super().get_asset_spec(data) # We customize the team owner tag for all assets, @@ -122,8 +122,7 @@ class MyCustomPowerBITranslator(DagsterPowerBITranslator): power_bi_specs = load_powerbi_asset_specs( - power_bi_workspace, - dagster_powerbi_translator=MyCustomPowerBITranslator, + power_bi_workspace, dagster_powerbi_translator=MyCustomPowerBITranslator() ) defs = dg.Definitions( assets=[*power_bi_specs], resources={"power_bi": power_bi_workspace} diff --git a/examples/docs_snippets/docs_snippets/integrations/power-bi/customize-power-bi-asset-defs.py b/examples/docs_snippets/docs_snippets/integrations/power-bi/customize-power-bi-asset-defs.py index a20163dd0e82b..fccfd49b4834e 100644 --- a/examples/docs_snippets/docs_snippets/integrations/power-bi/customize-power-bi-asset-defs.py +++ b/examples/docs_snippets/docs_snippets/integrations/power-bi/customize-power-bi-asset-defs.py @@ -4,7 +4,7 @@ PowerBIWorkspace, load_powerbi_asset_specs, ) -from dagster_powerbi.translator import PowerBIContentData, PowerBIContentType +from dagster_powerbi.translator import PowerBIContentType, PowerBITranslatorData import dagster as dg @@ -21,9 +21,9 @@ # A translator class lets us customize properties of the built # Power BI assets, such as the owners or asset key class MyCustomPowerBITranslator(DagsterPowerBITranslator): - def get_asset_spec(self, data: PowerBIContentData) -> dg.AssetSpec: + def get_asset_spec(self, data: PowerBITranslatorData) -> 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 team owner tag for all assets, # and we customize the asset key prefix only for dashboards. return default_spec.replace_attributes( @@ -37,8 +37,7 @@ def get_asset_spec(self, data: PowerBIContentData) -> dg.AssetSpec: power_bi_specs = load_powerbi_asset_specs( - power_bi_workspace, - dagster_powerbi_translator=MyCustomPowerBITranslator, # type: ignore + power_bi_workspace, dagster_powerbi_translator=MyCustomPowerBITranslator() ) defs = dg.Definitions( assets=[*power_bi_specs], resources={"power_bi": power_bi_workspace} diff --git a/examples/project_atproto_dashboard/project_atproto_dashboard/dashboard/definitions.py b/examples/project_atproto_dashboard/project_atproto_dashboard/dashboard/definitions.py index ce66da2d7a266..a36cd1c874644 100644 --- a/examples/project_atproto_dashboard/project_atproto_dashboard/dashboard/definitions.py +++ b/examples/project_atproto_dashboard/project_atproto_dashboard/dashboard/definitions.py @@ -5,7 +5,7 @@ PowerBIWorkspace, load_powerbi_asset_specs, ) -from dagster_powerbi.translator import PowerBIContentData +from dagster_powerbi.translator import PowerBITranslatorData power_bi_workspace = PowerBIWorkspace( credentials=PowerBIServicePrincipal( @@ -18,22 +18,22 @@ class CustomDagsterPowerBITranslator(DagsterPowerBITranslator): - def get_report_spec(self, data: PowerBIContentData) -> dg.AssetSpec: + def get_report_spec(self, data: PowerBITranslatorData) -> dg.AssetSpec: return ( super() - .get_report_spec(data) # type: ignore + .get_report_spec(data) .replace_attributes( group_name="reporting", ) ) - def get_semantic_model_spec(self, data: PowerBIContentData) -> dg.AssetSpec: + def get_semantic_model_spec(self, data: PowerBITranslatorData) -> dg.AssetSpec: upsteam_table_deps = [ dg.AssetKey(table.get("name")) for table in data.properties.get("tables", []) ] return ( super() - .get_semantic_model_spec(data) # type: ignore + .get_semantic_model_spec(data) .replace_attributes( group_name="reporting", deps=upsteam_table_deps, @@ -43,7 +43,7 @@ def get_semantic_model_spec(self, data: PowerBIContentData) -> dg.AssetSpec: power_bi_specs = load_powerbi_asset_specs( power_bi_workspace, - dagster_powerbi_translator=CustomDagsterPowerBITranslator, # type: ignore + dagster_powerbi_translator=CustomDagsterPowerBITranslator(), ) defs = dg.Definitions(assets=[*power_bi_specs], resources={"power_bi": power_bi_workspace})