Add entry in readme showcasing new trino feature
This commit is contained in:
parent
b51c810a39
commit
814a376e02
1 changed files with 22 additions and 0 deletions
22
README.md
22
README.md
|
|
@ -143,6 +143,28 @@ with Flow(...) as flow:
|
||||||
print("The data is bad!!!")
|
print("The data is bad!!!")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**Run a Great Expectations validation on a Trino query**
|
||||||
|
|
||||||
|
```python
|
||||||
|
from lolafect.data_testing import run_data_test_on_trino
|
||||||
|
|
||||||
|
with Flow(...) as flow:
|
||||||
|
|
||||||
|
my_query = """SELECT something FROM somewhere"""
|
||||||
|
my_expectations = {...} # A bunch of things you want to validate on the result of the query
|
||||||
|
|
||||||
|
validation_results = run_data_test_on_trino(
|
||||||
|
name="my-cool-validation",
|
||||||
|
trino_credentials={...},
|
||||||
|
query=my_query,
|
||||||
|
expectations=my_expectations
|
||||||
|
)
|
||||||
|
|
||||||
|
if not validation_results["success"]:
|
||||||
|
print("The data is bad!!!")
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
### Slack
|
### Slack
|
||||||
|
|
||||||
**Send a warning message to slack if your tasks fails**
|
**Send a warning message to slack if your tasks fails**
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue