mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-26 18:06:03 +00:00
DOC - Updated custom sql documentation (#15440)
This commit is contained in:
parent
491aeb1b7f
commit
b9e732c5cd
@ -270,19 +270,22 @@ parameterValues:
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Table Custom SQL Test
|
### Table Custom SQL Test
|
||||||
Write you own SQL test. The test will pass if the following condition is met:
|
Write you own SQL test. When writting your query you can use 2 strategies:
|
||||||
- The query result return 0 row
|
- `ROWS` (default): expects the query to be written as `SELECT <field>, <field> FROM <foo> WHERE <condition>`. **Note** if your query returns a large amount of rows it might cause an "Out Of Memeory" error. In this case we recoomend you to use the `COUNT` startegy.
|
||||||
|
- `COUNT`: expects the query to be written as `SELECT COUNT(<field>) FROM <foo> WHERE <condition>`.
|
||||||
|
|
||||||
**Properties**
|
**Properties**
|
||||||
|
|
||||||
* `sqlExpression`: SQL expression
|
* `sqlExpression`: SQL expression
|
||||||
|
* `strategy`: one of `ROWS` or `COUNT`
|
||||||
|
* `threshold`: and integer defining the threshold above which the test should fail (default to 0 if not specified)
|
||||||
|
|
||||||
**Behavior**
|
**Behavior**
|
||||||
|
|
||||||
| Condition | Status |
|
| Condition | Status |
|
||||||
| ----------- | ----------- |
|
| ----------- | ----------- |
|
||||||
|`sqlExpression` returns **0 row**|Success ✅|
|
|`sqlExpression` returns **row <= threshold (default to 0)**|Success ✅|
|
||||||
|`sqlExpression` returns **1 or more rows**|Failed ❌|
|
|`sqlExpression` returns **row > threshold (default to 0)**|Failed ❌|
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```sql
|
```sql
|
||||||
|
@ -292,19 +292,22 @@ Validate a list of table column name matches an expected set of columns
|
|||||||
```
|
```
|
||||||
|
|
||||||
### Table Custom SQL Test
|
### Table Custom SQL Test
|
||||||
Write you own SQL test. The test will pass if the following condition is met:
|
Write you own SQL test. When writting your query you can use 2 strategies:
|
||||||
- The query result return 0 row
|
- `ROWS` (default): expects the query to be written as `SELECT <field>, <field> FROM <foo> WHERE <condition>`. **Note** if your query returns a large amount of rows it might cause an "Out Of Memeory" error. In this case we recoomend you to use the `COUNT` startegy.
|
||||||
|
- `COUNT`: expects the query to be written as `SELECT COUNT(<field>) FROM <foo> WHERE <condition>`.
|
||||||
|
|
||||||
**Properties**
|
**Properties**
|
||||||
|
|
||||||
* `sqlExpression`: SQL expression
|
* `sqlExpression`: SQL expression
|
||||||
|
* `strategy`: one of `ROWS` or `COUNT`
|
||||||
|
* `threshold`: and integer defining the threshold above which the test should fail (default to 0 if not specified)
|
||||||
|
|
||||||
**Behavior**
|
**Behavior**
|
||||||
|
|
||||||
| Condition | Status |
|
| Condition | Status |
|
||||||
| ----------- | ----------- |
|
| ----------- | ----------- |
|
||||||
|`sqlExpression` returns **0 row**|Success ✅|
|
|`sqlExpression` returns **row <= threshold (default to 0)**|Success ✅|
|
||||||
|`sqlExpression` returns **1 or more rows**|Failed ❌|
|
|`sqlExpression` returns **row > threshold (default to 0)**|Failed ❌|
|
||||||
|
|
||||||
**Example**
|
**Example**
|
||||||
```sql
|
```sql
|
||||||
|
Loading…
x
Reference in New Issue
Block a user