mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 03:46:10 +00:00
Minor: None query res check on table metrics (#16334)
* fix: None query res check on table metrics * style: ran python linting
This commit is contained in:
parent
5da85798c6
commit
4de6fae26e
@ -231,6 +231,8 @@ class OracleTableMetricComputer(BaseTableMetricComputer):
|
||||
)
|
||||
|
||||
res = self.runner._session.execute(query).first()
|
||||
if not res:
|
||||
return None
|
||||
if res.rowCount is None or (
|
||||
res.rowCount == 0 and self._entity.tableType == TableType.View
|
||||
):
|
||||
@ -260,6 +262,8 @@ class ClickHouseTableMetricComputer(BaseTableMetricComputer):
|
||||
)
|
||||
|
||||
res = self.runner._session.execute(query).first()
|
||||
if not res:
|
||||
return None
|
||||
if res.rowCount is None or (
|
||||
res.rowCount == 0 and self._entity.tableType == TableType.View
|
||||
):
|
||||
@ -306,6 +310,8 @@ class BigQueryTableMetricComputer(BaseTableMetricComputer):
|
||||
)
|
||||
|
||||
res = self.runner._session.execute(query).first()
|
||||
if not res:
|
||||
return None
|
||||
if res.rowCount is None or (
|
||||
res.rowCount == 0 and self._entity.tableType == TableType.View
|
||||
):
|
||||
@ -337,6 +343,8 @@ class BigQueryTableMetricComputer(BaseTableMetricComputer):
|
||||
where_clause,
|
||||
)
|
||||
res = self.runner._session.execute(query).first()
|
||||
if not res:
|
||||
return None
|
||||
if res.rowCount is None or (
|
||||
res.rowCount == 0 and self._entity.tableType == TableType.View
|
||||
):
|
||||
@ -366,6 +374,8 @@ class MySQLTableMetricComputer(BaseTableMetricComputer):
|
||||
)
|
||||
|
||||
res = self.runner._session.execute(query).first()
|
||||
if not res:
|
||||
return None
|
||||
if res.rowCount is None or (
|
||||
res.rowCount == 0 and self._entity.tableType == TableType.View
|
||||
):
|
||||
@ -400,6 +410,8 @@ class RedshiftTableMetricComputer(BaseTableMetricComputer):
|
||||
columns, self._build_table("svv_table_info", "pg_catalog"), where_clause
|
||||
)
|
||||
res = self.runner._session.execute(query).first()
|
||||
if not res:
|
||||
return None
|
||||
if res.rowCount is None or (
|
||||
res.rowCount == 0 and self._entity.tableType == TableType.View
|
||||
):
|
||||
|
Loading…
x
Reference in New Issue
Block a user