Fix impala migration query (#12809)

This commit is contained in:
Pere Miquel Brull 2023-08-09 09:41:41 +02:00 committed by GitHub
parent 2b214190c7
commit 71df43fdab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View File

@ -36,7 +36,8 @@ WHERE serviceType in ('Snowflake') AND JSON_EXTRACT(json, '$.connection.config.i
UPDATE dbservice_entity
SET json = JSON_REPLACE(json, '$.connection.config.scheme', 'hive')
WHERE JSON_EXTRACT(json, '$.connection.config.scheme') IN ('impala', 'impala4');
WHERE JSON_EXTRACT(json, '$.connection.config.scheme') IN ('impala', 'impala4')
AND serviceType = 'Hive';
-- remove the dataModel references from Data Models
UPDATE dashboard_data_model_entity

View File

@ -32,7 +32,8 @@ where serviceType in ('Snowflake') and json#>'{connection,config,includeTempTabl
update dbservice_entity
set json = jsonb_set(json::jsonb, '{connection,config,scheme}', '"hive"')
where json#>>'{connection,config,scheme}' in ('impala', 'impala4');
where json#>>'{connection,config,scheme}' in ('impala', 'impala4')
and serviceType = 'Hive';
-- remove the dataModel references from Data Models
UPDATE dashboard_data_model_entity SET json = json #- '{dataModels}';