Skip to content

Commit

Permalink
fix(ingest/powerbi): use dataset workspace id as key for parent conta…
Browse files Browse the repository at this point in the history
…iner
  • Loading branch information
looppi committed Oct 12, 2023
1 parent 84bba4d commit ea488fa
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,11 @@ def to_datahub_dataset(
dataset.tags,
)

dataset.workspace_key = workspace.get_workspace_key(
platform_name=self.__config.platform_name,
platform_instance=self.__config.platform_instance,
workspace_id_as_urn_part=self.__config.workspace_id_as_urn_part,
)
self.processed_datasets.add(dataset)

return dataset_mcps
Expand Down Expand Up @@ -760,7 +765,7 @@ def generate_container_for_dataset(
container_work_units = gen_containers(
container_key=dataset_key,
name=dataset.name if dataset.name else dataset.id,
parent_container_key=self.workspace_key,
parent_container_key=dataset.workspace_key,
sub_types=[BIContainerSubTypes.POWERBI_DATASET],
)
return container_work_units
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class PowerBIDataset:
tables: List["Table"]
tags: List[str]
configuredBy: Optional[str] = None
workspace_key: Optional[ContainerKey] = None

def get_urn_part(self):
return f"datasets.{self.id}"
Expand Down

0 comments on commit ea488fa

Please sign in to comment.