Drafted intended API for GE.
This commit is contained in:
parent
4c0fd0f179
commit
8cfddbf5d9
1 changed files with 22 additions and 0 deletions
22
README.md
22
README.md
|
|
@ -119,6 +119,28 @@ with Flow(...) as flow:
|
|||
close_ssh_tunnel.run(tunnel=tunnel)
|
||||
```
|
||||
|
||||
### Use Great Expectations
|
||||
|
||||
**Run a Great Expectations validation on a MySQL query**
|
||||
|
||||
```python
|
||||
from lolafect.connections import connect_to_mysql
|
||||
from lolafect.data_testing import run_data_test_on_mysql
|
||||
|
||||
with Flow(...) as flow:
|
||||
|
||||
a_mysql_connection = connect_to_mysql(...)
|
||||
|
||||
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_validation_on_mysql(
|
||||
mysql_connection=a_mysql_connection,
|
||||
query=my_query,
|
||||
expectations=my_expectations
|
||||
)
|
||||
```
|
||||
|
||||
### Slack
|
||||
|
||||
**Send a warning message to slack if your tasks fails**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue