mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 02:29:03 +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"') | ||||
|   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 | ||||
|   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, | ||||
|                             description=manifest_node.description, | ||||
|                             entityType=entity_type, | ||||
|                             testPlatforms=[TestPlatform.DBT], | ||||
|                             testPlatforms=[TestPlatform.dbt], | ||||
|                             parameterDefinition=create_test_case_parameter_definitions( | ||||
|                                 manifest_node | ||||
|                             ), | ||||
|  | ||||
| @ -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) | ||||
| 
 | ||||
|  | ||||
| @ -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": [ | ||||
|     { | ||||
|  | ||||
| @ -14,7 +14,7 @@ | ||||
|       "enum": [ | ||||
|         "OpenMetadata", | ||||
|         "GreatExpectations", | ||||
|         "DBT", | ||||
|         "dbt", | ||||
|         "Deequ", | ||||
|         "Soda", | ||||
|         "Other" | ||||
|  | ||||
| @ -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", | ||||
|  | ||||
| @ -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", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Teddy
						Teddy