Skip to content

Commit fa09fd4

Browse files
feat: add schema and table creation endpoints for databases and managed catalogs (#44)
* chore: regenerate client (7.22.0; catch up on 3 months of spec drift) * docs(changelog): add 0.1.2 section for regenerated client * style: rustfmt the regenerated client --------- Co-authored-by: zfarrell <1420220+zfarrell@users.noreply.github.com> Co-authored-by: Zac Farrell <zac@hotdata.dev>
1 parent 0eb4c6d commit fa09fd4

24 files changed

Lines changed: 696 additions & 9 deletions

.openapi-generator/FILES

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
.gitignore
2-
Cargo.toml
2+
docs/AddManagedSchemaRequest.md
3+
docs/AddManagedTableDecl.md
4+
docs/AddManagedTableRequest.md
35
docs/ApiErrorDetail.md
46
docs/ApiErrorResponse.md
57
docs/AsyncQueryResponse.md
@@ -98,6 +100,8 @@ docs/ListUploadsResponse.md
98100
docs/ListWorkspacesResponse.md
99101
docs/LoadManagedTableRequest.md
100102
docs/LoadManagedTableResponse.md
103+
docs/ManagedSchemaResponse.md
104+
docs/ManagedTableResponse.md
101105
docs/NumericProfileDetail.md
102106
docs/QueryApi.md
103107
docs/QueryRequest.md
@@ -169,7 +173,9 @@ src/apis/saved_queries_api.rs
169173
src/apis/secrets_api.rs
170174
src/apis/uploads_api.rs
171175
src/apis/workspaces_api.rs
172-
src/lib.rs
176+
src/models/add_managed_schema_request.rs
177+
src/models/add_managed_table_decl.rs
178+
src/models/add_managed_table_request.rs
173179
src/models/api_error_detail.rs
174180
src/models/api_error_response.rs
175181
src/models/async_query_response.rs
@@ -259,6 +265,8 @@ src/models/list_uploads_response.rs
259265
src/models/list_workspaces_response.rs
260266
src/models/load_managed_table_request.rs
261267
src/models/load_managed_table_response.rs
268+
src/models/managed_schema_response.rs
269+
src/models/managed_table_response.rs
262270
src/models/mod.rs
263271
src/models/numeric_profile_detail.rs
264272
src/models/query_request.rs

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.20.0
1+
7.22.0

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.1.2] - 2026-06-06
11+
12+
### Added
13+
14+
- Database and managed-catalog schema/table management endpoints: `add_database_schema`, `add_database_table`, `add_managed_schema`, and `add_managed_table`, with their request/response models (`AddManagedSchemaRequest`, `AddManagedTableRequest`, `AddManagedTableDecl`, `ManagedSchemaResponse`, `ManagedTableResponse`).
15+
16+
### Changed
17+
18+
- Regenerated the client from the updated Hotdata OpenAPI spec, catching up on spec changes since 0.1.1. Generated with openapi-generator 7.22.0 (`useChrono=false`, so date-time fields remain `String` as before).
19+
1020
## [0.1.1] - 2026-06-05
1121

1222
### Changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "hotdata"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
authors = ["developers@hotdata.dev"]
55
description = "Powerful data platform API for datasets, queries, and analytics."
66
license = "MIT"

docs/AddManagedSchemaRequest.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# AddManagedSchemaRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **String** | |
8+
**tables** | Option<[**Vec<models::AddManagedTableDecl>**](AddManagedTableDecl.md)> | | [optional]
9+
10+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
11+
12+

docs/AddManagedTableDecl.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AddManagedTableDecl
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **String** | |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/AddManagedTableRequest.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AddManagedTableRequest
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **String** | |
8+
9+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
10+
11+

docs/ColumnProfileInfo.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Name | Type | Description | Notes
99
**name** | **String** | Column name |
1010
**null_count** | **i64** | Number of null values |
1111
**null_percentage** | **f64** | Percentage of null values (0.0 to 100.0) |
12-
**profile** | Option<[**models::ColumnProfileDetail**](ColumnProfileDetail.md)> | Type-specific profile detail. Null when the column is all-null or has an unsupported type. | [optional]
12+
**profile** | Option<[**models::ColumnProfileDetail**](ColumnProfileDetail.md)> | | [optional]
1313

1414
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
1515

