chore: import upstream snapshot with attribution
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / Detect Changes (push) Has been cancelled
Integration Tests - MySQL + Elasticsearch / integration-tests-mysql-elasticsearch (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + Elasticsearch + Redis / integration-tests-postgres-elasticsearch-redis (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / Detect Changes (push) Has been cancelled
Integration Tests - PostgreSQL + OpenSearch / integration-tests-postgres-opensearch (push) Has been cancelled
Java Checkstyle / java-checkstyle (push) Has been cancelled
Maven Collate Tests / maven-collate-ci (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests-status (push) Has been cancelled
Publish Package to Maven Central Repository / publish-maven-packages (push) Has been cancelled
OpenMetadata Service Unit Tests / Detect Changes (push) Has been cancelled
OpenMetadata Service Unit Tests / openmetadata-service-unit-tests (push) Has been cancelled
OpenMetadata Service Unit Tests / k8s_operator-unit-tests (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,388 @@
|
||||
-- Start of Test Definition Parameter Definition Validation Migration
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValue',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'The {minValue} value for the column entry. If minValue is not included, maxValue is treated as upperBound and there will be no minimum',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValue',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValue',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'The {maxValue} value for the column entry. if maxValue is not included, minValue is treated as lowerBound and there will be no maximum',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValue',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValuesToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValueForMaxInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected minimum value in the column to be greater or equal than',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValueForMaxInCol',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValueForMaxInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected maximum value in the column to be lower or equal than',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValueForMaxInCol',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValueMaxToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValueForMeanInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected mean value for the column to be greater or equal than',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValueForMeanInCol',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValueForMeanInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected mean value for the column to be lower or equal than',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValueForMeanInCol',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValueMeanToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValueForMedianInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected median value for the column to be greater or equal than',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValueForMedianInCol',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValueForMedianInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected median value for the column to be lower or equal than',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValueForMedianInCol',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValueMedianToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValueForMinInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected minimum value in the column to be greater or equal than',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValueForMinInCol',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValueForMinInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expect minimum value in the column to be lower or equal than',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValueForMeanInCol',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValueMinToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minLength',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'The {minLength} for the column value. If minLength is not included, maxLength is treated as upperBound and there will be no minimum value length',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxLength',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxLength',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'The {maxLength} for the column value. if maxLength is not included, minLength is treated as lowerBound and there will be no maximum value length',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minLength',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValueLengthsToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValueForColSum',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected sum of values in the column to be greater or equal than',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValueForColSum',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValueForColSum',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected sum values in the column to be lower or equal than',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValueForColSum',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValuesSumToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValueForStdDevInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected std. dev value for the column to be greater or equal than',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValueForStdDevInCol',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValueForStdDevInCol',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected std. dev value for the column to be lower or equal than',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValueForStdDevInCol',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'columnValueStdDevToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minColValue',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected number of columns should be greater than or equal to {minValue}. If minValue is not included, maxValue is treated as upperBound and there will be no minimum number of column',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxColValue',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxColValue',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected number of columns should be less than or equal to {maxValue}. If maxValue is not included, minValue is treated as lowerBound and there will be no maximum number of column',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minColValue',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'tableColumnCountToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'minValue',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected number of columns should be greater than or equal to {minValue}. If minValue is not included, maxValue is treated as upperBound and there will be no minimum',
|
||||
'displayName', 'Min',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'maxValue',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'maxValue',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Expected number of columns should be less than or equal to {maxValue}. If maxValue is not included, minValue is treated as lowerBound and there will be no maximum',
|
||||
'displayName', 'Max',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'minValue',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'tableRowCountToBeBetween';
|
||||
|
||||
UPDATE test_definition
|
||||
set json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.parameterDefinition'),
|
||||
'$.parameterDefinition',
|
||||
JSON_ARRAY(
|
||||
JSON_OBJECT(
|
||||
'name', 'min',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Lower Bound of the Count',
|
||||
'displayName', 'Min Row Count',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'max',
|
||||
'rule', 'LESS_THAN_OR_EQUALS'
|
||||
)
|
||||
),
|
||||
JSON_OBJECT(
|
||||
'name', 'max',
|
||||
'dataType', 'INT',
|
||||
'required', false,
|
||||
'description', 'Upper Bound of the Count',
|
||||
'displayName', 'Max Row Count',
|
||||
'optionValues', JSON_ARRAY(),
|
||||
'validationRule', JSON_OBJECT(
|
||||
'parameterField', 'min',
|
||||
'rule', 'GREATER_THAN_OR_EQUALS'
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
WHERE name = 'tableRowInsertedCountToBeBetween';
|
||||
-- End of Test Definition Parameter Definition Validation Migration
|
||||
|
||||
-- Start of updating existing customLogoConfiguration config with new customUiThemePreference
|
||||
UPDATE openmetadata_settings AS ui
|
||||
JOIN openmetadata_settings AS logo
|
||||
ON ui.configType = 'customUiThemePreference' AND logo.configType = 'customLogoConfiguration'
|
||||
SET
|
||||
ui.json = JSON_OBJECT(
|
||||
'customLogoConfig', JSON_OBJECT(
|
||||
'customLogoUrlPath', JSON_UNQUOTE(JSON_EXTRACT(logo.json, '$.customLogoUrlPath')),
|
||||
'customFaviconUrlPath', JSON_UNQUOTE(JSON_EXTRACT(logo.json, '$.customFaviconUrlPath')),
|
||||
'customMonogramUrlPath', JSON_UNQUOTE(JSON_EXTRACT(logo.json, '$.customMonogramUrlPath'))
|
||||
),
|
||||
'customTheme', JSON_OBJECT(
|
||||
'primaryColor', '',
|
||||
'errorColor', '',
|
||||
'successColor', '',
|
||||
'warningColor', '',
|
||||
'infoColor', ''
|
||||
)
|
||||
)
|
||||
WHERE ui.configType = 'customUiThemePreference';
|
||||
|
||||
DELETE from openmetadata_settings where configType = 'customLogoConfiguration';
|
||||
-- End of updating customUiThemePreference config
|
||||
@@ -0,0 +1,329 @@
|
||||
-- Add the supportsProfiler field to the MongoDB connection configuration
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSON_INSERT(json, '$.connection.config.supportsProfiler', TRUE)
|
||||
WHERE serviceType = 'MongoDB';
|
||||
|
||||
-- Queries should be unique:
|
||||
-- 1. Remove duplicate queries from entity_relationship
|
||||
-- 2. Remove duplicate queries from query_entity
|
||||
-- 3. Add checksum with unique constraint
|
||||
ALTER TABLE query_entity ADD COLUMN checksum VARCHAR
|
||||
(32) GENERATED ALWAYS AS
|
||||
(json ->> '$.checksum') NOT NULL;
|
||||
|
||||
with duplicated as (
|
||||
select
|
||||
id,
|
||||
ROW_NUMBER() OVER (PARTITION BY checksum ORDER BY id) AS rn
|
||||
FROM query_entity
|
||||
)
|
||||
DELETE FROM entity_relationship
|
||||
where toEntity = 'query' and toId in (
|
||||
select id from duplicated where rn > 1
|
||||
);
|
||||
|
||||
with duplicated as (
|
||||
select
|
||||
id,
|
||||
ROW_NUMBER() OVER (PARTITION BY checksum ORDER BY id) AS rn
|
||||
FROM query_entity
|
||||
)
|
||||
DELETE FROM query_entity where id in (
|
||||
select id from duplicated where rn > 1
|
||||
);
|
||||
|
||||
ALTER TABLE query_entity ADD CONSTRAINT unique_query_checksum UNIQUE (checksum);
|
||||
|
||||
UPDATE query_entity SET json = JSON_INSERT(json, '$.checksum', MD5(JSON_UNQUOTE(checksum)));
|
||||
|
||||
-- Restructure dbServiceNames in ingestion_pipeline_entity
|
||||
update ingestion_pipeline_entity set json =
|
||||
JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.sourceConfig.config.dbServiceNames'),
|
||||
'$.sourceConfig.config.lineageInformation',
|
||||
JSON_OBJECT(
|
||||
'dbServiceNames',
|
||||
JSON_EXTRACT(json, '$.sourceConfig.config.dbServiceNames')
|
||||
)
|
||||
)
|
||||
where
|
||||
JSON_EXTRACT(json, '$.sourceConfig.config.type') in ('DashboardMetadata', 'PipelineMetadata')
|
||||
AND JSON_EXTRACT(json, '$.sourceConfig.config.dbServiceNames') is not null;
|
||||
|
||||
|
||||
ALTER TABLE chart_entity ADD INDEX index_chart_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE dashboard_data_model_entity ADD INDEX index_dashboard_data_model_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE dashboard_entity ADD INDEX index_dashboard_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE data_insight_chart ADD INDEX index_data_insight_chart_deleted(fqnHash, deleted);
|
||||
ALTER TABLE database_entity ADD INDEX index_database_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE database_schema_entity ADD INDEX index_database_schema_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE glossary_term_entity ADD INDEX index_glossary_term_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE ingestion_pipeline_entity ADD INDEX index_ingestion_pipeline_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE metric_entity ADD INDEX index_metric_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE ml_model_entity ADD INDEX index_ml_model_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE pipeline_entity ADD INDEX index_pipeline_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE policy_entity ADD INDEX index_policy_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE report_entity ADD INDEX index_report_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE search_index_entity ADD INDEX index_search_index_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE storage_container_entity ADD INDEX index_storage_container_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE stored_procedure_entity ADD INDEX index_stored_procedure_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE table_entity ADD INDEX index_table_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE tag ADD INDEX index_tag_deleted(fqnHash, deleted);
|
||||
ALTER TABLE test_case ADD INDEX index_test_case_deleted(fqnHash, deleted);
|
||||
ALTER TABLE test_suite ADD INDEX index_test_suite_deleted(fqnHash, deleted);
|
||||
ALTER TABLE topic_entity ADD INDEX index_topic_entity_deleted(fqnHash, deleted);
|
||||
ALTER TABLE web_analytic_event ADD INDEX index_web_analytic_event_deleted(fqnHash, deleted);
|
||||
|
||||
ALTER TABLE apps_marketplace ADD INDEX index_apps_marketplace_deleted(nameHash, deleted);
|
||||
ALTER TABLE bot_entity ADD INDEX index_bot_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE classification ADD INDEX index_classification_deleted(nameHash, deleted);
|
||||
ALTER TABLE dashboard_service_entity ADD INDEX index_dashboard_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE dbservice_entity ADD INDEX index_dbservice_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE glossary_entity ADD INDEX index_glossary_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE installed_apps ADD INDEX index_installed_apps_deleted(nameHash, deleted);
|
||||
ALTER TABLE kpi_entity ADD INDEX index_kpi_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE messaging_service_entity ADD INDEX index_messaging_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE metadata_service_entity ADD INDEX index_metadata_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE mlmodel_service_entity ADD INDEX index_mlmodel_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE pipeline_service_entity ADD INDEX index_pipeline_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE role_entity ADD INDEX index_role_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE search_service_entity ADD INDEX index_search_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE storage_service_entity ADD INDEX index_storage_service_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE team_entity ADD INDEX index_team_entity_deleted(nameHash, deleted);
|
||||
ALTER TABLE user_entity ADD INDEX index_user_entity_deleted(nameHash, deleted);
|
||||
|
||||
ALTER TABLE apps_extension_time_series ADD INDEX apps_extension_time_series_index(appId);
|
||||
ALTER TABLE suggestions ADD INDEX index_suggestions_type(suggestionType);
|
||||
ALTER TABLE suggestions ADD INDEX index_suggestions_status(status);
|
||||
|
||||
|
||||
-- Add the supportsProfiler field to the DynamoDB connection configuration
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSON_INSERT(json, '$.connection.config.supportsProfiler', TRUE)
|
||||
WHERE serviceType = 'DynamoDB';
|
||||
|
||||
-- Migrate 'QlikSenseDataModel' & 'QlikCloudDataModel' into single entity 'QlikDataModel'
|
||||
UPDATE dashboard_data_model_entity
|
||||
SET json = JSON_SET(json, '$.dataModelType', 'QlikDataModel')
|
||||
WHERE JSON_EXTRACT(json, '$.dataModelType') in ('QlikSenseDataModel', 'QlikCloudDataModel');
|
||||
|
||||
-- clean ES pipelines
|
||||
DELETE FROM ingestion_pipeline_entity
|
||||
WHERE LOWER(JSON_EXTRACT(json, '$.pipelineType')) = 'elasticsearchreindex';
|
||||
|
||||
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.sslCA'),
|
||||
'$.connection.config.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.sslCA')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.sslKey'),
|
||||
'$.connection.config.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.sslKey')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.sslCert'),
|
||||
'$.connection.config.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.sslCert'))
|
||||
where serviceType in ('Mysql', 'Doris') AND JSON_EXTRACT(json, '$.connection.config.sslCA') IS NOT NULL;
|
||||
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.sslConfig.certificatePath'),
|
||||
'$.connection.config.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.sslConfig.certificatePath')
|
||||
) where serviceType in ('Redshift', 'Postgres', 'Greenplum') and JSON_EXTRACT(json, '$.connection.config.sslConfig.certificatePath') is not null;
|
||||
|
||||
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.metastoreConnection.sslCA'),
|
||||
'$.connection.config.metastoreConnection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.metastoreConnection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.metastoreConnection.sslCA')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.metastoreConnection.sslKey'),
|
||||
'$.connection.config.metastoreConnection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.metastoreConnection.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.metastoreConnection.sslKey')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.metastoreConnection.sslCert'),
|
||||
'$.connection.config.metastoreConnection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.metastoreConnection.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.metastoreConnection.sslCert'))
|
||||
|
||||
where serviceType = 'Hive'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.metastoreConnection.type') = 'Mysql'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.metastoreConnection.sslCA') IS NOT NULL;
|
||||
|
||||
UPDATE dbservice_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.metastoreConnection.sslConfig.certificatePath'),
|
||||
'$.connection.config.metastoreConnection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.metastoreConnection.sslConfig.certificatePath'))
|
||||
where serviceType = 'Hive'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.metastoreConnection.type') = 'Postgres'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.metastoreConnection.sslConfig.certificatePath') IS NOT NULL;
|
||||
|
||||
UPDATE dashboard_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslCA'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslCA')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslKey'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslKey')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslCert'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslCert'))
|
||||
|
||||
where serviceType = 'Superset'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Mysql'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.sslCA') IS NOT NULL;
|
||||
|
||||
UPDATE dashboard_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslConfig.certificatePath'),
|
||||
'$.connection.config.connection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslConfig.certificatePath'))
|
||||
where serviceType = 'Superset'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Postgres'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.sslConfig.certificatePath') IS NOT NULL;
|
||||
|
||||
|
||||
UPDATE metadata_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslCA'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslCA')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslKey'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslKey')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslCert'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslCert'))
|
||||
|
||||
where serviceType = 'Alation'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Mysql'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.sslCA') IS NOT NULL;
|
||||
|
||||
|
||||
UPDATE metadata_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslConfig.certificatePath'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslConfig.certificatePath'))
|
||||
where serviceType = 'Alation'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Postgres'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.sslConfig.certificatePath') IS NOT NULL;
|
||||
|
||||
|
||||
UPDATE dashboard_service_entity
|
||||
SET json = JSON_REMOVE(json,'$.connection.config.certificates.stagingDir'), json = JSON_INSERT(JSON_REMOVE(json,'$.connection.config.certificates.rootCertificateData'), '$.connection.config.certificates.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.certificates.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.certificates.rootCertificateData')), json = JSON_INSERT(JSON_REMOVE(json,'$.connection.config.certificates.clientCertificateData'), '$.connection.config.certificates.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.certificates.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.certificates.clientCertificateData')),
|
||||
json = JSON_INSERT(JSON_REMOVE(json,'$.connection.config.certificates.clientKeyCertificateData'), '$.connection.config.certificates.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.certificates.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.certificates.clientKeyCertificateData'))
|
||||
|
||||
where lower(serviceType) = 'qliksense'
|
||||
and JSON_EXTRACT(json, '$.connection.config.certificates.rootCertificateData') is not null;
|
||||
|
||||
|
||||
|
||||
UPDATE pipeline_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslCA'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslCA')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslKey'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslKey')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslCert'),
|
||||
'$.connection.config.connection.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.connection.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslCert'))
|
||||
|
||||
where serviceType = 'Airflow'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Mysql'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.sslCA') IS NOT NULL;
|
||||
|
||||
UPDATE pipeline_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.connection.sslConfig.certificatePath'),
|
||||
'$.connection.config.connection.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.connection.sslConfig.certificatePath'))
|
||||
where serviceType = 'Airflow'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Postgres'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.connection.sslConfig.certificatePath') IS NOT NULL;
|
||||
|
||||
UPDATE pipeline_service_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.SSLCALocation'),
|
||||
'$.connection.config.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.sslConfig.caCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.SSLCALocation')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.SSLKeyLocation'),
|
||||
'$.connection.config.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.sslConfig.sslKey',
|
||||
JSON_EXTRACT(json, '$.connection.config.SSLKeyLocation')), json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.connection.config.SSLCertificateLocation'),
|
||||
'$.connection.config.sslConfig',
|
||||
JSON_OBJECT(),
|
||||
'$.connection.config.sslConfig.sslCertificate',
|
||||
JSON_EXTRACT(json, '$.connection.config.SSLCertificateLocation'))
|
||||
|
||||
where serviceType = 'OpenLineage'
|
||||
AND JSON_EXTRACT(json, '$.connection.config.SSLCALocation') IS NOT NULL;
|
||||
|
||||
-- Change viewDefinition to schemaDefinition
|
||||
UPDATE table_entity
|
||||
SET json = JSON_INSERT(
|
||||
JSON_REMOVE(json, '$.viewDefinition'),
|
||||
'$.schemaDefinition',
|
||||
JSON_EXTRACT(json, '$.viewDefinition')
|
||||
);
|
||||
|
||||
UPDATE table_entity SET json = JSON_REMOVE(json, '$.testSuite');
|
||||
|
||||
-- Clean up QRTZ tables
|
||||
delete from QRTZ_SIMPLE_TRIGGERS;
|
||||
delete from QRTZ_CRON_TRIGGERS;
|
||||
delete from QRTZ_TRIGGERS;
|
||||
delete from QRTZ_LOCKS;
|
||||
delete from QRTZ_SCHEDULER_STATE;
|
||||
delete from QRTZ_JOB_DETAILS;
|
||||
delete from QRTZ_FIRED_TRIGGERS;
|
||||
|
||||
DELETE from event_subscription_entity where name = 'ActivityFeedAlert';
|
||||
Reference in New Issue
Block a user