validio_sdk package¶
Subpackages¶
- validio_sdk.client package
- validio_sdk.code package
- validio_sdk.resource package
- Submodules
- validio_sdk.resource.channels module
- validio_sdk.resource.credentials module
AtlanCredentialAwsAthenaCredentialAwsCredentialAwsRedshiftCredentialAzureSynapseBackendTypeAzureSynapseCredentialAzureSynapseEntraIdCredentialAzureSynapseSqlCredentialClickHouseCredentialClickHouseProtocolCredentialDatabricksCredentialDbtCloudCredentialDbtCoreCredentialDbtCredentialDemoCredentialGcpCredentialKafkaSaslSslPlainCredentialKafkaSslCredentialLookerCredentialMsPowerBiCredentialMsPowerBiCredentialAuthMsPowerBiCredentialAuthEntraIdMsSqlServerCredentialMsSqlServerCredentialEntraIdMsSqlServerCredentialUserPasswordOracleCredentialOracleCredentialAuthOracleCredentialUserPasswordPostgreSqlCredentialPostgresLikeCredentialSigmaCredentialSnowflakeCredentialSnowflakeCredentialKeyPairSnowflakeCredentialUserPasswordTableauConnectedAppCredentialTableauPersonalAccessTokenCredential
- validio_sdk.resource.enums module
- validio_sdk.resource.filters module
- validio_sdk.resource.notification_rules module
- validio_sdk.resource.replacement module
- validio_sdk.resource.segmentations module
- validio_sdk.resource.sources module
AwsAthenaSourceAwsKinesisSourceAwsRedshiftSourceAzureSynapseSourceClickHouseSourceDatabricksSourceDbtModelRunSourceDbtSourceDbtTestResultSourceDemoSourceGcpBigQuerySourceGcpPubSubSourceKafkaSourceMsSqlServerSourceOracleSourcePostgreSqlSourcePostgresLikeSourceSnowflakeSourceSourceSqlSourceStreamSourceStreamingMessageFormatStreamingSourceMessageFormatWarehouseSource
- validio_sdk.resource.tags module
- validio_sdk.resource.thresholds module
- validio_sdk.resource.validators module
CategoricalDistributionMetricCategoricalDistributionValidatorFreshnessValidatorNumericDistributionMetricNumericDistributionValidatorNumericMetricNumericValidatorReferenceRelativeTimeMetricRelativeTimeValidatorRelativeVolumeMetricRelativeVolumeValidatorSlideConfigSqlValidatorValidatorVolumeMetricVolumeValidator
- validio_sdk.resource.windows module
- Module contents
Submodules¶
validio_sdk.config module¶
Persistent configuration.
- class validio_sdk.config.Config(config_dir: Path | None = None)¶
Bases:
objectConfig management.
A class to work with configuration such as reading, writing and deleting.
- exists() bool¶
Check if any configuration exist.
- read() ValidioConfig¶
Read persistent configuration.
Will return None if no configuration is created yet.
- Returns:
The configuration, or None
- Return type:
ValidioConfig | None
- Raises:
ConfigNotFoundError if no configuration exists
- Raises:
ConfigNotFoundError if the configuration is invalid
- remove() None¶
Remove the configuration at the instance’s config_path.
- write(config: ValidioConfig) None¶
Write the passed configuration to disk.
This will fully overwrite the existing configuration, including any fields that’s not a part of the ValidioConfig.
- Parameters:
config – A ValidioConfig object.
- class validio_sdk.config.ValidioConfig(endpoint: str = '', access_key: str = '', access_secret: str = '', default_namespace: str = 'default')¶
Bases:
objectRepresentation of configuration to use in the Validio system and SDK.
- property access_secret: str¶
- asdict() dict[str, str]¶
Return a dictionary representation of the class.
This is used from our ClassJSONEncoder to ensure we save JSON representing the class with the external property names. By doing this we can also ensure that we can serialize the config by passing the JSON to the constructor.
- validio_sdk.config.default_config_dir() Path¶
Get the default config dir based on the OS.
validio_sdk.dbt module¶
Utilities for dbt.
- validio_sdk.dbt.trim_manifest_json(manifest: dict) dict¶
Takes a dbt manifest json and discards all the fields that are not relevant used by the validio platform.
- Parameters:
manifest – The manifest object
- async validio_sdk.dbt.upload_artifacts(client: APIClient | Client, credential_id: str, job_name: str, manifest: dict, run_results: dict | None) None¶
Helper function to upload dbt artifacts. The artifacts are additionally trimmed before uploading.
- Parameters:
client – Client to use for the artifacts upload.
credential_id – DBTCore credential id to upload artifacts on behalf of.
job_name – Job associated with the artifacts.
manifest – manifest.json payload
run_results – run_results.json payload
validio_sdk.exception module¶
Exceptions used throughout the system.
- exception validio_sdk.exception.ConfigInvalidError¶
Bases:
ValidioErrorException when the configuration file is invalid.
- exception validio_sdk.exception.ConfigNotFoundError(endpoint_env: str, access_key_env: str, secret_access_key_env: str)¶
Bases:
ValidioErrorException when no configuration is found.
- exception validio_sdk.exception.ForbiddenError¶
Bases:
ValidioErrorException throw when doing forbidden request.
This happens when trying to access API methods not allowed, e.g. adding resources to a namespace the API key is not part of.
- exception validio_sdk.exception.UnauthorizedError(access_key_env: str, secret_access_key_env: str)¶
Bases:
ValidioErrorException thrown when unauthorized request is made.
- exception validio_sdk.exception.ValidioBugError(*args: Any)¶
Bases:
ValidioErrorSame as ValidioError but marked for bugs to be reported.
- exception validio_sdk.exception.ValidioConnectionError(endpoint_env: str, e: Exception)¶
Bases:
ValidioErrorException thrown when connection to Validio backend fails.
- exception validio_sdk.exception.ValidioError(*args: Any)¶
Bases:
ExceptionBase exception used for every exception thrown by Validio.
- exception validio_sdk.exception.ValidioTimeoutError(method: str | None = None, timeout: int | float | None = None)¶
Bases:
ValidioErrorValidio specific timeout error.
validio_sdk.metadata module¶
Metadata information about the package.
- validio_sdk.metadata.version() str¶
Get the version of the SDK from the metadata.
Module contents¶
- class validio_sdk.BooleanFilter(*, field: str, operator: BooleanFilterOperator, name: str, source: Source, display_name: str | None = None, ignore_changes: bool = False)¶
Bases:
FilterA Boolean filter configuration.
- class validio_sdk.BooleanFilterOperator(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str,EnumConfigures the behavior of a Boolean filter.
IS_TRUE: Allow values equal to TRUE IS_FALSE: Allow values equal to FALSE
- IS_FALSE = 'IS_FALSE'¶
- IS_TRUE = 'IS_TRUE'¶
- exception validio_sdk.ConfigInvalidError¶
Bases:
ValidioErrorException when the configuration file is invalid.
- exception validio_sdk.ConfigNotFoundError(endpoint_env: str, access_key_env: str, secret_access_key_env: str)¶
Bases:
ValidioErrorException when no configuration is found.
- class validio_sdk.EnumFilter(*, field: str, values: list[str], name: str, source: Source, operator: EnumFilterOperator = EnumFilterOperator.ALLOW, display_name: str | None = None, ignore_changes: bool = False)¶
Bases:
FilterAn Enum filter configuration.
- class validio_sdk.EnumFilterOperator(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str,EnumConfigures the behavior of an Enum filter.
ALLOW: Allow values in the enum DENY: Deny values in the enum
- ALLOW = 'ALLOW'¶
- DENY = 'DENY'¶
- class validio_sdk.NullFilter(*, field: str, name: str, source: Source, operator: NullFilterOperator = NullFilterOperator.IS, display_name: str | None = None, ignore_changes: bool = False)¶
Bases:
FilterA Null filter configuration.
- class validio_sdk.NullFilterOperator(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str,EnumConfigures the behavior of a Null filter.
IS: Filter in NULL values IS_NOT: Filter in Non-NULL values
- IS = 'IS'¶
- IS_NOT = 'IS_NOT'¶
- class validio_sdk.SqlFilter(*, query: str, name: str, source: Source, display_name: str | None = None, ignore_changes: bool = False)¶
Bases:
FilterA SQL filter configuration.
- class validio_sdk.StringFilter(*, field: str, operator: StringFilterOperator, name: str, source: Source, value: str | None = None, display_name: str | None = None, ignore_changes: bool = False)¶
Bases:
FilterA String filter configuration.
- class validio_sdk.StringFilterOperator(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str,EnumConfigures the behavior of a String filter.
IS_EMPTY: The string is empty IS_NOT_EMPTY: The string is not empty CONTAINS: The string contains DOES_NOT_CONTAIN: The string does not contain STARTS_WITH: The string is prefixed with ENDS_WITH: The string is suffixed with IS_EXACTLY: Exact match of full string REGEX: Regular expressions
- CONTAINS = 'CONTAINS'¶
- DOES_NOT_CONTAIN = 'DOES_NOT_CONTAIN'¶
- ENDS_WITH = 'ENDS_WITH'¶
- IS_EMPTY = 'IS_EMPTY'¶
- IS_EXACTLY = 'IS_EXACTLY'¶
- IS_NOT_EMPTY = 'IS_NOT_EMPTY'¶
- REGEX = 'REGEX'¶
- STARTS_WITH = 'STARTS_WITH'¶
- class validio_sdk.ThresholdFilter(*, field: str, value: float, name: str, source: Source, operator: ThresholdFilterOperator, display_name: str | None = None, ignore_changes: bool = False)¶
Bases:
FilterA Threshold filter configuration.
- class validio_sdk.ThresholdFilterOperator(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
str,EnumConfigures the behavior of a String filter.
EQUAL: The value equals (==) NOT_EQUAL: The value does not equal (!=) LESS_THAN: The value is less than (<) LESS_THAN_OR_EQUAL: The value is less than or equal (<=) GREATER_THAN: The value is greater than (>) GREATER_THAN_OR_EQUAL: The value is greater than or equal (>=)
- EQUAL = 'EQUAL'¶
- GREATER_THAN = 'GREATER'¶
- GREATER_THAN_OR_EQUAL = 'GREATER_EQUAL'¶
- LESS_THAN = 'LESS'¶
- LESS_THAN_OR_EQUAL = 'LESS_EQUAL'¶
- NOT_EQUAL = 'NOT_EQUAL'¶
- exception validio_sdk.UnauthorizedError(access_key_env: str, secret_access_key_env: str)¶
Bases:
ValidioErrorException thrown when unauthorized request is made.
- exception validio_sdk.ValidioConnectionError(endpoint_env: str, e: Exception)¶
Bases:
ValidioErrorException thrown when connection to Validio backend fails.
- exception validio_sdk.ValidioError(*args: Any)¶
Bases:
ExceptionBase exception used for every exception thrown by Validio.
- validio_sdk.load_jtd_schema(filepath: Path) dict¶
Reads a jtd schema from a file on disk.
- Parameters:
filepath – Path to the file containing the schema contents.