mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 02:29:03 +00:00 
			
		
		
		
	 c69c21d82e
			
		
	
	
		c69c21d82e
		
	
	
	
	
		
			
			* feat: add count rows support for custom SQL * style: ran python linting * feat: added logic for partitioned custom sql row count * migration: partitionExpression parameter * chore: resolve conflicts (cherry picked from commit d58b8a63d675e9bf91a2283a5f37702648cdab7f)
		
			
				
	
	
		
			18 lines
		
	
	
		
			766 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			766 B
		
	
	
	
		
			SQL
		
	
	
	
	
	
| UPDATE test_definition 
 | |
| SET json = JSON_SET(json, '$.supportsRowLevelPassedFailed', true)
 | |
| WHERE JSON_EXTRACT(json, '$.name') = 'tableCustomSQLQuery';
 | |
| 
 | |
| UPDATE test_definition 
 | |
| SET json = JSON_ARRAY_APPEND(
 | |
|     json, 
 | |
|     '$.parameterDefinition',
 | |
|     JSON_OBJECT(
 | |
|         'name', 'partitionExpression',
 | |
|         'displayName', 'Partition Expression',
 | |
|         'description', 'Partition expression that will be used to compute the passed/failed row count, if compute row count is enabled (e.g. created_date > DATE_SUB(CURDATE(), INTERVAL 1 DAY)).',
 | |
|         'dataType', 'STRING',
 | |
|         'required', false
 | |
|     )
 | |
| )
 | |
| WHERE JSON_EXTRACT(json, '$.name') = 'tableCustomSQLQuery'
 | |
| AND NOT JSON_CONTAINS(JSON_EXTRACT(json, '$.parameterDefinition[*].name'),'"partitionExpression"'); |