diff --git a/openmetadata-docs/content/v1.2.x/connectors/ingestion/workflows/data-quality/tests.md b/openmetadata-docs/content/v1.2.x/connectors/ingestion/workflows/data-quality/tests.md index 4c11bd6b155..434e77d9b0e 100644 --- a/openmetadata-docs/content/v1.2.x/connectors/ingestion/workflows/data-quality/tests.md +++ b/openmetadata-docs/content/v1.2.x/connectors/ingestion/workflows/data-quality/tests.md @@ -270,19 +270,22 @@ parameterValues: ``` ### Table Custom SQL Test -Write you own SQL test. The test will pass if the following condition is met: -- The query result return 0 row +Write you own SQL test. When writting your query you can use 2 strategies: +- `ROWS` (default): expects the query to be written as `SELECT , FROM WHERE `. **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() FROM WHERE `. **Properties** * `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** | Condition | Status | | ----------- | ----------- | -|`sqlExpression` returns **0 row**|Success ✅| -|`sqlExpression` returns **1 or more rows**|Failed ❌| +|`sqlExpression` returns **row <= threshold (default to 0)**|Success ✅| +|`sqlExpression` returns **row > threshold (default to 0)**|Failed ❌| **Example** ```sql diff --git a/openmetadata-docs/content/v1.3.x/connectors/ingestion/workflows/data-quality/tests.md b/openmetadata-docs/content/v1.3.x/connectors/ingestion/workflows/data-quality/tests.md index ead90a85593..e734c3ef414 100644 --- a/openmetadata-docs/content/v1.3.x/connectors/ingestion/workflows/data-quality/tests.md +++ b/openmetadata-docs/content/v1.3.x/connectors/ingestion/workflows/data-quality/tests.md @@ -292,19 +292,22 @@ Validate a list of table column name matches an expected set of columns ``` ### Table Custom SQL Test -Write you own SQL test. The test will pass if the following condition is met: -- The query result return 0 row +Write you own SQL test. When writting your query you can use 2 strategies: +- `ROWS` (default): expects the query to be written as `SELECT , FROM WHERE `. **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() FROM WHERE `. **Properties** * `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** | Condition | Status | | ----------- | ----------- | -|`sqlExpression` returns **0 row**|Success ✅| -|`sqlExpression` returns **1 or more rows**|Failed ❌| +|`sqlExpression` returns **row <= threshold (default to 0)**|Success ✅| +|`sqlExpression` returns **row > threshold (default to 0)**|Failed ❌| **Example** ```sql