Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

185 lines
6.4 KiB
MySQL
Raw Permalink Normal View History

-- Data quality failure status extension time series
CREATE TABLE test_case_resolution_status_time_series (
id varchar(36) GENERATED ALWAYS AS (json_unquote(json_extract(json,'$.id'))) VIRTUAL NOT NULL,
stateId varchar(36) GENERATED ALWAYS AS (json_unquote(json_extract(json,'$.stateId'))) VIRTUAL NOT NULL,
assignee varchar(256) GENERATED ALWAYS AS (json_unquote(json_extract(json,'$.testCaseResolutionStatusDetails.assignee.name'))) VIRTUAL NULL,
timestamp bigint unsigned GENERATED ALWAYS AS (json_unquote(json_extract(json,'$.timestamp'))) VIRTUAL NOT NULL,
testCaseResolutionStatusType varchar(36) GENERATED ALWAYS AS (json_unquote(json_extract(json,'$.testCaseResolutionStatusType'))) VIRTUAL NOT NULL,
jsonSchema varchar(256) NOT NULL,
json json NOT NULL,
entityFQNHash varchar(768) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL,
CONSTRAINT test_case_resolution_status_unique_constraint UNIQUE (id,timestamp,entityFQNHash),
INDEX (id),
INDEX(testCaseResolutionStatusType),
INDEX(id, testCaseResolutionStatusType)
) DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- DataInsightsApplication should not allow configuration
update apps_marketplace
set json = JSON_INSERT(
JSON_REMOVE(json, '$.allowConfiguration'),
'$.allowConfiguration',
false
)
where name = 'DataInsightsApplication';
update installed_apps
set json = JSON_INSERT(
JSON_REMOVE(json, '$.allowConfiguration'),
'$.allowConfiguration',
false
)
where name = 'DataInsightsApplication';
-- Remove mssql connection from airflow db
UPDATE pipeline_service_entity pse
SET json = JSON_REMOVE(json, '$.connection.config.connection')
WHERE serviceType = 'Airflow'
AND JSON_EXTRACT(json, '$.connection.config.connection.type') = 'Mssql';
-- Rename NOOP Secret Manager to DB
update metadata_service_entity
set json = JSON_REPLACE(json, '$.connection.config.secretsManagerProvider', 'db')
where name = 'OpenMetadata'
and JSON_EXTRACT(json, '$.connection.config.secretsManagerProvider') = 'noop';
-- Clean old test connections
TRUNCATE automations_workflow;
-- update service type to UnityCatalog - update database entity
UPDATE database_entity de
SET de.json = JSON_INSERT(
JSON_REMOVE(de.json, '$.serviceType'),
'$.serviceType',
'UnityCatalog'
)
where id in (
select toId from entity_relationship er
where
fromEntity = 'databaseService'
and toEntity = 'database'
and fromId in (
select id from dbservice_entity dbe
where
serviceType = 'Databricks'
and JSON_EXTRACT(
dbe.json, '$.connection.config.useUnityCatalog'
) = true
));
-- update service type to UnityCatalog - update database schema entity
UPDATE database_schema_entity dse
SET dse.json = JSON_INSERT(
JSON_REMOVE(dse.json, '$.serviceType'),
'$.serviceType',
'UnityCatalog'
)
where JSON_EXTRACT(dse.json, '$.database.id') in (
select toId from entity_relationship er
where
fromEntity = 'databaseService'
and toEntity = 'database'
and fromId in (
select id from dbservice_entity dbe
where
serviceType = 'Databricks'
and JSON_EXTRACT(
dbe.json, '$.connection.config.useUnityCatalog'
) = true
));
-- update service type to UnityCatalog - update table entity
UPDATE table_entity te
SET te.json = JSON_INSERT(
JSON_REMOVE(te.json, '$.serviceType'),
'$.serviceType',
'UnityCatalog'
)
where JSON_EXTRACT(te.json, '$.database.id') in (
select toId from entity_relationship er
where
fromEntity = 'databaseService'
and toEntity = 'database'
and fromId in (
select id from dbservice_entity dbe
where
serviceType = 'Databricks'
and JSON_EXTRACT(
dbe.json, '$.connection.config.useUnityCatalog'
) = true
));
-- update service type to UnityCatalog - update db service entity
UPDATE dbservice_entity de
SET de.json = JSON_INSERT(
JSON_REMOVE(de.json, '$.connection.config.type'),
'$.connection.config.type',
'UnityCatalog'
),de.json = JSON_INSERT(
JSON_REMOVE(de.json, '$.serviceType'),
'$.serviceType',
'UnityCatalog'
)
WHERE de.serviceType = 'Databricks'
AND JSON_EXTRACT(de.json, '$.connection.config.useUnityCatalog') = True
;
-- remove `useUnityCatalog` flag from service connection details of databricks
UPDATE dbservice_entity de
SET de.json = JSON_REMOVE(de.json, '$.connection.config.useUnityCatalog')
WHERE de.serviceType IN ('Databricks','UnityCatalog');
-- Add Incident ID for test case results
ALTER TABLE data_quality_data_time_series ADD COLUMN incidentId varchar(36);
ALTER TABLE data_quality_data_time_series ADD INDEX data_quality_data_time_series_incidentId(incidentId);
-- Add new table for event subscription extensions
CREATE TABLE IF NOT EXISTS change_event_consumers (
id VARCHAR(36) NOT NULL,
extension VARCHAR(256) NOT NULL,
jsonSchema VARCHAR(256) NOT NULL,
json JSON NOT NULL,
timestamp BIGINT UNSIGNED GENERATED ALWAYS AS (json ->> '$.timestamp') NOT NULL,
UNIQUE(id, extension)
);
DELETE FROM event_subscription_entity ese where name = 'DataInsightReport';
-- Update Change Event Table
feat(ui): Data observability and notifications (#14806) * Centralize EventType * Format better for readability * Add Handling for Thread as Change Event * Centralize logic for Entity Message Creation * Add Thread Parent Message in Conversation * Add Task and Announcement * Support for multiple destinations * Delete existing alerts for schema changes * Delete all tables data for event subscription * Centralize logic for Notifications and Observability * Change Field Name and Remove redundant code * Test Fixes * Add more fields * Add Optional * Logical Test Case Addition Chnage Event * Add Filter By Owner * Fix Email Entity Url * added data observability settings page * localization changes for other languages * Handler closure and cleanup * complete create observibility flow * fix searchIndex method error * Update Entity Observability Filter * working observability creation * complete creation flow * fix action with arguments * fix form validations and form data formulation for 'input.actions' field * localization changes for other languages * Fixes for Data Observability * Add mention notification * Only apply mention to conversation * fIx test case * bug fixes for add and edit observability alert form functionality * fIx test case * add feature to config internal along with external destinations in alert form * Fix Formatting * Fix Url Redirection * add observability alert details page * localization changes for other languages * remove filter and action required rules * fix styling for observability form and details page * add delete functionality on observability alert details page * update view page layout and add a warning in configure destination step * localization changes for other languages * feat(ui): support notification with new flow (#14848) * feat(ui): support notification with new flow * fix notifications * add missing filters for notification alert creation flow * update the filter hiding logic to show at the start always * add check to show Actions section in observability alert creation form * code cleanup and improvements * add breadcrumb to add notification alert page * Add General Metadata Filters * remove code smells and code cleanup for add notification page * add new filter * show activity feed alert on notifications list page * add notification alert details page changes * localization changes for other languages * show icons for all the entities in the alert trigger dropdown * redirect to notification alert listing page after deleting the notification alert * change add alert page title * add logic to disable all destinations except email for users * fixed unit tests * code improvements and cleanups --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com>
2024-01-26 13:56:18 +05:30
ALTER TABLE change_event ADD COLUMN offset INT AUTO_INCREMENT, ADD PRIMARY KEY (offset);
CREATE TABLE IF NOT EXISTS consumers_dlq (
id VARCHAR(36) NOT NULL,
extension VARCHAR(256) NOT NULL,
json JSON NOT NULL,
timestamp BIGINT UNSIGNED GENERATED ALWAYS AS (json ->> '$.timestamp') NOT NULL,
UNIQUE(id, extension)
);
-- Add supportsQueryComment to MSSQL
update dbservice_entity
set json = JSON_SET(json, '$.connection.config.supportsQueryComment', true)
where serviceType = 'Mssql';
DELETE FROM event_subscription_entity;
feat(ui): Data observability and notifications (#14806) * Centralize EventType * Format better for readability * Add Handling for Thread as Change Event * Centralize logic for Entity Message Creation * Add Thread Parent Message in Conversation * Add Task and Announcement * Support for multiple destinations * Delete existing alerts for schema changes * Delete all tables data for event subscription * Centralize logic for Notifications and Observability * Change Field Name and Remove redundant code * Test Fixes * Add more fields * Add Optional * Logical Test Case Addition Chnage Event * Add Filter By Owner * Fix Email Entity Url * added data observability settings page * localization changes for other languages * Handler closure and cleanup * complete create observibility flow * fix searchIndex method error * Update Entity Observability Filter * working observability creation * complete creation flow * fix action with arguments * fix form validations and form data formulation for 'input.actions' field * localization changes for other languages * Fixes for Data Observability * Add mention notification * Only apply mention to conversation * fIx test case * bug fixes for add and edit observability alert form functionality * fIx test case * add feature to config internal along with external destinations in alert form * Fix Formatting * Fix Url Redirection * add observability alert details page * localization changes for other languages * remove filter and action required rules * fix styling for observability form and details page * add delete functionality on observability alert details page * update view page layout and add a warning in configure destination step * localization changes for other languages * feat(ui): support notification with new flow (#14848) * feat(ui): support notification with new flow * fix notifications * add missing filters for notification alert creation flow * update the filter hiding logic to show at the start always * add check to show Actions section in observability alert creation form * code cleanup and improvements * add breadcrumb to add notification alert page * Add General Metadata Filters * remove code smells and code cleanup for add notification page * add new filter * show activity feed alert on notifications list page * add notification alert details page changes * localization changes for other languages * show icons for all the entities in the alert trigger dropdown * redirect to notification alert listing page after deleting the notification alert * change add alert page title * add logic to disable all destinations except email for users * fixed unit tests * code improvements and cleanups --------- Co-authored-by: mohitdeuex <mohit.y@deuexsolutions.com> Co-authored-by: Mohit Yadav <105265192+mohityadav766@users.noreply.github.com> Co-authored-by: Aniket Katkar <aniketkatkar97@gmail.com>
2024-01-26 13:56:18 +05:30
DELETE FROM change_event_consumers;
DELETE FROM consumers_dlq;
Fix #14786: Suggestions API (#14821) * Fix #14786: Suggestions API * Handle suggestions in ometa * Minor: Optimise Databricks Client (#14776) * MINOR - Fix SP topology context & Looker usage context (#14816) * MINOR - Fix SP topology context & Looker usage context * MINOR - Fix SP topology context & Looker usage context * Fix tests * Fixes #14598: Fix Tags / Labels ingestion on includeTags as False (#14782) * fix(ui): password error message for char limits (#14808) * fix(ui): password error message for char limits * fix java side code * Fixes #13556: Support for Salesforce table description ingestion (#14733) * ISSUE-13556: Add suport for Salesforce table description ingestion * ISSUE-13556: Remove unnecessary blank line * ISSUE-13556: Fix to get description for each table --------- Co-authored-by: Teddy <teddy.crepineau@gmail.com> * MINOR - Better handling of Ingestion Pipeline Status (#14792) * MINOR - Better handling of Ingestion Pipeline Status * format * format * MINOR: Added table validation for cost analysis data (#14793) * Added validation for cost analysis source * centralized life cycle logic * CYPRESS: simplify side navigation click in cypress (#14818) * simplify side navigation click in cypress * make sidbar item uses common enum * fix cypress failure of outside import * fix(#14326): tier dropdown is not working in advance search (#14780) * improvement in advance search based on custom property * fix a reading undefined property issue * wip: advance search based on tier * some code cleanup and improvement * some fixes * fix: ui flicker when advanceSearched is apply and refresh the page * some cleanup * no need to call customproperty api call, if entity not suppport customProperties * minor change * fix: autocomplete not working in tier search option in advance search modal * added unit test for advance search provider component * some cleanup * added testcase for open modal * added testcase for resetAllFilters method * removed unwanted code * added e2e test for testing tier advance search * fix: e2e search flow for single field * fix: string field not working after giving listValues in TierSearch * fix: group query e2e test fix * used asyncFetch way to get the tierOptions synchronously * some cleanup * remove unwanted lines * some cleanup * fix: selected option show option value instead of option title * fix(minor): update skip icon for executions (#14809) * Fixes #14803: ignore capitalization when confirming deletes (#14804) * ignore case when confirming deletes * Test confirmation of deletes works when case differs Added test case for 'delete' as the confirmation text. * minor(config): update openmetadata-ui code reviewers (#14823) * Add Tests * Add list/accept/reject apis * initial ui changes * localisation * show suggestion for empty description * ui feedbacks * Fix permission check for entities without owner * Fix entityLink and add tests * Add update suggestion WIP * Fix test * Fix PUT and Pagination * Fix styling * update test * Update status * add OM server connection in apps * add permissions check * Fix CI * Remove TODO * Fix feedResourceTest * fix unit tests * add private configs for apps * add private configs for apps * fix update application icons * minor center align icon * add private configs for apps * Format * Fix pydantic gen * Remove token * Update name * Rework private conf * Fix apps * Fix apps * Format * Format * show metapilot only if its installed --------- Co-authored-by: Pere Miquel Brull <peremiquelbrull@gmail.com> Co-authored-by: Mayur Singal <39544459+ulixius9@users.noreply.github.com> Co-authored-by: Ayush Shah <ayush@getcollate.io> Co-authored-by: Chirag Madlani <12962843+chirag-madlani@users.noreply.github.com> Co-authored-by: kwgdaig <18678754+kwgdaig@users.noreply.github.com> Co-authored-by: Teddy <teddy.crepineau@gmail.com> Co-authored-by: Onkar Ravgan <onkar.10r@gmail.com> Co-authored-by: Ashish Gupta <ashish@getcollate.io> Co-authored-by: Abhishek Porwal <80886271+Abhishek332@users.noreply.github.com> Co-authored-by: Carlo Q <carlo@machina.bio> Co-authored-by: karanh37 <karanh37@gmail.com>
2024-01-31 18:51:09 -08:00
CREATE TABLE IF NOT EXISTS suggestions (
id VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.id') STORED NOT NULL,
fqnHash VARCHAR(256) NOT NULL COLLATE ascii_bin,
entityLink VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.entityLink') NOT NULL,
suggestionType VARCHAR(36) GENERATED ALWAYS AS (json_unquote(json ->> '$.type')) NOT NULL,
json JSON NOT NULL,
updatedAt BIGINT UNSIGNED GENERATED ALWAYS AS (json ->> '$.updatedAt') NOT NULL,
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.updatedBy') NOT NULL,
status VARCHAR(256) GENERATED ALWAYS AS (json_unquote(json -> '$.status')) NOT NULL,
PRIMARY KEY (id)
);
UPDATE ingestion_pipeline_entity SET json = JSON_SET(json, '$.provider', 'user')
WHERE JSON_EXTRACT(json, '$.name') = 'OpenMetadata_dataInsight';