mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-30 20:06:19 +00:00
MINOR: fix bigquery profiler (#16933)
* fix: bigquery profiler cast creation_time from __TABLES__ to datetime * format * removed comment * format
This commit is contained in:
parent
43f46196a4
commit
da6da45373
@ -324,7 +324,7 @@ class BigQueryTableMetricComputer(BaseTableMetricComputer):
|
||||
columns = [
|
||||
Column("row_count").label("rowCount"),
|
||||
Column("size_bytes").label("sizeInBytes"),
|
||||
Column("creation_time").label("createDateTime"),
|
||||
func.TIMESTAMP_MILLIS(Column("creation_time")).label(CREATE_DATETIME),
|
||||
*self._get_col_names_and_count(),
|
||||
]
|
||||
where_clause = [
|
||||
@ -333,7 +333,6 @@ class BigQueryTableMetricComputer(BaseTableMetricComputer):
|
||||
Column("dataset_id") == self.schema_name,
|
||||
Column("table_id") == self.table_name,
|
||||
]
|
||||
|
||||
query = self._build_query(
|
||||
columns,
|
||||
self._build_table(
|
||||
|
@ -52,6 +52,7 @@ from metadata.profiler.metrics.core import (
|
||||
TMetric,
|
||||
)
|
||||
from metadata.profiler.metrics.static.row_count import RowCount
|
||||
from metadata.profiler.orm.functions.table_metric_computer import CREATE_DATETIME
|
||||
from metadata.profiler.orm.registry import NOT_COMPUTE
|
||||
from metadata.profiler.processor.metric_filter import MetricFilter
|
||||
from metadata.profiler.processor.sample_data_handler import upload_sample_data
|
||||
@ -579,7 +580,7 @@ class Profiler(Generic[TMetric]):
|
||||
]
|
||||
|
||||
raw_create_date: Optional[datetime] = self._table_results.get(
|
||||
"createDateTime"
|
||||
CREATE_DATETIME
|
||||
)
|
||||
if raw_create_date:
|
||||
raw_create_date = raw_create_date.replace(tzinfo=timezone.utc)
|
||||
|
Loading…
x
Reference in New Issue
Block a user