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(ingest/glue): add info in report #12470

Merged
merged 2 commits into from
Jan 27, 2025
Merged
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
2 changes: 2 additions & 0 deletions metadata-ingestion/src/datahub/ingestion/source/aws/glue.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ def platform_validator(cls, v: str) -> str:

@dataclass
class GlueSourceReport(StaleEntityRemovalSourceReport):
catalog_id: Optional[str] = None
tables_scanned = 0
filtered: List[str] = dataclass_field(default_factory=list)
databases: EntityFilterReport = EntityFilterReport.field(type="database")
Expand Down Expand Up @@ -686,6 +687,7 @@ def get_all_databases(self) -> Iterable[Mapping[str, Any]]:
# see https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/glue/paginator/GetDatabases.html
paginator = self.glue_client.get_paginator("get_databases")

self.report.catalog_id = self.source_config.catalog_id
Copy link
Contributor

Choose a reason for hiding this comment

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

Given this is a fixed value from the config, what's the value of having it in the report?

If valuable, could it be moved closer to the initialization of the GlueSourceReport? perhaps here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It is valuable because we don't always have a static report. Customers can be getting this from a parameter store and running it via python sdk

Copy link
Contributor

Choose a reason for hiding this comment

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

Makes sense, thanks for explaining!

Not in the scope of this PR, this may be generalized to automatically include source/sink configs in the report, excluding/masking secrets, ofc

if self.source_config.catalog_id:
paginator_response = paginator.paginate(
CatalogId=self.source_config.catalog_id
Expand Down
Loading