nemo_microservices.data_designer.config.validator_params#

Module Contents#

Classes#

CodeValidatorParams

Configuration for code validation. Supports Python and SQL code validation.

LocalCallableValidatorParams

Configuration for local callable validation. Expects a function to be passed that validates the data.

RemoteValidatorParams

Configuration for remote validation. Sends data to a remote endpoint for validation.

ValidatorType

Data#

API#

class nemo_microservices.data_designer.config.validator_params.CodeValidatorParams(/, **data: typing.Any)#

Bases: nemo_microservices.data_designer.config.base.ConfigBase

Configuration for code validation. Supports Python and SQL code validation.

Attributes: code_lang: The language of the code to validate. Supported values include: python, sql:sqlite, sql:postgres, sql:mysql, sql:tsql, sql:bigquery, sql:ansi.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

code_lang: nemo_microservices.data_designer.config.utils.code_lang.CodeLang#

‘Field(…)’

validate_code_lang() typing_extensions.Self#
class nemo_microservices.data_designer.config.validator_params.LocalCallableValidatorParams(/, **data: typing.Any)#

Bases: nemo_microservices.data_designer.config.base.ConfigBase

Configuration for local callable validation. Expects a function to be passed that validates the data.

Attributes: validation_function: Function (Callable[[pd.DataFrame], pd.DataFrame]) to validate the data. Output must contain a column is_valid of type bool. output_schema: The JSON schema for the local callable validator’s output. If not provided, the output will not be validated.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

output_schema: Optional[dict[str, Any]]#

‘Field(…)’

serialize_validation_function(v: Any) Any#
validate_validation_function() typing_extensions.Self#
validation_function: Any#

‘Field(…)’

class nemo_microservices.data_designer.config.validator_params.RemoteValidatorParams(/, **data: typing.Any)#

Bases: nemo_microservices.data_designer.config.base.ConfigBase

Configuration for remote validation. Sends data to a remote endpoint for validation.

Attributes: endpoint_url: The URL of the remote endpoint. output_schema: The JSON schema for the remote validator’s output. If not provided, the output will not be validated. timeout: The timeout for the HTTP request in seconds. Defaults to 30.0. max_retries: The maximum number of retry attempts. Defaults to 3. retry_backoff: The backoff factor for the retry delay in seconds. Defaults to 2.0. max_parallel_requests: The maximum number of parallel requests to make. Defaults to 4.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

endpoint_url: str#

‘Field(…)’

max_parallel_requests: int#

‘Field(…)’

max_retries: int#

‘Field(…)’

output_schema: Optional[dict[str, Any]]#

‘Field(…)’

retry_backoff: float#

‘Field(…)’

timeout: float#

‘Field(…)’

nemo_microservices.data_designer.config.validator_params.SUPPORTED_CODE_LANGUAGES#

None

nemo_microservices.data_designer.config.validator_params.ValidatorParamsT: typing_extensions.TypeAlias#

None

class nemo_microservices.data_designer.config.validator_params.ValidatorType#

Bases: str, enum.Enum

CODE#

‘code’

LOCAL_CALLABLE#

‘local_callable’

REMOTE#

‘remote’