mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-12-12 15:57:44 +00:00
Moved Delta Migrations to schemaChanges.sql (#16789)
This commit is contained in:
parent
0f2d3653f8
commit
927bf56738
@ -23,23 +23,3 @@ WHERE name IN (
|
||||
'columnValuesToBeBetween',
|
||||
'tableRowCountToBeBetween'
|
||||
);
|
||||
|
||||
-- Update DeltaLake service due to connection schema changes to enable DeltaLake ingestion from Storage
|
||||
UPDATE dbservice_entity dbse
|
||||
SET
|
||||
dbse.json = JSON_REMOVE(JSON_REMOVE(
|
||||
JSON_MERGE_PATCH(
|
||||
dbse.json,
|
||||
JSON_OBJECT(
|
||||
'connection', JSON_OBJECT(
|
||||
'config', JSON_OBJECT(
|
||||
'configSource', JSON_OBJECT(
|
||||
'connection', JSON_EXTRACT(dbse.json, '$.connection.config.metastoreConnection'),
|
||||
'appName', JSON_UNQUOTE(JSON_EXTRACT(dbse.json, '$.connection.config.appName'))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
, '$.connection.config.appName'), '$.connection.config.metastoreConnection')
|
||||
WHERE dbse.serviceType = 'DeltaLake';
|
||||
|
||||
@ -0,0 +1,19 @@
|
||||
-- Update DeltaLake service due to connection schema changes to enable DeltaLake ingestion from Storage
|
||||
UPDATE dbservice_entity dbse
|
||||
SET
|
||||
dbse.json = JSON_REMOVE(JSON_REMOVE(
|
||||
JSON_MERGE_PATCH(
|
||||
dbse.json,
|
||||
JSON_OBJECT(
|
||||
'connection', JSON_OBJECT(
|
||||
'config', JSON_OBJECT(
|
||||
'configSource', JSON_OBJECT(
|
||||
'connection', JSON_EXTRACT(dbse.json, '$.connection.config.metastoreConnection'),
|
||||
'appName', JSON_UNQUOTE(JSON_EXTRACT(dbse.json, '$.connection.config.appName'))
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
, '$.connection.config.appName'), '$.connection.config.metastoreConnection')
|
||||
WHERE dbse.serviceType = 'DeltaLake';
|
||||
@ -22,16 +22,3 @@ WHERE name IN (
|
||||
'columnValuesToBeBetween',
|
||||
'tableRowCountToBeBetween'
|
||||
);
|
||||
|
||||
-- Update DeltaLake service due to connection schema changes to enable DeltaLake ingestion from Storage
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSONB_SET(
|
||||
JSONB_SET(
|
||||
json,
|
||||
'{connection,config,configSource}',
|
||||
JSONB_BUILD_OBJECT('connection', json->'connection'->'config'->'metastoreConnection')
|
||||
),
|
||||
'{connection,config,configSource,appName}',
|
||||
json->'connection'->'config'->'appName'
|
||||
) #- '{connection,config,metastoreConnection}' #- '{connection,config,appName}'
|
||||
WHERE serviceType = 'DeltaLake';
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
-- Update DeltaLake service due to connection schema changes to enable DeltaLake ingestion from Storage
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSONB_SET(
|
||||
JSONB_SET(
|
||||
json,
|
||||
'{connection,config,configSource}',
|
||||
JSONB_BUILD_OBJECT('connection', json->'connection'->'config'->'metastoreConnection')
|
||||
),
|
||||
'{connection,config,configSource,appName}',
|
||||
json->'connection'->'config'->'appName'
|
||||
) #- '{connection,config,metastoreConnection}' #- '{connection,config,appName}'
|
||||
WHERE serviceType = 'DeltaLake';
|
||||
Loading…
x
Reference in New Issue
Block a user