MINOR - remove owner and service field from ingestion pipeline (#17270)

* MINOR - remove owner and service field from ingestion pipeline

* MINOR - remove owner and service field from ingestion pipeline
This commit is contained in:
Pere Miquel Brull 2024-08-02 06:49:02 +02:00 committed by GitHub
parent f07daae196
commit b56f1d08a8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -225,5 +225,9 @@ UPDATE openmetadata_settings
SET json = JSON_SET(json, '$.templates', 'openmetadata')
WHERE configType = 'emailConfiguration';
ALTER TABLE thread_entity ADD COLUMN domain VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.domain');
-- remove dangling owner and service from ingestion pipelines. This info is in entity_relationship
UPDATE ingestion_pipeline_entity
SET json = JSON_REMOVE(json, '$.owner', '$.service');
ALTER TABLE thread_entity ADD COLUMN domain VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.domain');

View File

@ -206,5 +206,14 @@ UPDATE openmetadata_settings
SET json = jsonb_set(json, '{templates}', '"openmetadata"')
WHERE configType = 'emailConfiguration';
ALTER TABLE thread_entity ADD COLUMN domain VARCHAR(256) GENERATED ALWAYS AS (json ->> 'domain') STORED;
-- remove dangling owner and service from ingestion pipelines. This info is in entity_relationship
UPDATE ingestion_pipeline_entity
SET json = json::jsonb #- '{owner}'
WHERE json #> '{owner}' IS NOT NULL;
UPDATE ingestion_pipeline_entity
SET json = json::jsonb #- '{service}'
WHERE json #> '{service}' IS NOT NULL;
ALTER TABLE thread_entity ADD COLUMN domain VARCHAR(256) GENERATED ALWAYS AS (json ->> 'domain') STORED;