Skip to content

Commit

Permalink
Documentation and the python client updated after teradata connector …
Browse files Browse the repository at this point in the history
…was added.
  • Loading branch information
piotrczarnas committed Oct 27, 2024
1 parent 5673647 commit a5dac4e
Show file tree
Hide file tree
Showing 203 changed files with 62,719 additions and 5,841 deletions.
4 changes: 4 additions & 0 deletions distribution/python/dqops/client/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2105,6 +2105,8 @@
from .target_rule_severity_level import TargetRuleSeverityLevel
from .target_table_pattern_spec import TargetTablePatternSpec
from .temporal_unit import TemporalUnit
from .teradata_parameters_spec import TeradataParametersSpec
from .teradata_parameters_spec_properties import TeradataParametersSpecProperties
from .text_built_in_date_formats import TextBuiltInDateFormats
from .time_period_gradient import TimePeriodGradient
from .time_window_filter_parameters import TimeWindowFilterParameters
Expand Down Expand Up @@ -3101,6 +3103,8 @@
"TargetRuleSeverityLevel",
"TargetTablePatternSpec",
"TemporalUnit",
"TeradataParametersSpec",
"TeradataParametersSpecProperties",
"TextBuiltInDateFormats",
"TimePeriodGradient",
"TimestampColumnsSpec",
Expand Down
18 changes: 18 additions & 0 deletions distribution/python/dqops/client/models/connection_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from ..models.statistics_collector_search_filters import (
StatisticsCollectorSearchFilters,
)
from ..models.teradata_parameters_spec import TeradataParametersSpec
from ..models.trino_parameters_spec import TrinoParametersSpec


Expand Down Expand Up @@ -70,6 +71,7 @@ class ConnectionModel:
mariadb (Union[Unset, MariaDbParametersSpec]):
clickhouse (Union[Unset, ClickHouseParametersSpec]):
questdb (Union[Unset, QuestDbParametersSpec]):
teradata (Union[Unset, TeradataParametersSpec]):
run_checks_job_template (Union[Unset, CheckSearchFilters]): Target data quality checks filter, identifies which
checks on which tables and columns should be executed.
run_profiling_checks_job_template (Union[Unset, CheckSearchFilters]): Target data quality checks filter,
Expand Down Expand Up @@ -115,6 +117,7 @@ class ConnectionModel:
mariadb: Union[Unset, "MariaDbParametersSpec"] = UNSET
clickhouse: Union[Unset, "ClickHouseParametersSpec"] = UNSET
questdb: Union[Unset, "QuestDbParametersSpec"] = UNSET
teradata: Union[Unset, "TeradataParametersSpec"] = UNSET
run_checks_job_template: Union[Unset, "CheckSearchFilters"] = UNSET
run_profiling_checks_job_template: Union[Unset, "CheckSearchFilters"] = UNSET
run_monitoring_checks_job_template: Union[Unset, "CheckSearchFilters"] = UNSET
Expand Down Expand Up @@ -208,6 +211,10 @@ def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.questdb, Unset):
questdb = self.questdb.to_dict()

teradata: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.teradata, Unset):
teradata = self.teradata.to_dict()

run_checks_job_template: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.run_checks_job_template, Unset):
run_checks_job_template = self.run_checks_job_template.to_dict()
Expand Down Expand Up @@ -297,6 +304,8 @@ def to_dict(self) -> Dict[str, Any]:
field_dict["clickhouse"] = clickhouse
if questdb is not UNSET:
field_dict["questdb"] = questdb
if teradata is not UNSET:
field_dict["teradata"] = teradata
if run_checks_job_template is not UNSET:
field_dict["run_checks_job_template"] = run_checks_job_template
if run_profiling_checks_job_template is not UNSET:
Expand Down Expand Up @@ -360,6 +369,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
from ..models.statistics_collector_search_filters import (
StatisticsCollectorSearchFilters,
)
from ..models.teradata_parameters_spec import TeradataParametersSpec
from ..models.trino_parameters_spec import TrinoParametersSpec

d = src_dict.copy()
Expand Down Expand Up @@ -497,6 +507,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
else:
questdb = QuestDbParametersSpec.from_dict(_questdb)

_teradata = d.pop("teradata", UNSET)
teradata: Union[Unset, TeradataParametersSpec]
if isinstance(_teradata, Unset):
teradata = UNSET
else:
teradata = TeradataParametersSpec.from_dict(_teradata)

_run_checks_job_template = d.pop("run_checks_job_template", UNSET)
run_checks_job_template: Union[Unset, CheckSearchFilters]
if isinstance(_run_checks_job_template, Unset):
Expand Down Expand Up @@ -603,6 +620,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
mariadb=mariadb,
clickhouse=clickhouse,
questdb=questdb,
teradata=teradata,
run_checks_job_template=run_checks_job_template,
run_profiling_checks_job_template=run_profiling_checks_job_template,
run_monitoring_checks_job_template=run_monitoring_checks_job_template,
Expand Down
18 changes: 18 additions & 0 deletions distribution/python/dqops/client/models/connection_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
from ..models.snowflake_parameters_spec import SnowflakeParametersSpec
from ..models.spark_parameters_spec import SparkParametersSpec
from ..models.sql_server_parameters_spec import SqlServerParametersSpec
from ..models.teradata_parameters_spec import TeradataParametersSpec
from ..models.trino_parameters_spec import TrinoParametersSpec


Expand Down Expand Up @@ -61,6 +62,7 @@ class ConnectionSpec:
mariadb (Union[Unset, MariaDbParametersSpec]):
clickhouse (Union[Unset, ClickHouseParametersSpec]):
questdb (Union[Unset, QuestDbParametersSpec]):
teradata (Union[Unset, TeradataParametersSpec]):
parallel_jobs_limit (Union[Unset, int]): The concurrency limit for the maximum number of parallel SQL queries
executed on this connection.
default_grouping_configuration (Union[Unset, DataGroupingConfigurationSpec]):
Expand Down Expand Up @@ -98,6 +100,7 @@ class ConnectionSpec:
mariadb: Union[Unset, "MariaDbParametersSpec"] = UNSET
clickhouse: Union[Unset, "ClickHouseParametersSpec"] = UNSET
questdb: Union[Unset, "QuestDbParametersSpec"] = UNSET
teradata: Union[Unset, "TeradataParametersSpec"] = UNSET
parallel_jobs_limit: Union[Unset, int] = UNSET
default_grouping_configuration: Union[Unset, "DataGroupingConfigurationSpec"] = (
UNSET
Expand Down Expand Up @@ -184,6 +187,10 @@ def to_dict(self) -> Dict[str, Any]:
if not isinstance(self.questdb, Unset):
questdb = self.questdb.to_dict()

teradata: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.teradata, Unset):
teradata = self.teradata.to_dict()

parallel_jobs_limit = self.parallel_jobs_limit
default_grouping_configuration: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.default_grouping_configuration, Unset):
Expand Down Expand Up @@ -259,6 +266,8 @@ def to_dict(self) -> Dict[str, Any]:
field_dict["clickhouse"] = clickhouse
if questdb is not UNSET:
field_dict["questdb"] = questdb
if teradata is not UNSET:
field_dict["teradata"] = teradata
if parallel_jobs_limit is not UNSET:
field_dict["parallel_jobs_limit"] = parallel_jobs_limit
if default_grouping_configuration is not UNSET:
Expand Down Expand Up @@ -312,6 +321,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
from ..models.snowflake_parameters_spec import SnowflakeParametersSpec
from ..models.spark_parameters_spec import SparkParametersSpec
from ..models.sql_server_parameters_spec import SqlServerParametersSpec
from ..models.teradata_parameters_spec import TeradataParametersSpec
from ..models.trino_parameters_spec import TrinoParametersSpec

d = src_dict.copy()
Expand Down Expand Up @@ -441,6 +451,13 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
else:
questdb = QuestDbParametersSpec.from_dict(_questdb)

_teradata = d.pop("teradata", UNSET)
teradata: Union[Unset, TeradataParametersSpec]
if isinstance(_teradata, Unset):
teradata = UNSET
else:
teradata = TeradataParametersSpec.from_dict(_teradata)

parallel_jobs_limit = d.pop("parallel_jobs_limit", UNSET)

_default_grouping_configuration = d.pop("default_grouping_configuration", UNSET)
Expand Down Expand Up @@ -514,6 +531,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
mariadb=mariadb,
clickhouse=clickhouse,
questdb=questdb,
teradata=teradata,
parallel_jobs_limit=parallel_jobs_limit,
default_grouping_configuration=default_grouping_configuration,
schedules=schedules,
Expand Down
1 change: 1 addition & 0 deletions distribution/python/dqops/client/models/display_hint.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

class DisplayHint(str, Enum):
COLUMN_NAMES = "column_names"
REQUIRES_PAID_VERSION = "requires_paid_version"
TEXTAREA = "textarea"

