Update databaseServiceMetadataPipeline.json (#22518)

* Update databaseServiceMetadataPipeline.json

markDeletedSchemas and markDeletedDatabases should be false by default

* add migrations

---------

Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com>
Co-authored-by: sonika-shah <58761340+sonika-shah@users.noreply.github.com>
This commit is contained in:
Sriharsha Chintalapani 2025-07-23 02:14:18 -07:00 committed by GitHub
parent be7304b652
commit e3ba945630
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 18 additions and 3 deletions

View File

@ -17,3 +17,10 @@ DELETE from doc_store where name = 'reset-link' and entityType = 'EmailTemplate'
-- In case 1.7.3 migrations executed , with --force , remove it from server_logs as it is covered in this migration
DELETE FROM SERVER_CHANGE_LOG WHERE version = '1.7.3';
-- Update ingestion pipeline configurations to set markDeletedSchemas and markDeletedDatabases to false
UPDATE ingestion_pipeline_entity
SET json = JSON_SET(
JSON_SET(json, '$.sourceConfig.config.markDeletedSchemas', false),
'$.sourceConfig.config.markDeletedDatabases', false
)
WHERE JSON_EXTRACT(json, '$.sourceConfig.config.type') = 'DatabaseMetadata';

View File

@ -16,4 +16,12 @@ CREATE INDEX IF NOT EXISTS idx_index_mapping_versions_updatedAt ON index_mapping
DELETE from doc_store where name = 'reset-link' and entityType = 'EmailTemplate';
-- In case 1.7.3 migrations executed , with --force , remove it from server_logs as it is covered in this migration
DELETE FROM SERVER_CHANGE_LOG WHERE version = '1.7.3';
DELETE FROM SERVER_CHANGE_LOG WHERE version = '1.7.3';
-- Update ingestion pipeline configurations to set markDeletedSchemas and markDeletedDatabases to false
UPDATE ingestion_pipeline_entity
SET json = jsonb_set(
jsonb_set(json::jsonb, '{sourceConfig,config,markDeletedSchemas}', 'false'::jsonb),
'{sourceConfig,config,markDeletedDatabases}', 'false'::jsonb
)::json
WHERE json::jsonb -> 'sourceConfig' -> 'config' ->> 'type' = 'DatabaseMetadata';

View File

@ -63,13 +63,13 @@
"markDeletedSchemas": {
"description": "Optional configuration to soft delete schemas in OpenMetadata if the source schemas are deleted. Also, if the schema is deleted, all the associated entities like tables, views, stored procedures, lineage, etc., with that schema will be deleted",
"type": "boolean",
"default": true,
"default": false,
"title": "Mark Deleted Schemas"
},
"markDeletedDatabases": {
"description": "Optional configuration to soft delete databases in OpenMetadata if the source databases are deleted. Also, if the database is deleted, all the associated entities like schemas, tables, views, stored procedures, lineage, etc., with that database will be deleted",
"type": "boolean",
"default": true,
"default": false,
"title": "Mark Deleted Databases"
},
"includeTables": {