diff --git a/README.md b/README.md index d9cbbf1..134b28d 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,28 @@ with Flow(...) as flow: 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 **Send a warning message to slack if your tasks fails**