docs/ConnectionsApi.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All URIs are relative to *https://api.hotdata.dev*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**add_managed_schema**](ConnectionsApi.md#add_managed_schema) | **POST** /v1/connections/{connection_id}/schemas | Add managed schema
8+
[**add_managed_table**](ConnectionsApi.md#add_managed_table) | **POST** /v1/connections/{connection_id}/schemas/{schema}/tables | Add managed table
79
[**check_connection_health**](ConnectionsApi.md#check_connection_health) | **GET** /v1/connections/{connection_id}/health | Check connection health
810
[**create_connection**](ConnectionsApi.md#create_connection) | **POST** /v1/connections | Create connection
911
[**delete_connection**](ConnectionsApi.md#delete_connection) | **DELETE** /v1/connections/{connection_id} | Delete connection
@@ -17,6 +19,69 @@ Method | HTTP request | Description
1719

1820

1921

22+
## add_managed_schema
23+
24+
> models::ManagedSchemaResponse add_managed_schema(connection_id, add_managed_schema_request)
25+
Add managed schema
26+
27+
Declare a new schema (and optionally its tables) on an existing managed catalog after creation. The schema is added to the connection's declaration; declared tables can then be populated via the managed-table load endpoint. Only valid against connections whose source type is `managed`. Identifiers are normalised to lowercase.
28+
29+
### Parameters
30+
31+
32+
Name | Type | Description | Required | Notes
33+
------------- | ------------- | ------------- | ------------- | -------------
34+
**connection_id** | **String** | Connection ID | [required] |
35+
**add_managed_schema_request** | [**AddManagedSchemaRequest**](AddManagedSchemaRequest.md) | | [required] |
36+
37+
### Return type
38+
39+
[**models::ManagedSchemaResponse**](ManagedSchemaResponse.md)
40+
41+
### Authorization
42+
43+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
44+
45+
### HTTP request headers
46+
47+
- **Content-Type**: application/json
48+
- **Accept**: application/json
49+
50+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
51+
52+
53+
## add_managed_table
54+
55+
> models::ManagedTableResponse add_managed_table(connection_id, schema, add_managed_table_request)
56+
Add managed table
57+
58+
Declare a new table on an existing schema of a managed catalog after creation. The table is added empty (declared-but-unloaded) and can be populated via the managed-table load endpoint. Only valid against connections whose source type is `managed`. Identifiers are normalised to lowercase.
59+
60+
### Parameters
61+
62+
63+
Name | Type | Description | Required | Notes
64+
------------- | ------------- | ------------- | ------------- | -------------
65+
**connection_id** | **String** | Connection ID | [required] |
66+
**schema** | **String** | Schema name | [required] |
67+
**add_managed_table_request** | [**AddManagedTableRequest**](AddManagedTableRequest.md) | | [required] |
68+
69+
### Return type
70+
71+
[**models::ManagedTableResponse**](ManagedTableResponse.md)
72+
73+
### Authorization
74+
75+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
76+
77+
### HTTP request headers
78+
79+
- **Content-Type**: application/json
80+
- **Accept**: application/json
81+
82+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
83+
84+
2085
## check_connection_health
2186

2287
> models::ConnectionHealthResponse check_connection_health(connection_id)

docs/DatabasesApi.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ All URIs are relative to *https://api.hotdata.dev*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**add_database_schema**](DatabasesApi.md#add_database_schema) | **POST** /v1/databases/{database_id}/schemas | Add schema to database default catalog
8+
[**add_database_table**](DatabasesApi.md#add_database_table) | **POST** /v1/databases/{database_id}/schemas/{schema}/tables | Add table to database default catalog
79
[**attach_database_catalog**](DatabasesApi.md#attach_database_catalog) | **POST** /v1/databases/{database_id}/catalogs | Attach catalog to database
810
[**create_database**](DatabasesApi.md#create_database) | **POST** /v1/databases | Create database
911
[**delete_database**](DatabasesApi.md#delete_database) | **DELETE** /v1/databases/{database_id} | Delete database
@@ -13,6 +15,69 @@ Method | HTTP request | Description
1315

1416

1517

18+
## add_database_schema
19+
20+
> models::ManagedSchemaResponse add_database_schema(database_id, add_managed_schema_request)
21+
Add schema to database default catalog
22+
23+
Declare a new schema (and optionally its tables) on the database's auto-created default catalog after creation. The schema becomes reachable inside the database scope (e.g. `default.<schema>.<table>` and `information_schema.schemata`) without the caller addressing the internal default connection directly. Identifiers are normalised to lowercase.
24+
25+
### Parameters
26+
27+
28+
Name | Type | Description | Required | Notes
29+
------------- | ------------- | ------------- | ------------- | -------------
30+
**database_id** | **String** | Database ID | [required] |
31+
**add_managed_schema_request** | [**AddManagedSchemaRequest**](AddManagedSchemaRequest.md) | | [required] |
32+
33+
### Return type
34+
35+
[**models::ManagedSchemaResponse**](ManagedSchemaResponse.md)
36+
37+
### Authorization
38+
39+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
40+
41+
### HTTP request headers
42+
43+
- **Content-Type**: application/json
44+
- **Accept**: application/json
45+
46+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
47+
48+
49+
## add_database_table
50+
51+
> models::ManagedTableResponse add_database_table(database_id, schema, add_managed_table_request)
52+
Add table to database default catalog
53+
54+
Declare a new table on an existing schema of the database's default catalog after creation. The table is added empty (declared-but-unloaded) and can be populated via the managed-table load endpoint targeting the default connection. Identifiers are normalised to lowercase.
55+
56+
### Parameters
57+
58+
59+
Name | Type | Description | Required | Notes
60+
------------- | ------------- | ------------- | ------------- | -------------
61+
**database_id** | **String** | Database ID | [required] |
62+
**schema** | **String** | Schema name | [required] |
63+
**add_managed_table_request** | [**AddManagedTableRequest**](AddManagedTableRequest.md) | | [required] |
64+
65+
### Return type
66+
67+
[**models::ManagedTableResponse**](ManagedTableResponse.md)
68+
69+
### Authorization
70+
71+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
72+
73+
### HTTP request headers
74+
75+
- **Content-Type**: application/json
76+
- **Accept**: application/json
77+
78+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
79+
80+
1681
## attach_database_catalog
1782

1883
> attach_database_catalog(database_id, attach_database_catalog_request)

0 commit comments

Comments
 (0)