Skip to content

Commit

Permalink
fix(tableau): assert error on parent name
Browse files Browse the repository at this point in the history
  • Loading branch information
sgomezvillamor committed Jan 20, 2025
1 parent aff5e16 commit 7c52f58
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions metadata-ingestion/src/datahub/ingestion/source/tableau/tableau.py
Original file line number Diff line number Diff line change
Expand Up @@ -1147,11 +1147,17 @@ def fetch_projects():
)
# Set parent project name
for _project_id, project in all_project_map.items():
if (
project.parent_id is not None
and project.parent_id in all_project_map
):
if project.parent_id is None:
continue

if project.parent_id in all_project_map:
project.parent_name = all_project_map[project.parent_id].name
else:
self.report.warning(

Check warning on line 1156 in metadata-ingestion/src/datahub/ingestion/source/tableau/tableau.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/tableau/tableau.py#L1156

Added line #L1156 was not covered by tests
"Incomplete project hierarchy",
f"Parent project {project.parent_id} missed. We need Site Administrator Explorer permissions. Therefore, removing references from child projects.",
)
project.parent_id = None

Check warning on line 1160 in metadata-ingestion/src/datahub/ingestion/source/tableau/tableau.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/tableau/tableau.py#L1160

Added line #L1160 was not covered by tests

def set_project_path():
def form_path(project_id: str) -> List[str]:
Expand Down

0 comments on commit 7c52f58

Please sign in to comment.