Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benpankow committed Aug 30, 2024
1 parent a306186 commit 4f2bcdc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def compute_cacheable_data(self) -> Sequence[AssetsDefinitionCacheableData]:
]
]

def build_assets(
def build_definitions(
self,
data: Sequence[AssetsDefinitionCacheableData],
) -> Sequence[AssetsDefinition]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def test_translator_dashboard_spec(workspace_data_api_mocks: None, workspace_id:
)
cacheable_asset = resource.build_assets()[0]
data = cacheable_asset.compute_cacheable_data()
all_assets = cacheable_asset.build_assets(data)
all_assets = cacheable_asset.build_definitions(data)

# 1 dashboard, 1 report, 1 semantic model, 2 data sources
assert len(all_assets) == 5
Expand Down Expand Up @@ -78,7 +78,7 @@ def test_refreshable_semantic_model(
)
cacheable_asset = resource.build_assets(enable_refresh_semantic_models=True)[0]
data = cacheable_asset.compute_cacheable_data()
all_assets = cacheable_asset.build_assets(data)
all_assets = cacheable_asset.build_definitions(data)

# 1 dashboard, 1 report, 1 semantic model, 2 data sources
assert len(all_assets) == 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ def test_translator_semantic_model(workspace_data: PowerBIWorkspaceData) -> None
assert asset_spec.tags == {"dagster/storage_kind": "powerbi"}
deps = list(asset_spec.deps)
assert len(deps) == 2
assert deps[0].asset_key == AssetKey(["data_27_09_2019.xlsx"])
assert deps[1].asset_key == AssetKey(["sales_marketing_datas.xlsx"])
assert deps[0].asset_key == AssetKey(["data_27_09_2019_xlsx"])
assert deps[1].asset_key == AssetKey(["sales_marketing_datas_xlsx"])


class MyCustomTranslator(DagsterPowerBITranslator):
Expand Down

0 comments on commit 4f2bcdc

Please sign in to comment.