Skip to content

Commit

Permalink
Update post review
Browse files Browse the repository at this point in the history
  • Loading branch information
maximearmstrong committed Jan 2, 2025
1 parent 36b3031 commit ef04d84
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,6 @@ def get_semantic_model_spec(self, data: PowerBIContentData) -> dg.AssetSpec:
power_bi_specs = load_powerbi_asset_specs(
power_bi_workspace,
dagster_powerbi_translator=CustomDagsterPowerBITranslator,
)

defs = dg.Definitions(assets=[*power_bi_specs], resources={"power_bi": power_bi_workspace})
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,15 @@ def test_translator_custom_metadata_legacy(
credentials=PowerBIToken(api_token=fake_token),
workspace_id=workspace_id,
)
all_asset_specs = load_powerbi_asset_specs(
workspace=resource,
dagster_powerbi_translator=MyCustomTranslator,
use_workspace_scan=False,
)
with pytest.warns(
DeprecationWarning,
match=r"Support of `dagster_powerbi_translator` as a Type\[DagsterPowerBITranslator\]",
):
all_asset_specs = load_powerbi_asset_specs(
workspace=resource,
dagster_powerbi_translator=MyCustomTranslator,
use_workspace_scan=False,
)
asset_spec = next(spec for spec in all_asset_specs)

assert "custom" in asset_spec.metadata
Expand Down

0 comments on commit ef04d84

Please sign in to comment.