mostlyai 5.5.0__tar.gz → 5.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mostlyai-5.5.0 → mostlyai-5.6.0}/PKG-INFO +3 -3
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/__init__.py +1 -1
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/auto_detect.py +4 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/base.py +8 -6
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/hive.py +4 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/metadata_objects.py +58 -58
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/non_context.py +323 -184
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/jobs.py +12 -9
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_finalize_generation.py +84 -22
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_finalize_training.py +161 -36
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/domain.py +35 -1
- {mostlyai-5.5.0 → mostlyai-5.6.0}/pyproject.toml +3 -3
- {mostlyai-5.5.0 → mostlyai-5.6.0}/.gitignore +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/LICENSE +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/README.md +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/base.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/context.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/conversions.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/bigquery.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/databricks.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/mssql.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/mysql.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/oracle.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/postgresql.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/redshift.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/snowflake.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/sqlite.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/db/types_coercion.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/dtype.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/exceptions.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/base.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/container/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/container/aws.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/container/azure.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/container/bucket_based.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/container/gcs.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/container/minio.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/table/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/table/csv.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/table/feather.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/table/json.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/table/parquet.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/file/utils.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/language_model.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/progress_callback.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/pull.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/pull_context.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/pull_utils.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/push.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/util/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/util/common.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_data/util/kerberos.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/cli.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/connectors.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/migration.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/plan.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_analyze_training_data.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_create_data_report.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_create_model_report.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_deliver_data.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_encode_training_data.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_generate_data.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_generate_model_report_data.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_pull_training_data.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/execution/step_train_model.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/generators.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/progress.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/routes.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/server.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/storage.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/_local/synthetic_datasets.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/__init__.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/_base_utils.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/_naming_conventions.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/_utils.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/api.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/artifacts.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/base.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/connectors.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/datasets.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/exceptions.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/generators.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/client/synthetic_datasets.py +0 -0
- {mostlyai-5.5.0 → mostlyai-5.6.0}/mostlyai/sdk/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mostlyai
|
|
3
|
-
Version: 5.
|
|
3
|
+
Version: 5.6.0
|
|
4
4
|
Summary: Synthetic Data SDK
|
|
5
5
|
Project-URL: homepage, https://app.mostly.ai/
|
|
6
6
|
Project-URL: repository, https://github.com/mostly-ai/mostlyai
|
|
@@ -60,7 +60,7 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local'
|
|
|
60
60
|
Requires-Dist: filelock>=3.16.1; extra == 'local'
|
|
61
61
|
Requires-Dist: gcsfs>=2023.1.0; extra == 'local'
|
|
62
62
|
Requires-Dist: joblib>=1.4.2; extra == 'local'
|
|
63
|
-
Requires-Dist: mostlyai-engine==
|
|
63
|
+
Requires-Dist: mostlyai-engine==2.0.0; extra == 'local'
|
|
64
64
|
Requires-Dist: mostlyai-qa==1.9.8; extra == 'local'
|
|
65
65
|
Requires-Dist: networkx<4,>=3.0; extra == 'local'
|
|
66
66
|
Requires-Dist: openpyxl>=3.1.5; extra == 'local'
|
|
@@ -82,7 +82,7 @@ Requires-Dist: fastapi<0.116,>=0.115.6; extra == 'local-gpu'
|
|
|
82
82
|
Requires-Dist: filelock>=3.16.1; extra == 'local-gpu'
|
|
83
83
|
Requires-Dist: gcsfs>=2023.1.0; extra == 'local-gpu'
|
|
84
84
|
Requires-Dist: joblib>=1.4.2; extra == 'local-gpu'
|
|
85
|
-
Requires-Dist: mostlyai-engine[gpu]==
|
|
85
|
+
Requires-Dist: mostlyai-engine[gpu]==2.0.0; extra == 'local-gpu'
|
|
86
86
|
Requires-Dist: mostlyai-qa==1.9.8; extra == 'local-gpu'
|
|
87
87
|
Requires-Dist: networkx<4,>=3.0; extra == 'local-gpu'
|
|
88
88
|
Requires-Dist: openpyxl>=3.1.5; extra == 'local-gpu'
|
|
@@ -49,4 +49,4 @@ For more information, visit: https://mostly-ai.github.io/mostlyai/
|
|
|
49
49
|
from mostlyai.sdk.client.api import MostlyAI
|
|
50
50
|
|
|
51
51
|
__all__ = ["MostlyAI"]
|
|
52
|
-
__version__ = "5.
|
|
52
|
+
__version__ = "5.6.0" # Do not set this manually. Use poetry version [params].
|
|
@@ -84,6 +84,10 @@ def auto_detect_encoding_type(x: pd.Series):
|
|
|
84
84
|
x = x.astype(str)
|
|
85
85
|
x = x[x.str.strip() != ""] # filter out empty and whitespace-only strings
|
|
86
86
|
|
|
87
|
+
# if all values are null or empty, default to categorical
|
|
88
|
+
if len(x) == 0:
|
|
89
|
+
return ModelEncodingType.tabular_categorical
|
|
90
|
+
|
|
87
91
|
# if all non-null values can be converted to datetime -> datetime encoding
|
|
88
92
|
if safe_convert_datetime(x).notna().all():
|
|
89
93
|
return ModelEncodingType.tabular_datetime
|
|
@@ -1131,10 +1131,13 @@ class SqlAlchemyTable(DBTable, abc.ABC):
|
|
|
1131
1131
|
fetch_chunk_size = fetch_chunk_size if fetch_chunk_size is not None else 100_000
|
|
1132
1132
|
yield_chunk_size = yield_chunk_size if yield_chunk_size is not None else fetch_chunk_size
|
|
1133
1133
|
stmt = self._sa_select(columns)
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1134
|
+
chunk_idx = 0
|
|
1135
|
+
total_time = 0
|
|
1136
|
+
# use context managers to ensure proper cleanup of engine and session
|
|
1137
|
+
with (
|
|
1138
|
+
self.container.use_sa_engine() as sa_engine,
|
|
1139
|
+
sessionmaker(bind=sa_engine)() as session,
|
|
1140
|
+
):
|
|
1138
1141
|
results_generator = None
|
|
1139
1142
|
try:
|
|
1140
1143
|
conn = session.connection()
|
|
@@ -1162,10 +1165,9 @@ class SqlAlchemyTable(DBTable, abc.ABC):
|
|
|
1162
1165
|
yield chunks_df
|
|
1163
1166
|
_LOG.info(f"finished reading {chunk_idx} chunks in {time.time() - t00:.2f}s (strategy=scan)")
|
|
1164
1167
|
finally:
|
|
1165
|
-
# explicitly close
|
|
1168
|
+
# explicitly close the results generator to prevent connection leaks
|
|
1166
1169
|
if results_generator is not None:
|
|
1167
1170
|
results_generator.close()
|
|
1168
|
-
session.close()
|
|
1169
1171
|
|
|
1170
1172
|
def is_column_indexed(self, column: str) -> bool:
|
|
1171
1173
|
with self.container.use_sa_engine() as sa_engine:
|
|
@@ -172,6 +172,10 @@ class HiveContainer(SqlAlchemyContainer):
|
|
|
172
172
|
def table_class(cls):
|
|
173
173
|
return HiveTable
|
|
174
174
|
|
|
175
|
+
def use_sa_engine(self, mode="read_data", dispose=False):
|
|
176
|
+
# always keep the engine alive to reuse the cached connection
|
|
177
|
+
return super().use_sa_engine(mode=mode, dispose=dispose)
|
|
178
|
+
|
|
175
179
|
def does_database_exist(self) -> bool:
|
|
176
180
|
with self.init_sa_connection("db_exist_check") as connection:
|
|
177
181
|
result = connection.execute(sa.text("SHOW DATABASES"))
|
|
@@ -14,7 +14,8 @@
|
|
|
14
14
|
|
|
15
15
|
from typing import Annotated, TypeVar
|
|
16
16
|
|
|
17
|
-
from pydantic import BaseModel, ConfigDict, Field, field_validator
|
|
17
|
+
from pydantic import AliasChoices, BaseModel, ConfigDict, Field, field_validator
|
|
18
|
+
from pydantic.alias_generators import to_camel
|
|
18
19
|
from pydantic.json_schema import SkipJsonSchema
|
|
19
20
|
|
|
20
21
|
T = TypeVar("T")
|
|
@@ -22,49 +23,53 @@ T = TypeVar("T")
|
|
|
22
23
|
Nullable = T | SkipJsonSchema[None]
|
|
23
24
|
|
|
24
25
|
|
|
25
|
-
class
|
|
26
|
+
class CustomBaseModel(BaseModel):
|
|
27
|
+
model_config = ConfigDict(alias_generator=to_camel, populate_by_name=True)
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class SslCertificates(CustomBaseModel):
|
|
26
31
|
# SSL for Postgres
|
|
27
|
-
root_certificate: Nullable[str] = Field(None,
|
|
28
|
-
ssl_certificate: Nullable[str] = Field(None,
|
|
29
|
-
ssl_certificate_key: Nullable[str] = Field(None,
|
|
32
|
+
root_certificate: Nullable[str] = Field(None, description="Encrypted root certificate.")
|
|
33
|
+
ssl_certificate: Nullable[str] = Field(None, description="Encrypted client certificate.")
|
|
34
|
+
ssl_certificate_key: Nullable[str] = Field(None, description="Encrypted client key.")
|
|
30
35
|
# SSL for Hive
|
|
31
36
|
keystore: Nullable[str] = Field(None, description="Encrypted keystore.")
|
|
32
|
-
keystore_password: Nullable[str] = Field(None,
|
|
33
|
-
ca_certificate: Nullable[str] = Field(None,
|
|
37
|
+
keystore_password: Nullable[str] = Field(None, description="Encrypted keystore password.")
|
|
38
|
+
ca_certificate: Nullable[str] = Field(None, description="Encrypted CA certificate.")
|
|
34
39
|
|
|
35
40
|
|
|
36
|
-
class AwsS3FileContainerParameters(
|
|
37
|
-
access_key: Nullable[str] = Field(None
|
|
38
|
-
secret_key: Nullable[str] = Field(None
|
|
39
|
-
endpoint_url: Nullable[str] = Field(None
|
|
41
|
+
class AwsS3FileContainerParameters(CustomBaseModel):
|
|
42
|
+
access_key: Nullable[str] = Field(None)
|
|
43
|
+
secret_key: Nullable[str] = Field(None)
|
|
44
|
+
endpoint_url: Nullable[str] = Field(None)
|
|
40
45
|
# SSL
|
|
41
|
-
ssl_enabled: Nullable[bool] = Field(False
|
|
42
|
-
ca_certificate: Nullable[str] = Field(None,
|
|
46
|
+
ssl_enabled: Nullable[bool] = Field(False)
|
|
47
|
+
ca_certificate: Nullable[str] = Field(None, description="Encrypted CA certificate.")
|
|
43
48
|
|
|
44
49
|
|
|
45
|
-
class AzureBlobFileContainerParameters(
|
|
46
|
-
account_name: Nullable[str] = Field(None
|
|
47
|
-
account_key: Nullable[str] = Field(None
|
|
48
|
-
client_id: Nullable[str] = Field(None
|
|
49
|
-
client_secret: Nullable[str] = Field(None
|
|
50
|
-
tenant_id: Nullable[str] = Field(None
|
|
50
|
+
class AzureBlobFileContainerParameters(CustomBaseModel):
|
|
51
|
+
account_name: Nullable[str] = Field(None)
|
|
52
|
+
account_key: Nullable[str] = Field(None)
|
|
53
|
+
client_id: Nullable[str] = Field(None)
|
|
54
|
+
client_secret: Nullable[str] = Field(None)
|
|
55
|
+
tenant_id: Nullable[str] = Field(None)
|
|
51
56
|
|
|
52
57
|
|
|
53
|
-
class GcsContainerParameters(
|
|
54
|
-
key_file: Nullable[str] = Field(None
|
|
58
|
+
class GcsContainerParameters(CustomBaseModel):
|
|
59
|
+
key_file: Nullable[str] = Field(None)
|
|
55
60
|
|
|
56
61
|
|
|
57
|
-
class MinIOContainerParameters(
|
|
58
|
-
endpoint_url: Nullable[str] = Field(None
|
|
59
|
-
access_key: Nullable[str] = Field(None
|
|
60
|
-
secret_key: Nullable[str] = Field(None
|
|
62
|
+
class MinIOContainerParameters(CustomBaseModel):
|
|
63
|
+
endpoint_url: Nullable[str] = Field(None)
|
|
64
|
+
access_key: Nullable[str] = Field(None)
|
|
65
|
+
secret_key: Nullable[str] = Field(None)
|
|
61
66
|
|
|
62
67
|
|
|
63
|
-
class LocalFileContainerParameters(
|
|
68
|
+
class LocalFileContainerParameters(CustomBaseModel):
|
|
64
69
|
pass
|
|
65
70
|
|
|
66
71
|
|
|
67
|
-
class SqlAlchemyContainerParameters(
|
|
72
|
+
class SqlAlchemyContainerParameters(CustomBaseModel):
|
|
68
73
|
model_config = ConfigDict(extra="allow")
|
|
69
74
|
|
|
70
75
|
username: Nullable[str] = None
|
|
@@ -73,22 +78,21 @@ class SqlAlchemyContainerParameters(BaseModel):
|
|
|
73
78
|
port: Nullable[str | int] = None
|
|
74
79
|
dbname: Nullable[str] = Field(None, alias="database")
|
|
75
80
|
# SSL
|
|
76
|
-
ssl_enabled: Nullable[bool] = Field(False
|
|
77
|
-
root_certificate: Nullable[str] = Field(None,
|
|
78
|
-
ssl_certificate: Nullable[str] = Field(None,
|
|
79
|
-
ssl_certificate_key: Nullable[str] = Field(None,
|
|
81
|
+
ssl_enabled: Nullable[bool] = Field(False)
|
|
82
|
+
root_certificate: Nullable[str] = Field(None, description="Encrypted root certificate.")
|
|
83
|
+
ssl_certificate: Nullable[str] = Field(None, description="Encrypted client certificate.")
|
|
84
|
+
ssl_certificate_key: Nullable[str] = Field(None, description="Encrypted client key.")
|
|
80
85
|
keystore: Nullable[str] = Field(None, description="Encrypted keystore.")
|
|
81
|
-
keystore_password: Nullable[str] = Field(None,
|
|
82
|
-
ca_certificate: Nullable[str] = Field(None,
|
|
86
|
+
keystore_password: Nullable[str] = Field(None, description="Encrypted keystore password.")
|
|
87
|
+
ca_certificate: Nullable[str] = Field(None, description="Encrypted CA certificate.")
|
|
83
88
|
# Kerberos
|
|
84
|
-
kerberos_enabled: Nullable[bool] = Field(False
|
|
85
|
-
kerberos_kdc_host: Nullable[str] = Field(None
|
|
86
|
-
kerberos_krb5_conf: Nullable[str] = Field(None
|
|
87
|
-
kerberos_service_principal: Nullable[str] = Field(None
|
|
88
|
-
kerberos_client_principal: Nullable[str] = Field(None
|
|
89
|
+
kerberos_enabled: Nullable[bool] = Field(False)
|
|
90
|
+
kerberos_kdc_host: Nullable[str] = Field(None)
|
|
91
|
+
kerberos_krb5_conf: Nullable[str] = Field(None)
|
|
92
|
+
kerberos_service_principal: Nullable[str] = Field(None)
|
|
93
|
+
kerberos_client_principal: Nullable[str] = Field(None)
|
|
89
94
|
kerberos_keytab: Nullable[str] = Field(
|
|
90
95
|
None,
|
|
91
|
-
alias="kerberosKeytab",
|
|
92
96
|
description="Encrypted content of keytab file of client principal if it is defined. Otherwise, it is the one for service principal.",
|
|
93
97
|
)
|
|
94
98
|
|
|
@@ -106,7 +110,7 @@ class SqlAlchemyContainerParameters(BaseModel):
|
|
|
106
110
|
|
|
107
111
|
|
|
108
112
|
class OracleContainerParameters(SqlAlchemyContainerParameters):
|
|
109
|
-
connection_type: Nullable[str] = Field("SID"
|
|
113
|
+
connection_type: Nullable[str] = Field("SID")
|
|
110
114
|
|
|
111
115
|
|
|
112
116
|
class SnowflakeContainerParameters(SqlAlchemyContainerParameters):
|
|
@@ -115,64 +119,60 @@ class SnowflakeContainerParameters(SqlAlchemyContainerParameters):
|
|
|
115
119
|
|
|
116
120
|
|
|
117
121
|
class BigQueryContainerParameters(SqlAlchemyContainerParameters):
|
|
118
|
-
password: Nullable[str] = Field(None,
|
|
122
|
+
password: Nullable[str] = Field(None, validation_alias=AliasChoices("keyFile", "key_file"))
|
|
119
123
|
|
|
120
124
|
|
|
121
125
|
class DatabricksContainerParameters(SqlAlchemyContainerParameters):
|
|
122
|
-
password: Nullable[str] = Field(None,
|
|
126
|
+
password: Nullable[str] = Field(None, validation_alias=AliasChoices("accessToken", "access_token"))
|
|
123
127
|
dbname: Nullable[str] = Field(None, alias="catalog")
|
|
124
|
-
http_path: Nullable[str] = Field(None
|
|
125
|
-
client_id: Nullable[str] = Field(None
|
|
126
|
-
client_secret: Nullable[str] = Field(None
|
|
127
|
-
tenant_id: Nullable[str] = Field(None
|
|
128
|
+
http_path: Nullable[str] = Field(None)
|
|
129
|
+
client_id: Nullable[str] = Field(None)
|
|
130
|
+
client_secret: Nullable[str] = Field(None)
|
|
131
|
+
tenant_id: Nullable[str] = Field(None)
|
|
128
132
|
|
|
129
133
|
|
|
130
|
-
class ConnectionResponse(
|
|
134
|
+
class ConnectionResponse(CustomBaseModel):
|
|
131
135
|
connection_succeeded: bool = Field(
|
|
132
136
|
False,
|
|
133
|
-
alias="connectionSucceeded",
|
|
134
137
|
description="Boolean that shows the connection status",
|
|
135
138
|
)
|
|
136
139
|
message: str = Field("", description="A message describing the result of the test.")
|
|
137
140
|
|
|
138
141
|
|
|
139
|
-
class LocationsResponse(
|
|
142
|
+
class LocationsResponse(CustomBaseModel):
|
|
140
143
|
locations: list[str] = Field(None, description="The list of locations")
|
|
141
144
|
|
|
142
145
|
|
|
143
|
-
class ColumnSchema(
|
|
146
|
+
class ColumnSchema(CustomBaseModel):
|
|
144
147
|
name: Nullable[str] = None
|
|
145
|
-
original_data_type: Annotated[Nullable[str], Field(
|
|
146
|
-
default_model_encoding_type: Annotated[Nullable[str], Field(
|
|
148
|
+
original_data_type: Annotated[Nullable[str], Field()] = None
|
|
149
|
+
default_model_encoding_type: Annotated[Nullable[str], Field()] = None
|
|
147
150
|
|
|
148
151
|
|
|
149
|
-
class ConstraintSchema(
|
|
152
|
+
class ConstraintSchema(CustomBaseModel):
|
|
150
153
|
foreign_key: Annotated[
|
|
151
154
|
Nullable[str],
|
|
152
155
|
Field(
|
|
153
|
-
alias="foreignKey",
|
|
154
156
|
description="The name of the foreign key column within this table.",
|
|
155
157
|
),
|
|
156
158
|
] = None
|
|
157
159
|
referenced_table: Annotated[
|
|
158
160
|
Nullable[str],
|
|
159
|
-
Field(
|
|
161
|
+
Field(description="The name of the reference table."),
|
|
160
162
|
] = None
|
|
161
163
|
|
|
162
164
|
|
|
163
|
-
class TableSchema(
|
|
165
|
+
class TableSchema(CustomBaseModel):
|
|
164
166
|
name: Annotated[Nullable[str], Field(description="The name of the table.")] = None
|
|
165
167
|
totalRows: Annotated[
|
|
166
168
|
Nullable[int],
|
|
167
169
|
Field(
|
|
168
|
-
alias="totalRows",
|
|
169
170
|
description="The total number of rows in the table.",
|
|
170
171
|
),
|
|
171
172
|
] = None
|
|
172
173
|
primary_key: Annotated[
|
|
173
174
|
Nullable[str],
|
|
174
175
|
Field(
|
|
175
|
-
alias="primaryKey",
|
|
176
176
|
description="The name of a primary key column. Only applicable for DB connectors.",
|
|
177
177
|
),
|
|
178
178
|
] = None
|