Skip to content

Commit f175818

Browse files
chore: regenerate client from OpenAPI spec (#80)
Co-authored-by: hotdata-automation[bot] <267177015+hotdata-automation[bot]@users.noreply.github.com>
1 parent 023ed7b commit f175818

15 files changed

Lines changed: 66 additions & 56 deletions

.openapi-generator/FILES

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,4 @@ requirements.txt
313313
setup.cfg
314314
test-requirements.txt
315315
test/__init__.py
316-
test/test_database_context_api.py
317-
test/test_database_context_entry.py
318-
test/test_get_database_context_response.py
319-
test/test_list_database_contexts_response.py
320-
test/test_upsert_database_context_request.py
321-
test/test_upsert_database_context_response.py
322316
tox.ini

docs/CreateConnectionRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
1212
**secret_name** | **str** | Optional reference to a secret by name. If provided, this secret will be used for authentication. Mutually exclusive with &#x60;secret_id&#x60;. | [optional]
1313
**skip_discovery** | **bool** | If true, skip automatic schema discovery after registering the connection. The connection will be created but no tables will be discovered. You can run discovery later via the refresh endpoint. | [optional]
1414
**source_type** | **str** | |
15+
**storage_backend** | **str** | Physical storage backend for tables created under this connection. &#x60;\&quot;parquet\&quot;&#x60; (default) uses the versioned parquet cache. &#x60;\&quot;ducklake\&quot;&#x60; stores data in a DuckLake catalog in the shared metadata DB configured via &#x60;ducklake.metadata_pg_url&#x60;; accepted for any source type and requires that pool to be configured. | [optional]
1516

1617
## Example
1718

docs/CreateDatabaseRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Request body for POST /databases
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**description** | **str** | Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by &#x60;id&#x60;. | [optional]
109
**expires_at** | **str** | When this database expires. Accepts either an RFC 3339 timestamp (e.g. &#x60;\&quot;2026-06-01T00:00:00Z\&quot;&#x60;) or a relative duration suffixed with &#x60;h&#x60; (hours), &#x60;m&#x60; (minutes), or &#x60;d&#x60; (days) — for example &#x60;\&quot;24h\&quot;&#x60;, &#x60;\&quot;48h\&quot;&#x60;, or &#x60;\&quot;7d\&quot;&#x60;. Defaults to &#x60;\&quot;24h\&quot;&#x60; when omitted. Expiry is best-effort: the database will not be deleted before &#x60;expires_at&#x60;, but cleanup may run later than the exact timestamp. | [optional]
10+
**name** | **str** | Optional free-form display label (for UIs/CLIs). Not unique. Not an identifier — databases are always addressed by &#x60;id&#x60;. Accepts the legacy &#x60;description&#x60; key as an alias so clients that predate the rename keep populating this field. | [optional]
1111
**schemas** | [**List[DatabaseDefaultSchemaDecl]**](DatabaseDefaultSchemaDecl.md) | Optional schemas/tables to declare on the database&#39;s auto-created &#x60;default&#x60; catalog. Mirrors the &#x60;config.schemas&#x60; field of a managed &#x60;POST /v1/connections&#x60;. Tables declared here can be loaded via the standard managed-table load endpoint targeting &#x60;default_connection_id&#x60;. Omitted or empty means the default catalog starts empty. | [optional]
1212

1313
## Example

docs/CreateDatabaseResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ Response body for POST /databases
77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**default_connection_id** | **str** | Internal id of the connection that backs this database&#39;s &#x60;default&#x60; catalog. Workspace-level connection endpoints (list, get, health, delete, cache purge) refuse to act on this id — it is exposed only for the managed-tables load endpoint (&#x60;POST /v1/connections/{id}/schemas/{s}/tables/{t}/loads&#x60;) so callers can publish parquet into tables declared at database-create time. Addressing it directly in SQL is not the recommended path — use &#x60;default&#x60; inside an &#x60;X-Database-Id&#x60; scope instead. |
10-
**description** | **str** | | [optional]
1110
**expires_at** | **datetime** | When this database expires. | [optional]
1211
**id** | **str** | |
12+
**name** | **str** | | [optional]
1313

1414
## Example
1515

docs/CreateDatasetRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**label** | **str** | |
1010
**source** | [**DatasetSource**](DatasetSource.md) | |
11+
**storage_backend** | **str** | Optional storage backend: &#x60;\&quot;parquet\&quot;&#x60; (default) or &#x60;\&quot;ducklake\&quot;&#x60;. &#x60;\&quot;ducklake\&quot;&#x60; requires &#x60;ducklake.metadata_pg_url&#x60; to be configured at engine boot; the engine also rejects the combo of &#x60;storage_backend: \&quot;ducklake\&quot;&#x60; with a saved-query source or with explicit geometry columns (both deferred to a follow-up). | [optional]
1112
**table_name** | **str** | Optional table_name - if not provided, derived from label | [optional]
1213

1314
## Example

docs/DatabaseDetailResponse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
99
**attachments** | [**List[DatabaseAttachmentInfo]**](DatabaseAttachmentInfo.md) | |
1010
**default_connection_id** | **str** | |
11-
**description** | **str** | | [optional]
1211
**expires_at** | **datetime** | When this database expires. | [optional]
1312
**id** | **str** | |
13+
**name** | **str** | | [optional]
1414

1515
## Example
1616

docs/DatabaseSummary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Summary item in GET /databases
66

77
Name | Type | Description | Notes
88
------------ | ------------- | ------------- | -------------
9-
**description** | **str** | | [optional]
109
**expires_at** | **datetime** | | [optional]
1110
**id** | **str** | |
11+
**name** | **str** | | [optional]
1212

1313
## Example
1414

docs/DatabasesApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ void (empty response body)
105105
106106
Create database
107107

108-
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
108+
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
109109

110110
### Example
111111

@@ -360,7 +360,7 @@ void (empty response body)
360360
361361
Get database
362362

363-
Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here.
363+
Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here.
364364

365365
### Example
366366

hotdata/api/databases_api.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,7 @@ def create_database(
360360
) -> CreateDatabaseResponse:
361361
"""Create database
362362
363-
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
363+
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
364364
365365
:param create_database_request: (required)
366366
:type create_database_request: CreateDatabaseRequest
@@ -429,7 +429,7 @@ def create_database_with_http_info(
429429
) -> ApiResponse[CreateDatabaseResponse]:
430430
"""Create database
431431
432-
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
432+
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
433433
434434
:param create_database_request: (required)
435435
:type create_database_request: CreateDatabaseRequest
@@ -498,7 +498,7 @@ def create_database_without_preload_content(
498498
) -> RESTResponseType:
499499
"""Create database
500500
501-
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `description` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
501+
Create a new database (a metadata-only grouping). A managed default catalog is auto-created and addressable inside the database as `default`, with a `main` schema pre-declared so `default.main.<table>` works out of the box. The optional `name` is a free-form display label and is not required to be unique. Optional `schemas` declares additional schemas/tables on the default catalog at create time; declared tables can be loaded via the standard managed-tables-load endpoint targeting `default_connection_id`. Optional `expires_at` sets when the database expires — accepts either an RFC 3339 timestamp or a relative duration suffixed with `h` (hours), `m` (minutes), or `d` (days), e.g. `24h`, `48h`, `90m`, `7d`. Defaults to `24h` when omitted. Expiry is best-effort: the database will not be deleted before `expires_at`, but cleanup may run later than the exact timestamp.
502502
503503
:param create_database_request: (required)
504504
:type create_database_request: CreateDatabaseRequest
@@ -1186,7 +1186,7 @@ def get_database(
11861186
) -> DatabaseDetailResponse:
11871187
"""Get database
11881188
1189-
Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here.
1189+
Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here.
11901190
11911191
:param database_id: Database ID (required)
11921192
:type database_id: str
@@ -1254,7 +1254,7 @@ def get_database_with_http_info(
12541254
) -> ApiResponse[DatabaseDetailResponse]:
12551255
"""Get database
12561256
1257-
Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here.
1257+
Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here.
12581258
12591259
:param database_id: Database ID (required)
12601260
:type database_id: str
@@ -1322,7 +1322,7 @@ def get_database_without_preload_content(
13221322
) -> RESTResponseType:
13231323
"""Get database
13241324
1325-
Fetch a database by id. The `description` field is a display label only; it is not accepted as an identifier here.
1325+
Fetch a database by id. The `name` field is a display label only; it is not accepted as an identifier here.
13261326
13271327
:param database_id: Database ID (required)
13281328
:type database_id: str

hotdata/models/create_connection_request.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ class CreateConnectionRequest(BaseModel):
3333
secret_name: Optional[StrictStr] = Field(default=None, description="Optional reference to a secret by name. If provided, this secret will be used for authentication. Mutually exclusive with `secret_id`.")
3434
skip_discovery: Optional[StrictBool] = Field(default=None, description="If true, skip automatic schema discovery after registering the connection. The connection will be created but no tables will be discovered. You can run discovery later via the refresh endpoint.")
3535
source_type: StrictStr
36-
__properties: ClassVar[List[str]] = ["config", "name", "secret_id", "secret_name", "skip_discovery", "source_type"]
36+
storage_backend: Optional[StrictStr] = Field(default=None, description="Physical storage backend for tables created under this connection. `\"parquet\"` (default) uses the versioned parquet cache. `\"ducklake\"` stores data in a DuckLake catalog in the shared metadata DB configured via `ducklake.metadata_pg_url`; accepted for any source type and requires that pool to be configured.")
37+
__properties: ClassVar[List[str]] = ["config", "name", "secret_id", "secret_name", "skip_discovery", "source_type", "storage_backend"]
3738

3839
model_config = ConfigDict(
3940
populate_by_name=True,
@@ -84,6 +85,11 @@ def to_dict(self) -> Dict[str, Any]:
8485
if self.secret_name is None and "secret_name" in self.model_fields_set:
8586
_dict['secret_name'] = None
8687

88+
# set to None if storage_backend (nullable) is None
89+
# and model_fields_set contains the field
90+
if self.storage_backend is None and "storage_backend" in self.model_fields_set:
91+
_dict['storage_backend'] = None
92+
8793
return _dict
8894

8995
@classmethod
@@ -101,7 +107,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
101107
"secret_id": obj.get("secret_id"),
102108
"secret_name": obj.get("secret_name"),
103109
"skip_discovery": obj.get("skip_discovery"),
104-
"source_type": obj.get("source_type")
110+
"source_type": obj.get("source_type"),
111+
"storage_backend": obj.get("storage_backend")
105112
})
106113
return _obj
107114

0 commit comments

Comments
 (0)