Skip to content

Commit

Permalink
Merge pull request #11 from sodadata/fix-readme-example
Browse files Browse the repository at this point in the history
Fixed example in README
  • Loading branch information
AlessandroLollo authored Sep 27, 2022
2 parents 2d8a0d8 + adec773 commit b7e7332
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,29 @@ pip install prefect-soda-core

```python
from prefect import flow
from prefect_soda_core.tasks import (
goodbye_prefect_soda_core,
hello_prefect_soda_core,
)
from prefect_soda_core.soda_configuration import SodaConfiguration
from prefect_soda_core.sodacl_check import SodaCLCheck
from prefect_soda_core.tasks import soda_scan_execute


@flow
def example_flow():
hello_prefect_soda_core
goodbye_prefect_soda_core

example_flow()
def run_soda_scan():
soda_configuration_block = SodaConfiguration(
configuration_yaml_path="/path/to/config.yaml"
)
sodacl_check_block = SodaCLCheck(
sodacl_yaml_path="/path/to/checks.yaml"
)

return soda_scan_execute(
data_source_name="my_datasource",
configuration=soda_configuration_block,
checks=soda_check_block,
variables={"var": "value"},
verbose=True
)

run_soda_scan()
```

## Resources
Expand Down

0 comments on commit b7e7332

Please sign in to comment.