Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(powerbi): Make report patterns configurable for PowerBIReportServer #12435

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
CORP_USER_INFO = "corpUserInfo"
OWNERSHIP = "ownership"
CORP_USER_KEY = "corpUserKey"
PLATFORM_NAME = "powerbi"

Check warning on line 69 in metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/constants.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/constants.py#L69

Added line #L69 was not covered by tests


API_ENDPOINTS = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,21 @@


class PowerBiReportServerDashboardSourceConfig(PowerBiReportServerAPIConfig):
platform_name: str = "powerbi"
platform_urn: str = builder.make_data_platform_urn(platform=platform_name)
report_pattern: AllowDenyPattern = AllowDenyPattern.allow_all()
chart_pattern: AllowDenyPattern = AllowDenyPattern.allow_all()
platform_name: str = pydantic.Field(

Check warning on line 111 in metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py#L111

Added line #L111 was not covered by tests
default=Constant.PLATFORM_NAME, hidden_from_docs=True
)
platform_urn: str = pydantic.Field(

Check warning on line 114 in metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py#L114

Added line #L114 was not covered by tests
default=builder.make_data_platform_urn(platform=Constant.PLATFORM_NAME),
hidden_from_docs=True,
)
report_pattern: AllowDenyPattern = pydantic.Field(

Check warning on line 118 in metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py#L118

Added line #L118 was not covered by tests
default=AllowDenyPattern.allow_all(),
description="Regex patterns to filter PowerBI Reports in ingestion.",
)
chart_pattern: AllowDenyPattern = pydantic.Field(

Check warning on line 122 in metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py

View check run for this annotation

Codecov / codecov/patch

metadata-ingestion/src/datahub/ingestion/source/powerbi_report_server/report_server.py#L122

Added line #L122 was not covered by tests
default=AllowDenyPattern.allow_all(),
description="Regex patterns to filter PowerBI Charts in ingestion.",
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I'm not wrong, these two patterns are not used anywhere and so the feature actually requires further work.

Whether they were added as a sort of TODO or not, I don't know 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suspect they were added as a form of TODO. Added a check for the report_pattern, chart_pattern and platform_urn however are not used so deleted those.



def log_http_error(e: BaseException, message: str) -> Any:
Expand Down
Loading