mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-31 20:51:26 +00:00
MINOR: Fix cost analysis build failing for postgres (#20122)
This commit is contained in:
parent
70183eb11d
commit
46947277c4
@ -5,13 +5,13 @@ WHERE json->>'type' IS NOT NULL;
|
||||
-- Query Cost History Time Series
|
||||
CREATE TABLE query_cost_time_series (
|
||||
id varchar(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL,
|
||||
cost real GENERATED ALWAYS AS (json ->> 'cost') STORED NOT NULL,
|
||||
count int GENERATED ALWAYS AS (json ->> 'count') STORED NOT NULL,
|
||||
cost real GENERATED ALWAYS AS ((json ->> 'cost')::real) STORED NOT NULL,
|
||||
count float GENERATED ALWAYS AS ((json ->> 'count')::float) STORED NOT NULL,
|
||||
timestamp bigint GENERATED ALWAYS AS ((json ->> 'timestamp')::bigint) STORED NOT NULL,
|
||||
jsonSchema varchar(256) NOT NULL,
|
||||
json jsonb NOT NULL,
|
||||
entityFQNHash varchar(768) COLLATE "C" DEFAULT NULL,
|
||||
CONSTRAINT query_cost_unique_constraint UNIQUE (id, timestamp, entityFQNHash)
|
||||
CONSTRAINT query_cost_unique_constraint UNIQUE (timestamp, entityFQNHash)
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS query_cost_time_series_id on query_cost_time_series (id);
|
||||
CREATE INDEX IF NOT EXISTS query_cost_time_series_id_timestamp on test_case_resolution_status_time_series (id, timestamp);
|
@ -5186,8 +5186,8 @@ public interface CollectionDAO {
|
||||
value =
|
||||
"INSERT INTO <table>(entityFQNHash, jsonSchema, json) "
|
||||
+ "VALUES (:entityFQNHash, :jsonSchema, (:json :: jsonb)) "
|
||||
+ "ON CONFLICT (entityFQNHash, timestamp)"
|
||||
+ "DO UPDATE SET"
|
||||
+ "ON CONFLICT (entityFQNHash, timestamp) "
|
||||
+ "DO UPDATE SET "
|
||||
+ "json = EXCLUDED.json",
|
||||
connectionType = POSTGRES)
|
||||
void insertWithoutExtension(
|
||||
|
@ -16,6 +16,7 @@ public class Migration extends MigrationProcessImpl {
|
||||
@Override
|
||||
@SneakyThrows
|
||||
public void runDataMigration() {
|
||||
initializeWorkflowHandler();
|
||||
updateGovernanceWorkflowDefinitions();
|
||||
updateDataInsightsApplication();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user