Skip to content

Commit

Permalink
Add debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
mminichino committed Mar 6, 2025
1 parent ac6ea5c commit 6bfe96a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1565,6 +1565,7 @@ def get_connection_objects(
query_filter: dict = {},
) -> Iterable[dict]:
query_filter = optimize_query_filter(query_filter)
logger.debug(f"Query filter {query_filter}")

Check warning on line 1568 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#L1568

Added line #L1568 was not covered by tests

# Calls the get_connection_object_page function to get the objects,
# and automatically handles pagination.
Expand All @@ -1574,6 +1575,7 @@ def get_connection_objects(
self.report.num_filter_queries_by_connection_type[connection_type] += len(
filter_pages
)
logger.debug(f"Filter pages {filter_pages}")

Check warning on line 1578 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#L1578

Added line #L1578 was not covered by tests

for filter_page in filter_pages:
has_next_page = 1
Expand Down Expand Up @@ -1616,6 +1618,9 @@ def emit_workbooks(self) -> Iterable[MetadataWorkUnit]:
connection_type=c.WORKBOOKS_CONNECTION,
page_size=self.config.effective_workbook_page_size,
):
logger.debug(

Check warning on line 1621 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#L1621

Added line #L1621 was not covered by tests
f"Evaluating project: {workbook.get(c.PROJECT_NAME)} workbook {workbook.get(c.NAME)}"
)
if workbook.get(c.PROJECT_NAME) not in project_names:
logger.debug(

Check warning on line 1625 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#L1624-L1625

Added lines #L1624 - L1625 were not covered by tests
f"Skipping workbook {workbook.get(c.NAME)} as project {workbook.get(c.PROJECT_NAME)} "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -946,12 +946,15 @@ def query_metadata_cursor_based_pagination(
after: Optional[str],
qry_filter: str = "",
) -> dict:
if qry_filter:
qry_filter = f", filter: {{ {qry_filter} }}"
logger.debug(f"qry_filter: {qry_filter}")

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

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/tableau/tableau_common.py#L949-L951

Added lines #L949 - L951 were not covered by tests
query = f"""
query GetItems(
$first: Int,
$after: String
) {{
{connection_name} ( first: $first, after: $after, filter:{{ {qry_filter} }})
{connection_name} ( first: $first, after: $after{qry_filter})
{{
nodes {main_query}
pageInfo {{
Expand Down

0 comments on commit 6bfe96a

Please sign in to comment.