Prefect Collection for interacting with Soda Core: prefect-soda-core

Docs

https://sodadata.github.io/prefect-soda-core

Code

Examples

from prefect import flow
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 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()
1 Like