Configuration
Soda configuration block
SodaConfiguration
Bases: Block
This block can be used to provide the configuration required to run Soda scans. For more information, please refer to the official docs # noqa
Parameters:
Name | Type | Description | Default |
---|---|---|---|
configuration_yaml_path |
str
|
Absolute path of the Soda configuration file. |
required |
configuration_yaml_str |
str
|
Optional YAML string containing the Soda configuration
details. If provided, it will be saved
at the path provided with |
required |
Example
Load stored Soda configuration.
from prefect_soda_core.soda_configuration import SodaConfiguration
soda_configuration_block = SodaConfiguration.load("BLOCK_NAME")
Source code in prefect_soda_core/soda_configuration.py
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
|
check_block_configuration(values)
Ensure that the configuration options are valid. A configuration is valid if it provides just the path to the YAML configuration file or if it has both the path to the configuration file and a valid YAML configuration string.
Raises:
Type | Description |
---|---|
SodaConfigurationException
|
When the provided configuration is not valid. |
Source code in prefect_soda_core/soda_configuration.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
|
persist_configuration()
Persist Soda configuration on the file system, if necessary. Please note that, if the path already exists, it will be overwritten.
Source code in prefect_soda_core/soda_configuration.py
65 66 67 68 69 70 71 72 73 74 |
|