Add entry in readme showcasing new trino feature

This commit is contained in:
Pablo Martin 2023-03-29 17:18:14 +02:00
parent b51c810a39
commit 814a376e02

View file

@ -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**