validio_sdk.resource package

Submodules

validio_sdk.resource.channels module

Notification Channels.

class validio_sdk.resource.channels.Channel(name: str, display_name: str | None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Resource

A notification channel configuration.

https://docs.validio.io/docs/channels

resource_class_name() str

Returns the base class name.

class validio_sdk.resource.channels.MsTeamsChannel(name: str, application_link_url: str, webhook_url: str, timezone: str | None = 'UTC', display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Channel

Configuration to send notifications to a Microsoft Teams channel.

https://docs.validio.io/docs/msteams

class validio_sdk.resource.channels.SlackChannel(name: str, application_link_url: str, webhook_url: str, timezone: str | None = 'UTC', display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Channel

Configuration to send notifications to a Slack channel.

https://docs.validio.io/docs/slack

class validio_sdk.resource.channels.WebhookChannel(name: str, application_link_url: str, webhook_url: str, auth_header: str | None, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Channel

Configuration to send notifications to a webhook.

https://docs.validio.io/docs/webhooks

validio_sdk.resource.credentials module

Credentials configuration.

class validio_sdk.resource.credentials.AwsAthenaCredential(name: str, access_key: str, secret_key: str, region: str, query_result_location: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

Athena credential resource.

class validio_sdk.resource.credentials.AwsCredential(name: str, access_key: str, secret_key: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to authenticate against AWS services.

class validio_sdk.resource.credentials.AwsRedshiftCredential(name: str, host: str, port: int, user: str, password: str, default_database: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: PostgresLikeCredential

A credential resource that can be used to connect to a Redshift table.

https://docs.validio.io/docs/redshift

class validio_sdk.resource.credentials.AzureSynapseCredential(name: str, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A base class of Azure Credential resource.

class validio_sdk.resource.credentials.AzureSynapseEntraIdCredential(name: str, host: str, port: int, backend_type: AzureSynapseBackendType, client_id: str, client_secret: str, database: str | None = None, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: AzureSynapseCredential

An Entra ID credential resource that can be used to connect to an Azure Synapse table.

class validio_sdk.resource.credentials.AzureSynapseSqlCredential(name: str, host: str, port: int, backend_type: AzureSynapseBackendType, username: str, password: str, database: str | None = None, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: AzureSynapseCredential

A Sql credential resource that can be used to connect to an Azure Synapse table.

class validio_sdk.resource.credentials.ClickHouseCredential(name: str, protocol: ClickHouseProtocol, host: str, port: int, username: str, password: str, default_database: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to a ClickHouse table.

class validio_sdk.resource.credentials.Credential(name: str, display_name: str | None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Resource

Base class for a credential resource.

https://docs.validio.io/docs/credentials

resource_class_name() str

Returns the base class name.

class validio_sdk.resource.credentials.DatabricksCredential(name: str, host: str, port: int, access_token: str, http_path: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to a Databricks table.

class validio_sdk.resource.credentials.DbtCloudCredential(name: str, warehouse_credential: Credential, account_id: str, token: str, api_base_url: str | None = None, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: DbtCredential

A dbt cloud credential.

class validio_sdk.resource.credentials.DbtCoreCredential(name: str, warehouse_credential: Credential, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: DbtCredential

A dbt core credential.

class validio_sdk.resource.credentials.DbtCredential(name: str, warehouse_credential: Credential, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A dbt base class credential.

class validio_sdk.resource.credentials.DemoCredential(name: str, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A demo credential resource.

class validio_sdk.resource.credentials.GcpCredential(name: str, credential: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to authenticate against Google Cloud Platform services.

class validio_sdk.resource.credentials.KafkaSaslSslPlainCredential(name: str, bootstrap_servers: list[str], username: str, password: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, ca_certificate: str | None = None, __internal__: ResourceGraph | None = None)

Bases: Credential

A Kafka SASL SSL credential.

Security protocol: SASL_SSL Sasl mechanism: PLAIN

https://docs.validio.io/docs/kafka#authentication-methods-for-source-config

class validio_sdk.resource.credentials.KafkaSslCredential(name: str, bootstrap_servers: list[str], ca_certificate: str, client_certificate: str, client_private_key: str, client_private_key_password: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A Kafka TLS credential.

Security protocol: SSL

https://docs.validio.io/docs/kafka#authentication-methods-for-source-config

class validio_sdk.resource.credentials.LookerCredential(name: str, base_url: str, client_id: str, client_secret: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to Looker.

class validio_sdk.resource.credentials.MsPowerBiCredential(name: str, auth: MsPowerBiCredentialEntraId, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to PowerBI using an EntraID credential.

validio_sdk.resource.credentials.MsPowerBiCredentialAuth

alias of MsPowerBiCredentialEntraId

class validio_sdk.resource.credentials.MsPowerBiCredentialEntraId(client_id: str, client_secret: str, tenant_id: str)

Bases: Diffable

Azure EntraID authentication for PowerBI.

class validio_sdk.resource.credentials.PostgreSqlCredential(name: str, host: str, port: int, user: str, password: str, default_database: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: PostgresLikeCredential

A credential resource that can be used to connect to a Postgres table.

https://docs.validio.io/docs/postgresql

class validio_sdk.resource.credentials.PostgresLikeCredential(name: str, host: str, port: int, user: str, password: str, default_database: str, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to a Postgres-compatible table.

class validio_sdk.resource.credentials.SnowflakeCredential(name: str, account: str, user: str | None = None, password: str | None = None, auth: SnowflakeCredentialKeyPair | SnowflakeCredentialUserPassword | None = None, warehouse: str | None = None, role: str | None = None, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to a Snowflake table.

class validio_sdk.resource.credentials.SnowflakeCredentialKeyPair(user: str, private_key: str, private_key_passphrase: str | None = None)

Bases: Diffable

Snowflake key-pair based authentication.

https://docs.snowflake.com/en/user-guide/key-pair-auth

class validio_sdk.resource.credentials.SnowflakeCredentialUserPassword(user: str, password: str)

Bases: Diffable

Snowflake password-based authentication.

class validio_sdk.resource.credentials.TableauConnectedAppCredential(name: str, host: str, user: str, client_id: str, secret_id: str, secret_value: str, site: str | None = None, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to Tableau using connected app.

class validio_sdk.resource.credentials.TableauPersonalAccessTokenCredential(name: str, host: str, token_name: str, token_value: str, site: str | None = None, enable_catalog: bool = False, display_name: str | None = None, ignore_changes: bool = False, __internal__: ResourceGraph | None = None)

Bases: Credential

A credential resource that can be used to connect to Tableau using a personal access token.

validio_sdk.resource.filters module

Filters configuration.

class validio_sdk.resource.filters.BooleanFilter(field: str | FieldSelector, operator: BooleanFilterOperator)

Bases: Filter

A Boolean filter configuration.

https://docs.validio.io/docs/filters#boolean-filter

field: str | FieldSelector
operator: BooleanFilterOperator
class validio_sdk.resource.filters.BooleanFilterOperator(value)

Bases: str, Enum

Configures 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'
class validio_sdk.resource.filters.EnumFilter(field: str | FieldSelector, values: list[str], operator: EnumFilterOperator = EnumFilterOperator.ALLOW)

Bases: Filter

An Enum filter configuration.

https://docs.validio.io/docs/filters#enum

field: str | FieldSelector
operator: EnumFilterOperator = 'ALLOW'
values: list[str]
class validio_sdk.resource.filters.EnumFilterOperator(value)

Bases: str, Enum

Configures 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.resource.filters.Filter

Bases: Diffable

Base class for a filter configuration.

https://docs.validio.io/docs/filters

class validio_sdk.resource.filters.NullFilter(field: str | FieldSelector, operator: NullFilterOperator = NullFilterOperator.IS)

Bases: Filter

A Null filter configuration.

https://docs.validio.io/docs/filters#null

field: str | FieldSelector
operator: NullFilterOperator = 'IS'
class validio_sdk.resource.filters.NullFilterOperator(value)

Bases: str, Enum

Configures 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.resource.filters.SqlFilter(query: str)

Bases: Filter

A SQL filter configuration.

https://docs.validio.io/docs/filters#sql-filter

query: str
class validio_sdk.resource.filters.StringFilter(field: str | FieldSelector, operator: StringFilterOperator, value: str | None = None)

Bases: Filter

A String filter configuration.

https://docs.validio.io/docs/filters#string

field: str | FieldSelector
operator: StringFilterOperator
value: str | None = None
class validio_sdk.resource.filters.StringFilterOperator(value)

Bases: str, Enum

Configures 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.resource.filters.ThresholdFilter(field: str | FieldSelector, value: float, operator: ThresholdFilterOperator)

Bases: Filter

A Threshold filter configuration.

https://docs.validio.io/docs/filters#threshold-filter

field: str | FieldSelector
operator: ThresholdFilterOperator
value: float
class validio_sdk.resource.filters.ThresholdFilterOperator(value)

Bases: str, Enum

Configures 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'

validio_sdk.resource.notification_rules module

Notification rule configuration.

class validio_sdk.resource.notification_rules.Conditions(owner_condition: OwnerNotificationRuleCondition | None = None, segment_conditions: list['SegmentNotificationRuleCondition'] | None = None, severity_condition: SeverityNotificationRuleCondition | None = None, source_condition: SourceNotificationRuleCondition | None = None, tag_conditions: list['TagNotificationRuleCondition'] | None = None, type_condition: TypeNotificationRuleCondition | None = None)

Bases: Diffable

Conditions used for notification rules.

class validio_sdk.resource.notification_rules.NotificationRule(name: str, channel: Channel, conditions: Conditions | None = None, display_name: str | None = None, ignore_changes: bool = False)

Bases: Resource

A notification rule.

https://docs.validio.io/docs/notifications

resource_class_name() str

Returns the base class name.

class validio_sdk.resource.notification_rules.NotificationRuleCondition

Bases: Diffable

A condition for notification rules.

class validio_sdk.resource.notification_rules.OwnerNotificationRuleCondition(owners: list[str])

Bases: NotificationRuleCondition

A condition for owners.

class validio_sdk.resource.notification_rules.SegmentNotificationRuleCondition(segments: dict[str, str])

Bases: NotificationRuleCondition

A condition for segments.

class validio_sdk.resource.notification_rules.SeverityNotificationRuleCondition(severities: list[validio_sdk.graphql_client.enums.IncidentSeverity])

Bases: NotificationRuleCondition

A condition for severity.

class validio_sdk.resource.notification_rules.SourceNotificationRuleCondition(sources: list[validio_sdk.resource.sources.Source])

Bases: NotificationRuleCondition

A condition for sources.

class validio_sdk.resource.notification_rules.TagNotificationRuleCondition(tags: dict[str, str])

Bases: NotificationRuleCondition

A condition for tags.

class validio_sdk.resource.notification_rules.TypeNotificationRuleCondition(types: list[validio_sdk.graphql_client.enums.IssueTypename])

Bases: NotificationRuleCondition

A condition for sources.

validio_sdk.resource.replacement module

Utils for computing replacement diffs on resources.

class validio_sdk.resource.replacement.CascadeReplacementReason(parent_resource_cls: type, parent_resource_name: str)

Bases: ReplacementReason

Represents a replacement occurring on a child resource, due to the parent resource being replaced.

class validio_sdk.resource.replacement.ImmutableFieldReplacementReason(field_name: str, resource_update: ResourceUpdate)

Bases: ReplacementReason

Represents a replacement occurring on a resource, due to an update to an immutable field on the resource.

class validio_sdk.resource.replacement.ReplacementContext(credentials: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>, channels: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>, sources: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>, windows: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>, segmentations: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>, validators: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>, notification_rules: dict[str, validio_sdk.resource.replacement.ReplacementReason] = <factory>)

Bases: object

Contains info around why a resource is being replaced. Grouped by type.

channels: dict[str, validio_sdk.resource.replacement.ReplacementReason]
credentials: dict[str, validio_sdk.resource.replacement.ReplacementReason]
notification_rules: dict[str, validio_sdk.resource.replacement.ReplacementReason]
segmentations: dict[str, validio_sdk.resource.replacement.ReplacementReason]
sources: dict[str, validio_sdk.resource.replacement.ReplacementReason]
validators: dict[str, validio_sdk.resource.replacement.ReplacementReason]
windows: dict[str, validio_sdk.resource.replacement.ReplacementReason]
class validio_sdk.resource.replacement.ReplacementReason

Bases: object

Contains info around why a resource is being replaced.

validio_sdk.resource.segmentations module

Segmentation configuration.

class validio_sdk.resource.segmentations.Segmentation(name: str, source: Source, fields: list[str] | None = None, ignore_changes: bool = False)

Bases: Resource

A segmentation resource.

https://docs.validio.io/docs/segmentation

resource_class_name() str

Returns the class name.

validio_sdk.resource.sources module

Sources.

class validio_sdk.resource.sources.AwsAthenaSource(name: str, credential: AwsAthenaCredential, catalog: str, database: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: Source

An AWS Athena source configuration.

https://docs.validio.io/docs/athena

class validio_sdk.resource.sources.AwsKinesisSource(name: str, credential: AwsCredential, region: str, stream_name: str, display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None, message_format: StreamingMessageFormat | None = None)

Bases: StreamSource

A Kinesis source configuration.

https://docs.validio.io/docs/kinesis

class validio_sdk.resource.sources.AwsRedshiftSource(name: str, credential: PostgreSqlCredential | AwsRedshiftCredential, database: str | None, db_schema: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: PostgresLikeSource

A Redshift source configuration.

https://docs.validio.io/docs/redshift

class validio_sdk.resource.sources.AwsS3Source(name: str, credential: AwsCredential, bucket: str, prefix: str, file_pattern: str | None, schedule: str, display_name: str | None = None, ignore_changes: bool = False, csv: CsvParserConfig | None = None, file_format: FileFormat | None = None, jtd_schema: dict | None = None)

Bases: ObjectStorageSource

An AWS S3 source configuration.

https://docs.validio.io/docs/s3

class validio_sdk.resource.sources.AzureSynapseSource(name: str, credential: AzureSynapseCredential, database: str, db_schema: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: Source

A Azure Synapse source configuration.

https://docs.validio.io/docs/azure-synapse

class validio_sdk.resource.sources.ClickHouseSource(name: str, credential: ClickHouseCredential, database: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: Source

A ClickHouse source configuration.

https://docs.validio.io/docs/clickhouse

class validio_sdk.resource.sources.CsvParserConfig(null_marker: str | None = None, delimiter: str = ',')

Bases: Diffable

CSV configuration for a source.

class validio_sdk.resource.sources.DatabricksSource(name: str, credential: DatabricksCredential, catalog: str, db_schema: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, http_path: str | None = None, jtd_schema: dict | None = None)

Bases: Source

A Databricks source configuration.

https://docs.validio.io/docs/databricks

class validio_sdk.resource.sources.DbtModelRunSource(name: str, credential: GcpCredential, project_name: str, job_name: str, schedule: str = '0/15 * * * *', display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None)

Bases: DbtSource

A source for dbt model run results.

class validio_sdk.resource.sources.DbtSource(name: str, credential: GcpCredential, project_name: str, job_name: str, schedule: str = '0/15 * * * *', display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None)

Bases: Source

A base class source.

class validio_sdk.resource.sources.DbtTestResultSource(name: str, credential: GcpCredential, project_name: str, job_name: str, schedule: str = '0/15 * * * *', display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None)

Bases: DbtSource

A source for dbt test results.

class validio_sdk.resource.sources.DemoSource(name: str, credential: DemoCredential, display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None)

Bases: Source

A Demo source configuration.

class validio_sdk.resource.sources.GcpBigQuerySource(name: str, credential: GcpCredential, project: str, dataset: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: Source

A BigQuery source configuration.

https://docs.validio.io/docs/bigquery

class validio_sdk.resource.sources.GcpPubSubBaseSource(name: str, credential: GcpCredential, project: str, subscription_id: str, display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None, message_format: StreamingMessageFormat | None = None)

Bases: StreamSource, ABC

Base definition for PubSub source configuration.

class validio_sdk.resource.sources.GcpPubSubLiteSource(name: str, credential: GcpCredential, project: str, location: str, subscription_id: str, display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None, message_format: StreamingMessageFormat | None = None)

Bases: GcpPubSubBaseSource

A PubSubLite source configuration.

class validio_sdk.resource.sources.GcpPubSubSource(name: str, credential: GcpCredential, project: str, subscription_id: str, display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None, message_format: StreamingMessageFormat | None = None)

Bases: GcpPubSubBaseSource

A PubSub source configuration. See GcpPubSubBase for properties.

class validio_sdk.resource.sources.GcpStorageSource(name: str, credential: GcpCredential, project: str, bucket: str, folder: str, file_pattern: str | None, schedule: str, display_name: str | None = None, ignore_changes: bool = False, csv: CsvParserConfig | None = None, file_format: FileFormat | None = None, jtd_schema: dict | None = None)

Bases: ObjectStorageSource

An GCS source configuration.

https://docs.validio.io/docs/gcs

class validio_sdk.resource.sources.KafkaSource(name: str, credential: KafkaSslCredential | KafkaSaslSslPlainCredential, topic: str, display_name: str | None = None, ignore_changes: bool = False, jtd_schema: dict | None = None, message_format: StreamingMessageFormat | None = None)

Bases: StreamSource

A Kafka source configuration.

https://docs.validio.io/docs/kafka

validio_sdk.resource.sources.MAX_LOOKBACK_DAYS = 365

We allow only 5-digit cron expressions

class validio_sdk.resource.sources.ObjectStorageSource(name: str, credential: Credential, bucket: str, file_pattern: str | None, schedule: str, display_name: str | None, ignore_changes: bool = False, csv: CsvParserConfig | None = None, file_format: FileFormat | None = None, jtd_schema: dict | None = None)

Bases: Source, ABC

Base class for object storage source configuration.

https://docs.validio.io/docs/s3

class validio_sdk.resource.sources.PostgreSqlSource(name: str, credential: PostgreSqlCredential | AwsRedshiftCredential, database: str | None, db_schema: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: PostgresLikeSource

A PostgreSql source configuration.

https://docs.validio.io/docs/postgresql

class validio_sdk.resource.sources.PostgresLikeSource(name: str, credential: PostgreSqlCredential | AwsRedshiftCredential, database: str | None, db_schema: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, jtd_schema: dict | None = None)

Bases: Source

A Postgres compatible source configuration.

class validio_sdk.resource.sources.SnowflakeSource(name: str, credential: SnowflakeCredential, database: str, db_schema: str, table: str, lookback_days: int, schedule: str, display_name: str | None = None, ignore_changes: bool = False, cursor_field: str | None = None, warehouse: str | None = None, role: str | None = None, jtd_schema: dict | None = None)

Bases: Source

A Snowflake source configuration.

https://docs.validio.io/docs/snowflake

class validio_sdk.resource.sources.Source(name: str, credential: Credential, display_name: str | None, ignore_changes: bool = False, jtd_schema: dict | None = None)

Bases: Resource

A source configuration.

https://docs.validio.io/docs/sources

resource_class_name() str

Returns the base class name.

class validio_sdk.resource.sources.StreamSource(name: str, credential: Credential, display_name: str | None, ignore_changes: bool = False, jtd_schema: dict | None = None, message_format: StreamingMessageFormat | None = None)

Bases: Source

Base class for streaming sources.

class validio_sdk.resource.sources.StreamingMessageFormat(format: StreamingSourceMessageFormat | None = StreamingSourceMessageFormat.JSON, db_schema: str | None = None)

Bases: Diffable

Message format configuration for a streaming source.

validio_sdk.resource.thresholds module

Threshold configuration.

class validio_sdk.resource.thresholds.DifferenceThreshold(difference_type: DifferenceType, operator: DifferenceOperator, number_of_windows: int, value: int)

Bases: Threshold

A dynamic threshold configuration.

https://docs.validio.io/docs/thresholds#difference-threshold

class validio_sdk.resource.thresholds.DynamicThreshold(sensitivity: float = 3, decision_bounds_type: DecisionBoundsType = DecisionBoundsType.UPPER_AND_LOWER)

Bases: Threshold

A dynamic threshold configuration.

https://docs.validio.io/docs/thresholds#dynamic-threshold

class validio_sdk.resource.thresholds.FixedThreshold(value: float, operator: ComparisonOperator)

Bases: Threshold

A fixed threshold configuration.

https://docs.validio.io/docs/thresholds#fixed-threshold

class validio_sdk.resource.thresholds.Threshold

Bases: Diffable

Base class for a threshold configuration.

https://docs.validio.io/docs/thresholds

validio_sdk.resource.validators module

Validator configuration.

class validio_sdk.resource.validators.CategoricalDistributionValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.CategoricalDistributionMetric, source_field: str | ~validio_sdk.resource._field_selector.FieldSelector, reference_source_field: str | ~validio_sdk.resource._field_selector.FromFieldSelector, reference: ~validio_sdk.resource.validators.Reference, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Categorical distribution validator resource.

https://docs.validio.io/docs/categorical-distribution

class validio_sdk.resource.validators.FreshnessValidator(name: str, window: ~validio_sdk.resource.windows.TumblingWindow, segmentation: ~validio_sdk.resource.segmentations.Segmentation, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, source_field: str | None = None, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Freshness validator resource.

https://docs.validio.io/docs/freshness

class validio_sdk.resource.validators.NumericAnomalyValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.NumericAnomalyMetric, source_field: str | ~validio_sdk.resource._field_selector.FieldSelector, reference_source_field: str | ~validio_sdk.resource._field_selector.FromFieldSelector, reference: ~validio_sdk.resource.validators.Reference, sensitivity: float, minimum_absolute_difference: float, minimum_relative_difference_percent: float, minimum_reference_datapoints: float | None = None, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Numeric anomaly validator resource.

https://docs.validio.io/docs/numeric-anomaly

class validio_sdk.resource.validators.NumericDistributionValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.NumericDistributionMetric, source_field: str | ~validio_sdk.resource._field_selector.FieldSelector, reference_source_field: str | ~validio_sdk.resource._field_selector.FromFieldSelector, reference: ~validio_sdk.resource.validators.Reference, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Numeric distribution validator resource.

https://docs.validio.io/docs/numeric-distribution

class validio_sdk.resource.validators.NumericValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.NumericMetric, source_field: str | ~validio_sdk.resource._field_selector.FieldSelector, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Numeric validator resource.

https://docs.validio.io/docs/numeric

class validio_sdk.resource.validators.Reference(source: Source, window: Window, history: int, offset: int, filter: Filter | None = None)

Bases: Diffable

Represents configuration for reference validators.

See the Validio docs for more info on reference configuration https://docs.validio.io/docs/reference-source-config

class validio_sdk.resource.validators.RelativeTimeValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.RelativeTimeMetric, source_field_minuend: str, source_field_subtrahend: str, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Relative time validator resource.

https://docs.validio.io/docs/relative-time

class validio_sdk.resource.validators.RelativeVolumeValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.RelativeVolumeMetric, reference: ~validio_sdk.resource.validators.Reference, source_field: str | None = None, reference_source_field: str | None = None, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A Relative volume validator resource.

https://docs.validio.io/docs/relative-volume

class validio_sdk.resource.validators.SqlValidator(name: str, window: ~validio_sdk.resource.windows.TumblingWindow, segmentation: ~validio_sdk.resource.segmentations.Segmentation, query: str, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False)

Bases: Validator

A SQL validator resource.

https://docs.validio.io/docs/custom-sql

class validio_sdk.resource.validators.Validator(name: str, window: Window, segmentation: Segmentation, threshold: Threshold, display_name: str | None, filter: Filter | None = None, reference: Reference | None = None, initialize_with_backfill: bool = False, ignore_changes: bool = False)

Bases: Resource, ABC

Base class for a validator resources.

https://docs.validio.io/docs/validators

resource_class_name() str

Returns the base class name.

class validio_sdk.resource.validators.VolumeValidator(name: str, window: ~validio_sdk.resource.windows.Window, segmentation: ~validio_sdk.resource.segmentations.Segmentation, metric: ~validio_sdk.graphql_client.enums.VolumeMetric, source_fields: list[str] | None = None, threshold: ~validio_sdk.resource.thresholds.Threshold = <validio_sdk.resource.thresholds.DynamicThreshold object>, filter: ~validio_sdk.resource.filters.Filter | None = None, initialize_with_backfill: bool = False, display_name: str | None = None, ignore_changes: bool = False, optional_source_field: str | ~validio_sdk.resource._field_selector.FieldSelector | None = None)

Bases: Validator

A Volume validator resource.

https://docs.validio.io/docs/volume

validio_sdk.resource.windows module

Window configuration.

class validio_sdk.resource.windows.FileWindow(name: str, source: Source, data_time_field: str, ignore_changes: bool = False)

Bases: Window

A File window resource.

https://docs.validio.io/docs/windows-configuration#34-file-window

class validio_sdk.resource.windows.FixedBatchWindow(name: str, source: Source, data_time_field: str, batch_size: int, segmented_batching: bool = False, batch_timeout_secs: int | None = None, ignore_changes: bool = False)

Bases: Window

A FixedBatch window resource.

https://docs.validio.io/docs/windows-configuration#31-fixed-batch-window

class validio_sdk.resource.windows.GlobalWindow(name: str, source: Source, ignore_changes: bool = False)

Bases: Window

A Global window resource.

Represent a single window spanning over all the data.

class validio_sdk.resource.windows.TumblingWindow(name: str, source: Source, data_time_field: str, window_size: int, time_unit: WindowTimeUnit, window_timeout_disabled: bool = False, ignore_changes: bool = False)

Bases: Window

A Tumbling window resource.

class validio_sdk.resource.windows.Window(name: str, source: Source, display_name: str | None, ignore_changes: bool = False)

Bases: Resource

Base class for a window resource.

https://docs.validio.io/docs/windows

resource_class_name() str

Returns the base class name.

Module contents

class validio_sdk.resource.FieldDataType(value)

Bases: str, Enum

Represents the datatype of a field.

BOOLEAN = 'BOOLEAN'

Represents a boolean datatype.

NUMERIC = 'NUMERIC'

Represents a numeric datatype: This is used for all integer and float types.

STRING = 'STRING'

Represents a string datatype.

TIMESTAMP = 'TIMESTAMP'

Represents a timestamp datatype.

class validio_sdk.resource.FieldSelector(data_type: FieldDataType, nullable: bool | None = None, regex: str | None = None)

Bases: object

FieldSelector lets you select multiple fields at once to apply a validator on. It describes the attributes of the fields to be selected.

data_type: FieldDataType

Matches all fields that has the specified datatype.

nullable: bool | None = None

If provided, nullable narrows down the selected set of fields so far to only those that match the provided nullability. i.e if nullable is True, then only nullable fields will be selected.

static reference() FromFieldSelector
regex: str | None = None

If provided, regex contains a regular expression pattern that will be matched against the selected set of fields so far and narrowed down to only those for which the regex match returns true on the field name.