Onkar Ravgan b7e7625071
Convert dbt test result timestamps to millis (#13903)
* Fixed dbt test res time to millis

* added postgres migration
2023-11-10 16:15:16 +05:30

11 lines
364 B
SQL

--update the timestamps to millis for dbt test results
UPDATE data_quality_data_time_series dqdts
SET dqdts.json = JSON_INSERT(
JSON_REMOVE(dqdts.json, '$.timestamp'),
'$.timestamp',
JSON_EXTRACT(dqdts.json, '$.timestamp') * 1000
)
WHERE dqdts.extension = 'testCase.testCaseResult'
AND JSON_EXTRACT(dqdts.json, '$.timestamp') REGEXP '^[0-9]{10}$'
;