Skip to content

Commit

Permalink
Fix impala migration query (#12809)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmbrull committed Aug 9, 2023
1 parent 5dc95e0 commit bbf2fdc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,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}';
Expand Down

0 comments on commit bbf2fdc

Please sign in to comment.