OpenMetadata/bootstrap/sql/migrations/native/1.5.0/mysql/postDataMigrationSQLScript.sql
IceS2 f0049853ec
FIXES 14885: Initial deltalake implementation for s3 (#16665)
* Initial deltalake implementation for s3

* Fix styles

* Fix test_amundsen

* Fix UnitTests

* Fix Checkstyle

* Fix integration tests due to datalake client refactor

* Fix unit tests

* Fix tests

* Fix Integration DeltaLake Storage test

* Skip delta storage integration test for python 3.8

* DeltaLake JSONSchema changes migrations

* Update import name

* Add some comments based on sonarcloud suggestions

* Update DeltaLake documentation

* Resolve some comments
2024-06-20 12:08:21 +05:30

46 lines
1.5 KiB
SQL

-- matchEnum Test Definition Parameter for columnValuesToBeInSet
UPDATE test_definition
set json = JSON_MERGE_PRESERVE(
json,
'{"parameterDefinition": ['
'{"name": "matchEnum", "displayName": "Match enum", "description": "If enabled, validate that each value independently matches the enum.", "dataType": "BOOLEAN", "required": false, "optionValues": []}'
']}'
)
WHERE name = 'columnValuesToBeInSet'
AND JSON_LENGTH(json, '$.parameterDefinition') < 2;
-- Test Case dyanic test migration
UPDATE test_definition
SET json = JSON_SET(json, '$.supportsDynamicAssertion', true)
WHERE name IN (
'columnValueMaxToBeBetween',
'columnValueMeanToBeBetween',
'columnValueMedianToBeBetween',
'columnValueMinToBeBetween',
'columnValueStdDevToBeBetween',
'columnValuesLengthsToBeBetween',
'columnValuesSumToBeBetween',
'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';