mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-30 10:05:41 +00:00
MINOR: Fix uppercase DBT to lowercase dbt (#23900)
* fix: uppercase DBT to lowercase dbt * fix: change DBT to lowercase dbt in TestPlatform enum * fix: fix dbt syntax in valueMax --------- Co-authored-by: Shailesh Parmar <shailesh.parmar.webdev@gmail.com>
This commit is contained in:
parent
7b162d7440
commit
e103a8c805
@ -6,3 +6,15 @@ SET json = JSON_ARRAY_INSERT(
|
|||||||
)
|
)
|
||||||
WHERE JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMBER"')
|
WHERE JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMBER"')
|
||||||
AND NOT JSON_CONTAINS(json->'$.supportedDataTypes', '"NUMERIC"');
|
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');
|
||||||
@ -7,3 +7,15 @@ SET json = jsonb_set(
|
|||||||
)
|
)
|
||||||
WHERE json->'supportedDataTypes' @> '"NUMBER"'::jsonb
|
WHERE json->'supportedDataTypes' @> '"NUMBER"'::jsonb
|
||||||
AND NOT (json->'supportedDataTypes' @> '"NUMERIC"'::jsonb);
|
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;
|
||||||
@ -1151,7 +1151,7 @@ class DbtSource(DbtServiceSource):
|
|||||||
name=manifest_node.name,
|
name=manifest_node.name,
|
||||||
description=manifest_node.description,
|
description=manifest_node.description,
|
||||||
entityType=entity_type,
|
entityType=entity_type,
|
||||||
testPlatforms=[TestPlatform.DBT],
|
testPlatforms=[TestPlatform.dbt],
|
||||||
parameterDefinition=create_test_case_parameter_definitions(
|
parameterDefinition=create_test_case_parameter_definitions(
|
||||||
manifest_node
|
manifest_node
|
||||||
),
|
),
|
||||||
|
|||||||
@ -69,7 +69,7 @@ class CliDBTBase(TestCase):
|
|||||||
def test_dbt_test_cases(self) -> None:
|
def test_dbt_test_cases(self) -> None:
|
||||||
test_case_entity_list = self.openmetadata.list_entities(
|
test_case_entity_list = self.openmetadata.list_entities(
|
||||||
entity=TestDefinition,
|
entity=TestDefinition,
|
||||||
params={"testPlatform": TestPlatform.DBT.value},
|
params={"testPlatform": TestPlatform.dbt.value},
|
||||||
)
|
)
|
||||||
self.assertTrue(len(test_case_entity_list.entities) == 26)
|
self.assertTrue(len(test_case_entity_list.entities) == 26)
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
"displayName": "Column Value Max. To Be Between",
|
"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.",
|
"description": "This schema defines the test ColumnValueMaxToBeBetween. Test the maximum value in a col is within a range.",
|
||||||
"entityType": "COLUMN",
|
"entityType": "COLUMN",
|
||||||
"testPlatforms": ["OpenMetadata", "DBT"],
|
"testPlatforms": ["OpenMetadata", "dbt"],
|
||||||
"supportedDataTypes": ["NUMBER", "INT", "FLOAT", "DOUBLE", "DECIMAL", "TINYINT", "SMALLINT", "BIGINT", "BYTEINT"],
|
"supportedDataTypes": ["NUMBER", "INT", "FLOAT", "DOUBLE", "DECIMAL", "TINYINT", "SMALLINT", "BIGINT", "BYTEINT"],
|
||||||
"parameterDefinition": [
|
"parameterDefinition": [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -14,7 +14,7 @@
|
|||||||
"enum": [
|
"enum": [
|
||||||
"OpenMetadata",
|
"OpenMetadata",
|
||||||
"GreatExpectations",
|
"GreatExpectations",
|
||||||
"DBT",
|
"dbt",
|
||||||
"Deequ",
|
"Deequ",
|
||||||
"Soda",
|
"Soda",
|
||||||
"Other"
|
"Other"
|
||||||
|
|||||||
@ -295,7 +295,7 @@ export enum DataType {
|
|||||||
* This schema defines the platform where tests are defined and ran.
|
* This schema defines the platform where tests are defined and ran.
|
||||||
*/
|
*/
|
||||||
export enum TestPlatform {
|
export enum TestPlatform {
|
||||||
Dbt = "DBT",
|
Dbt = "dbt",
|
||||||
Deequ = "Deequ",
|
Deequ = "Deequ",
|
||||||
GreatExpectations = "GreatExpectations",
|
GreatExpectations = "GreatExpectations",
|
||||||
OpenMetadata = "OpenMetadata",
|
OpenMetadata = "OpenMetadata",
|
||||||
|
|||||||
@ -422,7 +422,7 @@ export enum DataType {
|
|||||||
* This schema defines the platform where tests are defined and ran.
|
* This schema defines the platform where tests are defined and ran.
|
||||||
*/
|
*/
|
||||||
export enum TestPlatform {
|
export enum TestPlatform {
|
||||||
Dbt = "DBT",
|
Dbt = "dbt",
|
||||||
Deequ = "Deequ",
|
Deequ = "Deequ",
|
||||||
GreatExpectations = "GreatExpectations",
|
GreatExpectations = "GreatExpectations",
|
||||||
OpenMetadata = "OpenMetadata",
|
OpenMetadata = "OpenMetadata",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user