mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2026-01-06 20:47:06 +00:00
fix: logic for number of profiled tables (#11222)
* fix: logic for number of profiled tables * fix: python linting
This commit is contained in:
parent
d3d523e96d
commit
017fbc6a32
@ -62,9 +62,11 @@ class CliCommonDB:
|
||||
self, source_status: SourceStatus, sink_status: SinkStatus
|
||||
):
|
||||
self.assertTrue(len(source_status.failures) == 0)
|
||||
self.assertTrue(len(source_status.records) >= self.expected_tables())
|
||||
self.assertTrue(
|
||||
len(source_status.records) >= self.expected_profiled_tables()
|
||||
)
|
||||
self.assertTrue(len(sink_status.failures) == 0)
|
||||
self.assertTrue(len(sink_status.records) >= self.expected_tables())
|
||||
self.assertTrue(len(sink_status.records) >= self.expected_profiled_tables())
|
||||
sample_data = self.retrieve_sample_data(self.fqn_created_table()).sampleData
|
||||
lineage = self.retrieve_lineage(self.fqn_created_table())
|
||||
self.assertTrue(len(sample_data.rows) == self.inserted_rows_count())
|
||||
@ -195,11 +197,20 @@ class CliCommonDB:
|
||||
def _fqn_deleted_table() -> Optional[str]:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def _expected_profiled_tables() -> int:
|
||||
return None
|
||||
|
||||
def fqn_deleted_table(self) -> str:
|
||||
if self._fqn_deleted_table() is None:
|
||||
return self.fqn_created_table()
|
||||
return self._fqn_deleted_table() # type: ignore
|
||||
|
||||
def expected_profiled_tables(self) -> int:
|
||||
if self._expected_profiled_tables() is None:
|
||||
return self.expected_tables()
|
||||
return self._expected_profiled_tables()
|
||||
|
||||
@staticmethod
|
||||
@abstractmethod
|
||||
def expected_filtered_schema_includes() -> int:
|
||||
|
||||
@ -65,6 +65,10 @@ class BigqueryCliTest(CliCommonDB.TestSuite, SQACommonMethods):
|
||||
def view_column_lineage_count(self) -> int:
|
||||
return 2
|
||||
|
||||
@staticmethod
|
||||
def _expected_profiled_tables() -> int:
|
||||
return 2
|
||||
|
||||
@staticmethod
|
||||
def fqn_created_table() -> str:
|
||||
return "local_bigquery.open-metadata-beta.exclude_me.orders"
|
||||
|
||||
@ -63,6 +63,10 @@ class VerticaCliTest(CliCommonDB.TestSuite, SQACommonMethods):
|
||||
def expected_tables() -> int:
|
||||
return 16
|
||||
|
||||
@staticmethod
|
||||
def _expected_profiled_tables() -> int:
|
||||
return 12
|
||||
|
||||
def inserted_rows_count(self) -> int:
|
||||
return len(self.insert_data_queries)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user