Pere Miquel Brull d8984d267e
#14340 & #13849 - Clean secret ID and improve encrypt/decrypt exception management (#14356)
* Fix supported characters in SM

* Update SM

* Fixes

* Fixes

* Improve class conversion exceptions

* Comments

* Rename noop to db secrets manager providee

* Update sm

* Fix

* db SM

* db SM

* Fix test

* UI

* Update openmetadata-ui/src/main/resources/ui/src/mocks/IngestionListTable.mock.ts

* update default
2023-12-18 06:43:20 +01:00

52 lines
2.1 KiB
SQL

-- Data quality failure status extension time series
CREATE TABLE test_case_resolution_status_time_series (
id varchar(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL,
stateId varchar(36) GENERATED ALWAYS AS (json ->> 'stateId') STORED NOT NULL,
assignee varchar(256) GENERATED ALWAYS AS (
CASE
WHEN json->'testCaseResolutionStatusDetails' IS NOT NULL AND
json->'testCaseResolutionStatusDetails'->'assignee' IS NOT NULL AND
json->'testCaseResolutionStatusDetails'->'assignee'->>'name' IS NOT NULL
THEN json->'testCaseResolutionStatusDetails'->'assignee'->>'name'
ELSE NULL
END
) STORED NULL,
timestamp bigint GENERATED ALWAYS AS ((json ->> 'timestamp')::bigint) STORED NOT NULL,
testCaseResolutionStatusType varchar(36) GENERATED ALWAYS AS (json ->> 'testCaseResolutionStatusType') STORED NOT NULL,
jsonSchema varchar(256) NOT NULL,
json jsonb NOT NULL,
entityFQNHash varchar(768) COLLATE "C" DEFAULT NULL,
CONSTRAINT test_case_resolution_status_unique_constraint UNIQUE (id, timestamp, entityFQNHash)
);
create index test_case_resolution_status_time_series_id on test_case_resolution_status_time_series (id);
create index test_case_resolution_status_time_series_status_type on test_case_resolution_status_time_series (testCaseResolutionStatusType);
create index test_case_resolution_status_time_series_id_status_type on test_case_resolution_status_time_series (id, testCaseResolutionStatusType);
-- DataInsightsApplication should not allow configuration
UPDATE apps_marketplace
SET json = jsonb_set(
json::jsonb,
'{allowConfiguration}',
to_jsonb(false)
)
where name = 'DataInsightsApplication';
UPDATE installed_apps
SET json = jsonb_set(
json::jsonb,
'{allowConfiguration}',
to_jsonb(false)
)
where name = 'DataInsightsApplication';
-- Rename NOOP Secret Manager to DB
update metadata_service_entity
set json = jsonb_set(
json #- '{connection,config,secretsManagerProvider}',
'{connection,config,secretsManagerProvider}',
'"db"',
true
)
where name = 'OpenMetadata'
and json #>> '{connection,config,secretsManagerProvider}' = 'noop';