diff --git a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py index 28af83929c..470e28a8a1 100644 --- a/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py +++ b/metadata-ingestion/src/datahub/ingestion/source/sql/sql_common.py @@ -123,6 +123,7 @@ def make_sqlalchemy_uri( class SQLSourceReport(SourceReport): tables_scanned: int = 0 views_scanned: int = 0 + entities_profiled: int = 0 filtered: List[str] = field(default_factory=list) query_combiner: Optional[SQLAlchemyQueryCombinerReport] = None @@ -138,6 +139,9 @@ class SQLSourceReport(SourceReport): else: raise KeyError(f"Unknown entity {ent_type}.") + def report_entity_profiled(self, name: str) -> None: + self.entities_profiled += 1 + def report_dropped(self, ent_name: str) -> None: self.filtered.append(ent_name) @@ -642,12 +646,12 @@ class SQLAlchemySource(Source): dataset_name = self.get_identifier( schema=schema, entity=table, inspector=inspector ) - self.report.report_entity_scanned(f"profile of {dataset_name}") if not sql_config.profile_pattern.allowed(dataset_name): self.report.report_dropped(f"profile of {dataset_name}") continue + self.report.report_entity_profiled(dataset_name) yield GEProfilerRequest( pretty_name=dataset_name, batch_kwargs=self.prepare_profiler_args(schema=schema, table=table),