diff --git a/bootstrap/sql/migrations/native/1.10.3/mysql/postDataMigrationSQLScript.sql b/bootstrap/sql/migrations/native/1.10.3/mysql/postDataMigrationSQLScript.sql index dbe8e1e5675..775da1b8189 100644 --- a/bootstrap/sql/migrations/native/1.10.3/mysql/postDataMigrationSQLScript.sql +++ b/bootstrap/sql/migrations/native/1.10.3/mysql/postDataMigrationSQLScript.sql @@ -5,4 +5,16 @@ SET json = JSON_ARRAY_INSERT( 'NUMERIC' ) WHERE JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMBER"') - AND NOT JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMERIC"'); \ No newline at end of file + AND NOT JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMERIC"'); + +UPDATE test_definition +SET json = JSON_SET( + json, + '$.testPlatforms', + CAST(REPLACE( + JSON_EXTRACT(json, '$.testPlatforms'), + '"DBT"', + '"dbt"' + ) AS JSON) +) +WHERE JSON_CONTAINS(json, '"DBT"', '$.testPlatforms'); \ No newline at end of file diff --git a/bootstrap/sql/migrations/native/1.10.3/postgres/postDataMigrationSQLScript.sql b/bootstrap/sql/migrations/native/1.10.3/postgres/postDataMigrationSQLScript.sql index 844856673b1..e9fb313d7ad 100644 --- a/bootstrap/sql/migrations/native/1.10.3/postgres/postDataMigrationSQLScript.sql +++ b/bootstrap/sql/migrations/native/1.10.3/postgres/postDataMigrationSQLScript.sql @@ -6,4 +6,16 @@ SET json = jsonb_set( true ) WHERE json->'supportedDataTypes' @> '"NUMBER"'::jsonb - AND NOT (json->'supportedDataTypes' @> '"NUMERIC"'::jsonb); \ No newline at end of file + AND NOT (json->'supportedDataTypes' @> '"NUMERIC"'::jsonb); + +UPDATE test_definition +SET json = jsonb_set( + json::jsonb, + '{testPlatforms}', + REPLACE( + (json::jsonb -> 'testPlatforms')::text, + '"DBT"', + '"dbt"' + )::jsonb +)::json +WHERE json::jsonb -> 'testPlatforms' @> '"DBT"'::jsonb; \ No newline at end of file diff --git a/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py b/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py index 6737d196e11..e251067c15f 100644 --- a/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py +++ b/ingestion/src/metadata/ingestion/source/database/dbt/metadata.py @@ -1151,7 +1151,7 @@ class DbtSource(DbtServiceSource): name=manifest_node.name, description=manifest_node.description, entityType=entity_type, - testPlatforms=[TestPlatform.DBT], + testPlatforms=[TestPlatform.dbt], parameterDefinition=create_test_case_parameter_definitions( manifest_node ), diff --git a/ingestion/tests/cli_e2e/base/test_cli_dbt.py b/ingestion/tests/cli_e2e/base/test_cli_dbt.py index 352902ba862..bec43dfee57 100644 --- a/ingestion/tests/cli_e2e/base/test_cli_dbt.py +++ b/ingestion/tests/cli_e2e/base/test_cli_dbt.py @@ -69,7 +69,7 @@ class CliDBTBase(TestCase): def test_dbt_test_cases(self) -> None: test_case_entity_list = self.openmetadata.list_entities( entity=TestDefinition, - params={"testPlatform": TestPlatform.DBT.value}, + params={"testPlatform": TestPlatform.dbt.value}, ) self.assertTrue(len(test_case_entity_list.entities) == 26) diff --git a/openmetadata-service/src/main/resources/json/data/tests/columnValueMaxToBeBetween.json b/openmetadata-service/src/main/resources/json/data/tests/columnValueMaxToBeBetween.json index 7a249401f31..2332c7900e3 100644 --- a/openmetadata-service/src/main/resources/json/data/tests/columnValueMaxToBeBetween.json +++ b/openmetadata-service/src/main/resources/json/data/tests/columnValueMaxToBeBetween.json @@ -4,7 +4,7 @@ "displayName": "Column Value Max. To Be Between", "description": "This schema defines the test ColumnValueMaxToBeBetween. Test the maximum value in a col is within a range.", "entityType": "COLUMN", - "testPlatforms": ["OpenMetadata", "DBT"], + "testPlatforms": ["OpenMetadata", "dbt"], "supportedDataTypes": ["NUMBER", "INT", "FLOAT", "DOUBLE", "DECIMAL", "TINYINT", "SMALLINT", "BIGINT", "BYTEINT"], "parameterDefinition": [ { diff --git a/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json b/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json index 2a6a9b2e76d..f7f3c84fd15 100644 --- a/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json +++ b/openmetadata-spec/src/main/resources/json/schema/tests/testDefinition.json @@ -14,7 +14,7 @@ "enum": [ "OpenMetadata", "GreatExpectations", - "DBT", + "dbt", "Deequ", "Soda", "Other" diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts index 3150d0224ff..114f1bb55cb 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/api/tests/createTestDefinition.ts @@ -295,7 +295,7 @@ export enum DataType { * This schema defines the platform where tests are defined and ran. */ export enum TestPlatform { - Dbt = "DBT", + Dbt = "dbt", Deequ = "Deequ", GreatExpectations = "GreatExpectations", OpenMetadata = "OpenMetadata", diff --git a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts index 524094a093e..a4979649e08 100644 --- a/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts +++ b/openmetadata-ui/src/main/resources/ui/src/generated/tests/testDefinition.ts @@ -422,7 +422,7 @@ export enum DataType { * This schema defines the platform where tests are defined and ran. */ export enum TestPlatform { - Dbt = "DBT", + Dbt = "dbt", Deequ = "Deequ", GreatExpectations = "GreatExpectations", OpenMetadata = "OpenMetadata",