mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-16 04:57:11 +00:00
Add Airflow Migrations for IAM RDS connection (#12259)
* Add Migrations * Add not null * Resolve comments
This commit is contained in:
parent
dbb5013dc1
commit
93c405365b
@ -344,4 +344,18 @@ SET json = JSON_INSERT(
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'tableCustomSQLQuery';
|
||||
WHERE name = 'tableCustomSQLQuery';
|
||||
|
||||
-- Modify migrations for service connection of airflow to move password under authType if
|
||||
-- Connection Type as Mysql or Postgres
|
||||
|
||||
UPDATE pipeline_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.password'),
|
||||
'$.connection.config.connection.authType',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.authType.password',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.password'))
|
||||
where serviceType = 'Airflow'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') in ('Postgres', 'Mysql')
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.password') IS NOT NULL;
|
||||
|
@ -177,3 +177,18 @@ set json = jsonb_set(
|
||||
'[{"name":"sqlExpression","displayName":"SQL Expression","description":"SQL expression to run against the table","dataType":"STRING","required":"true"},{"name":"strategy","displayName":"Strategy","description":"Strategy to use to run the custom SQL query (i.e. `SELECT COUNT(<col>)` or `SELECT <col> (defaults to ROWS)","dataType":"ARRAY","optionValues":["ROWS","COUNT"],"required":false},{"name":"threshold","displayName":"Threshold","description":"Threshold to use to determine if the test passes or fails (defaults to 0).","dataType":"NUMBER","required":false}]'
|
||||
)
|
||||
where name = 'tableCustomSQLQuery';
|
||||
|
||||
-- Modify migrations for service connection of airflow to move password under authType if
|
||||
-- Connection Type as Mysql or Postgres
|
||||
|
||||
UPDATE pipeline_service_entity
|
||||
SET json = jsonb_set(
|
||||
json #-'{connection,config,connection,password}',
|
||||
'{connection,config,connection,authType}',
|
||||
jsonb_build_object('password',json#>'{connection,config,connection,password}')
|
||||
)
|
||||
WHERE serviceType = 'Airflow'
|
||||
and json#>'{connection,config,connection,type}' IN ('"Mysql"', '"Postgres"')
|
||||
and json#>'{connection,config,connection,password}' is not null;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user