-
Notifications
You must be signed in to change notification settings - Fork 996
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix #12779: Add support for SearchIndexes for ElasticSearch and OpenS…
…earch (#12782) * Fix #12779: Add support for SearchIndexes for ElasticSearch and OpenSearch * Fix #12779: Add support for SearchIndexes for ElasticSearch and OpenSearch * Fix #12779: Add support for SearchIndexes for ElasticSearch and OpenSearch * Rebase fixes with main * Add Sample Data * lint fix * remove unused import * Fix service count test --------- Co-authored-by: ulixius9 <mayursingal9@gmail.com>
- Loading branch information
Showing
34 changed files
with
3,129 additions
and
62 deletions.
There are no files selected for viewing
24 changes: 0 additions & 24 deletions
24
bootstrap/sql/com.mysql.cj.jdbc.Driver/v014__create_db_connection_info.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
bootstrap/sql/com.mysql.cj.jdbc.Driver/v015__create_db_connection_info.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,54 @@ | ||
-- column deleted not needed for entities that don't support soft delete | ||
ALTER TABLE query_entity DROP COLUMN deleted; | ||
ALTER TABLE event_subscription_entity DROP COLUMN deleted; | ||
|
||
-- create domain entity table | ||
CREATE TABLE IF NOT EXISTS domain_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.id') STORED NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.name') NOT NULL, | ||
fqnHash VARCHAR(256) 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, | ||
PRIMARY KEY (id), | ||
UNIQUE (fqnHash) | ||
); | ||
|
||
-- create data product entity table | ||
CREATE TABLE IF NOT EXISTS data_product_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.id') STORED NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.name') NOT NULL, | ||
fqnHash VARCHAR(256) 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, | ||
PRIMARY KEY (id), | ||
UNIQUE (fqnHash) | ||
); | ||
|
||
-- create search service entity | ||
CREATE TABLE IF NOT EXISTS search_service_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.id') STORED NOT NULL, | ||
nameHash VARCHAR(256) NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.name') NOT NULL, | ||
serviceType VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.serviceType') 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, | ||
deleted BOOLEAN GENERATED ALWAYS AS (json -> '$.deleted'), | ||
PRIMARY KEY (id), | ||
UNIQUE (nameHash) | ||
); | ||
|
||
-- create search index entity | ||
CREATE TABLE IF NOT EXISTS search_index_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> '$.id') STORED NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> '$.name') NOT NULL, | ||
fqnHash VARCHAR(256) 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, | ||
deleted BOOLEAN GENERATED ALWAYS AS (json -> '$.deleted'), | ||
PRIMARY KEY (id), | ||
UNIQUE (fqnHash) | ||
); |
26 changes: 1 addition & 25 deletions
26
bootstrap/sql/org.postgresql.Driver/v014__create_db_connection_info.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
bootstrap/sql/org.postgresql.Driver/v015__create_db_connection_info.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,54 @@ | ||
-- column deleted not needed for entities that don't support soft delete | ||
ALTER TABLE query_entity DROP COLUMN deleted; | ||
ALTER TABLE event_subscription_entity DROP COLUMN deleted; | ||
|
||
-- create domain entity table | ||
CREATE TABLE IF NOT EXISTS domain_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL, | ||
fqnHash VARCHAR(256) NOT NULL, | ||
json JSONB NOT NULL, | ||
updatedAt BIGINT GENERATED ALWAYS AS ((json ->> 'updatedAt')::bigint) STORED NOT NULL, | ||
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> 'updatedBy') STORED NOT NULL, | ||
PRIMARY KEY (id), | ||
UNIQUE (fqnHash) | ||
); | ||
|
||
-- create data product entity table | ||
CREATE TABLE IF NOT EXISTS data_product_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL, | ||
fqnHash VARCHAR(256) NOT NULL, | ||
json JSONB NOT NULL, | ||
updatedAt BIGINT GENERATED ALWAYS AS ((json ->> 'updatedAt')::bigint) STORED NOT NULL, | ||
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> 'updatedBy') STORED NOT NULL, | ||
PRIMARY KEY (id), | ||
UNIQUE (fqnHash) | ||
); | ||
|
||
-- create search service entity | ||
CREATE TABLE IF NOT EXISTS search_service_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL, | ||
nameHash VARCHAR(256) NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL, | ||
serviceType VARCHAR(256) GENERATED ALWAYS AS (json ->> 'serviceType') STORED NOT NULL, | ||
json JSONB NOT NULL, | ||
updatedAt BIGINT GENERATED ALWAYS AS ((json ->> 'updatedAt')::bigint) STORED NOT NULL, | ||
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> 'updatedBy') STORED NOT NULL, | ||
deleted BOOLEAN GENERATED ALWAYS AS ((json ->> 'deleted')::boolean) STORED, | ||
PRIMARY KEY (id), | ||
UNIQUE (nameHash) | ||
); | ||
|
||
-- create search index entity | ||
CREATE TABLE IF NOT EXISTS search_index_entity ( | ||
id VARCHAR(36) GENERATED ALWAYS AS (json ->> 'id') STORED NOT NULL, | ||
name VARCHAR(256) GENERATED ALWAYS AS (json ->> 'name') STORED NOT NULL, | ||
fqnHash VARCHAR(256) NOT NULL, | ||
json JSONB NOT NULL, | ||
updatedAt BIGINT GENERATED ALWAYS AS ((json ->> 'updatedAt')::bigint) STORED NOT NULL, | ||
updatedBy VARCHAR(256) GENERATED ALWAYS AS (json ->> 'updatedBy') STORED NOT NULL, | ||
deleted BOOLEAN GENERATED ALWAYS AS ((json ->> 'deleted')::boolean) STORED, | ||
PRIMARY KEY (id), | ||
UNIQUE (fqnHash) | ||
); |
76 changes: 76 additions & 0 deletions
76
ingestion/examples/sample_data/searchIndexes/searchIndexes.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
{ | ||
"searchIndexes": [ | ||
{ | ||
"id": "e093dd27-390e-4360-8efd-e4d63ec167a9", | ||
"name": "table_search_index", | ||
"displayName": "TableSearchIndex", | ||
"fullyQualifiedName": "elasticsearch_sample.table_search_index", | ||
"description": "Table Search Index", | ||
"version": 0.1, | ||
"updatedAt": 1638354087591, | ||
"serviceType": "ElasticSearch", | ||
"fields": [ | ||
{ | ||
"name": "name", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Table Entity Name.", | ||
"tags": [] | ||
}, | ||
{ | ||
"name": "displayName", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Table Entity DisplayName.", | ||
"tags": [] | ||
}, | ||
{ | ||
"name": "description", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Table Entity Description.", | ||
"tags": [] | ||
}, | ||
{ | ||
"name": "columns", | ||
"dataType": "NESTED", | ||
"dataTypeDisplay": "nested", | ||
"description": "Table Columns.", | ||
"tags": [], | ||
"children": [ | ||
{ | ||
"name": "name", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Column Name.", | ||
"tags": [] | ||
}, | ||
{ | ||
"name": "displayName", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Column DisplayName.", | ||
"tags": [] | ||
}, | ||
{ | ||
"name": "description", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Column Description.", | ||
"tags": [] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "databaseSchema", | ||
"dataType": "TEXT", | ||
"dataTypeDisplay": "text", | ||
"description": "Database Schema that this table belongs to.", | ||
"tags": [] | ||
} | ||
], | ||
"tags": [], | ||
"followers": [] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"type": "elasticsearch", | ||
"serviceName": "elasticsearch_sample", | ||
"serviceConnection": { | ||
"config": { | ||
"type": "ElasticSearch", | ||
"hostPort": "localhost:9200" | ||
} | ||
}, | ||
"sourceConfig": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.