def __str__(self) -> str:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ class DqoUserProfileModel:
ENTERPRISE license of DQOps.
can_synchronize_to_data_catalog (Union[Unset, bool]): User can synchronize data to a data catalog. The instance
must be configured correctly and the user must have at least an EDITOR role.
can_use_ai_anomaly_detection (Union[Unset, bool]): The DQOps instance is a paid version with advanced AI anomaly
prediction.
"""

user: Union[Unset, str] = UNSET
Expand Down Expand Up @@ -95,6 +97,7 @@ class DqoUserProfileModel:
can_change_own_password: Union[Unset, bool] = UNSET
can_use_data_domains: Union[Unset, bool] = UNSET
can_synchronize_to_data_catalog: Union[Unset, bool] = UNSET
can_use_ai_anomaly_detection: Union[Unset, bool] = UNSET
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
Expand Down Expand Up @@ -134,6 +137,7 @@ def to_dict(self) -> Dict[str, Any]:
can_change_own_password = self.can_change_own_password
can_use_data_domains = self.can_use_data_domains
can_synchronize_to_data_catalog = self.can_synchronize_to_data_catalog
can_use_ai_anomaly_detection = self.can_use_ai_anomaly_detection

field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
Expand Down Expand Up @@ -206,6 +210,8 @@ def to_dict(self) -> Dict[str, Any]:
field_dict["can_synchronize_to_data_catalog"] = (
can_synchronize_to_data_catalog
)
if can_use_ai_anomaly_detection is not UNSET:
field_dict["can_use_ai_anomaly_detection"] = can_use_ai_anomaly_detection

return field_dict

Expand Down Expand Up @@ -285,6 +291,8 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
"can_synchronize_to_data_catalog", UNSET
)

can_use_ai_anomaly_detection = d.pop("can_use_ai_anomaly_detection", UNSET)

dqo_user_profile_model = cls(
user=user,
tenant=tenant,
Expand Down Expand Up @@ -317,6 +325,7 @@ def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
can_change_own_password=can_change_own_password,
can_use_data_domains=can_use_data_domains,
can_synchronize_to_data_catalog=can_synchronize_to_data_catalog,
can_use_ai_anomaly_detection=can_use_ai_anomaly_detection,
)

dqo_user_profile_model.additional_properties = d
Expand Down
1 change: 1 addition & 0 deletions distribution/python/dqops/client/models/provider_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class ProviderType(str, Enum):
SNOWFLAKE = "snowflake"
SPARK = "spark"
SQLSERVER = "sqlserver"
TERADATA = "teradata"
TRINO = "trino"

def __str__(self) -> str:
Expand Down
121 changes: 121 additions & 0 deletions distribution/python/dqops/client/models/teradata_parameters_spec.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
from typing import TYPE_CHECKING, Any, Dict, List, Type, TypeVar, Union

from attrs import define as _attrs_define
from attrs import field as _attrs_field

from ..types import UNSET, Unset

if TYPE_CHECKING:
from ..models.teradata_parameters_spec_properties import (
TeradataParametersSpecProperties,
)


T = TypeVar("T", bound="TeradataParametersSpec")


@_attrs_define
class TeradataParametersSpec:
"""
Attributes:
host (Union[Unset, str]): Teradata host name. Supports also a ${TERADATA_HOST} configuration with a custom
environment variable.
port (Union[Unset, str]): Teradata port number. The default port is 1025. Supports also a ${TERADATA_PORT}
configuration with a custom environment variable.
user (Union[Unset, str]): Teradata user name. The value can be in the ${ENVIRONMENT_VARIABLE_NAME} format to use
dynamic substitution.
password (Union[Unset, str]): Teradata database password. The value can be in the ${ENVIRONMENT_VARIABLE_NAME}
format to use dynamic substitution.
properties (Union[Unset, TeradataParametersSpecProperties]): A dictionary of custom JDBC parameters that are
added to the JDBC connection string, a key/value dictionary.
database (Union[Unset, str]):
"""

host: Union[Unset, str] = UNSET
port: Union[Unset, str] = UNSET
user: Union[Unset, str] = UNSET
password: Union[Unset, str] = UNSET
properties: Union[Unset, "TeradataParametersSpecProperties"] = UNSET
database: Union[Unset, str] = UNSET
additional_properties: Dict[str, Any] = _attrs_field(init=False, factory=dict)

def to_dict(self) -> Dict[str, Any]:
host = self.host
port = self.port
user = self.user
password = self.password
properties: Union[Unset, Dict[str, Any]] = UNSET
if not isinstance(self.properties, Unset):
properties = self.properties.to_dict()

database = self.database

field_dict: Dict[str, Any] = {}
field_dict.update(self.additional_properties)
field_dict.update({})
if host is not UNSET:
field_dict["host"] = host
if port is not UNSET:
field_dict["port"] = port
if user is not UNSET:
field_dict["user"] = user
if password is not UNSET:
field_dict["password"] = password
if properties is not UNSET:
field_dict["properties"] = properties
if database is not UNSET:
field_dict["database"] = database

return field_dict

@classmethod
def from_dict(cls: Type[T], src_dict: Dict[str, Any]) -> T:
from ..models.teradata_parameters_spec_properties import (
TeradataParametersSpecProperties,
)

d = src_dict.copy()
host = d.pop("host", UNSET)

port = d.pop("port", UNSET)

user = d.pop("user", UNSET)

password = d.pop("password", UNSET)

_properties = d.pop("properties", UNSET)
properties: Union[Unset, TeradataParametersSpecProperties]
if isinstance(_properties, Unset):
properties = UNSET
else:
properties = TeradataParametersSpecProperties.from_dict(_properties)

database = d.pop("database", UNSET)

teradata_parameters_spec = cls(
host=host,
port=port,
user=user,
password=password,
properties=properties,
database=database,
)

teradata_parameters_spec.additional_properties = d
return teradata_parameters_spec

@property
def additional_keys(self) -> List[str]:
return list(self.additional_properties.keys())

def __getitem__(self, key: str) -> Any:
return self.additional_properties[key]

def __setitem__(self, key: str, value: Any) -> None:
self.additional_properties[key] = value

def __delitem__(self, key: str) -> None:
del self.additional_properties[key]

def __contains__(self, key: str) -> bool:
return key in self.additional_properties
Loading

0 comments on commit a5dac4e

Please sign in to comment.