Skip to content

Commit 67fc8f1

Browse files
eddietejedagithub-actions[bot]
authored andcommitted
chore: regenerate client from OpenAPI spec
1 parent d37ee0a commit 67fc8f1

12 files changed

Lines changed: 1282 additions & 90 deletions

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,3 @@ target/
6464

6565
# Ipython Notebook
6666
.ipynb_checkpoints
67-
68-
.DS_Store

.openapi-generator/FILES

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ docs/ListSecretsResponse.md
8585
docs/ListUploadsResponse.md
8686
docs/ListWorkspaceContextsResponse.md
8787
docs/ListWorkspacesResponse.md
88+
docs/LoadManagedTableRequest.md
89+
docs/LoadManagedTableResponse.md
8890
docs/NumericProfileDetail.md
8991
docs/QueryApi.md
9092
docs/QueryRequest.md
@@ -239,6 +241,8 @@ hotdata/models/list_secrets_response.py
239241
hotdata/models/list_uploads_response.py
240242
hotdata/models/list_workspace_contexts_response.py
241243
hotdata/models/list_workspaces_response.py
244+
hotdata/models/load_managed_table_request.py
245+
hotdata/models/load_managed_table_response.py
242246
hotdata/models/numeric_profile_detail.py
243247
hotdata/models/query_request.py
244248
hotdata/models/query_response.py
@@ -289,4 +293,6 @@ requirements.txt
289293
setup.cfg
290294
test-requirements.txt
291295
test/__init__.py
296+
test/test_load_managed_table_request.py
297+
test/test_load_managed_table_response.py
292298
tox.ini

docs/ConnectionsApi.md

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@ Method | HTTP request | Description
77
[**check_connection_health**](ConnectionsApi.md#check_connection_health) | **GET** /v1/connections/{connection_id}/health | Check connection health
88
[**create_connection**](ConnectionsApi.md#create_connection) | **POST** /v1/connections | Create connection
99
[**delete_connection**](ConnectionsApi.md#delete_connection) | **DELETE** /v1/connections/{connection_id} | Delete connection
10+
[**delete_managed_table**](ConnectionsApi.md#delete_managed_table) | **DELETE** /v1/connections/{connection_id}/schemas/{schema}/tables/{table} | Delete managed table
1011
[**get_connection**](ConnectionsApi.md#get_connection) | **GET** /v1/connections/{connection_id} | Get connection
1112
[**get_table_profile**](ConnectionsApi.md#get_table_profile) | **GET** /v1/connections/{connection_id}/tables/{schema}/{table}/profile | Get table profile
1213
[**list_connections**](ConnectionsApi.md#list_connections) | **GET** /v1/connections | List connections
14+
[**load_managed_table**](ConnectionsApi.md#load_managed_table) | **POST** /v1/connections/{connection_id}/schemas/{schema}/tables/{table}/loads | Load managed table from upload
1315
[**purge_connection_cache**](ConnectionsApi.md#purge_connection_cache) | **DELETE** /v1/connections/{connection_id}/cache | Purge connection cache
1416
[**purge_table_cache**](ConnectionsApi.md#purge_table_cache) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/cache | Purge table cache
1517

@@ -271,6 +273,94 @@ void (empty response body)
271273

272274
[[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)
273275

276+
# **delete_managed_table**
277+
> delete_managed_table(connection_id, var_schema, table)
278+
279+
Delete managed table
280+
281+
Delete a single managed-catalog table. The catalog row is removed and the backing parquet file (if any) is scheduled for deletion. Only valid against connections whose source type is `managed`.
282+
283+
### Example
284+
285+
* Api Key Authentication (WorkspaceId):
286+
* Bearer Authentication (BearerAuth):
287+
288+
```python
289+
import hotdata
290+
from hotdata.rest import ApiException
291+
from pprint import pprint
292+
293+
# Defining the host is optional and defaults to https://api.hotdata.dev
294+
# See configuration.py for a list of all supported configuration parameters.
295+
configuration = hotdata.Configuration(
296+
host = "https://api.hotdata.dev"
297+
)
298+
299+
# The client must configure the authentication and authorization parameters
300+
# in accordance with the API server security policy.
301+
# Examples for each auth method are provided below, use the example that
302+
# satisfies your auth use case.
303+
304+
# Configure API key authorization: WorkspaceId
305+
configuration.api_key['WorkspaceId'] = os.environ["API_KEY"]
306+
307+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
308+
# configuration.api_key_prefix['WorkspaceId'] = 'Bearer'
309+
310+
# Configure Bearer authorization: BearerAuth
311+
configuration = hotdata.Configuration(
312+
access_token = os.environ["BEARER_TOKEN"]
313+
)
314+
315+
# Enter a context with an instance of the API client
316+
with hotdata.ApiClient(configuration) as api_client:
317+
# Create an instance of the API class
318+
api_instance = hotdata.ConnectionsApi(api_client)
319+
connection_id = 'connection_id_example' # str | Connection ID
320+
var_schema = 'var_schema_example' # str | Schema name
321+
table = 'table_example' # str | Table name
322+
323+
try:
324+
# Delete managed table
325+
api_instance.delete_managed_table(connection_id, var_schema, table)
326+
except Exception as e:
327+
print("Exception when calling ConnectionsApi->delete_managed_table: %s\n" % e)
328+
```
329+
330+
331+
332+
### Parameters
333+
334+
335+
Name | Type | Description | Notes
336+
------------- | ------------- | ------------- | -------------
337+
**connection_id** | **str**| Connection ID |
338+
**var_schema** | **str**| Schema name |
339+
**table** | **str**| Table name |
340+
341+
### Return type
342+
343+
void (empty response body)
344+
345+
### Authorization
346+
347+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
348+
349+
### HTTP request headers
350+
351+
- **Content-Type**: Not defined
352+
- **Accept**: application/json
353+
354+
### HTTP response details
355+
356+
| Status code | Description | Response headers |
357+
|-------------|-------------|------------------|
358+
**204** | Managed table deleted | - |
359+
**400** | Connection is not a managed catalog | - |
360+
**404** | Connection or table not found | - |
361+
362+
[[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)
363+
274364
# **get_connection**
275365
> GetConnectionResponse get_connection(connection_id)
276366
@@ -528,6 +618,101 @@ This endpoint does not need any parameter.
528618

529619
[[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)
530620

621+
# **load_managed_table**
622+
> LoadManagedTableResponse load_managed_table(connection_id, var_schema, table, load_managed_table_request)
623+
624+
Load managed table from upload
625+
626+
Publish a previously-uploaded parquet file as the new generation of a managed table. The upload must reference a parquet file (verified by magic bytes). Only `mode = "replace"` is supported. Concurrent loads against the same upload return 409.
627+
628+
### Example
629+
630+
* Api Key Authentication (WorkspaceId):
631+
* Bearer Authentication (BearerAuth):
632+
633+
```python
634+
import hotdata
635+
from hotdata.models.load_managed_table_request import LoadManagedTableRequest
636+
from hotdata.models.load_managed_table_response import LoadManagedTableResponse
637+
from hotdata.rest import ApiException
638+
from pprint import pprint
639+
640+
# Defining the host is optional and defaults to https://api.hotdata.dev
641+
# See configuration.py for a list of all supported configuration parameters.
642+
configuration = hotdata.Configuration(
643+
host = "https://api.hotdata.dev"
644+
)
645+
646+
# The client must configure the authentication and authorization parameters
647+
# in accordance with the API server security policy.
648+
# Examples for each auth method are provided below, use the example that
649+
# satisfies your auth use case.
650+
651+
# Configure API key authorization: WorkspaceId
652+
configuration.api_key['WorkspaceId'] = os.environ["API_KEY"]
653+
654+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
655+
# configuration.api_key_prefix['WorkspaceId'] = 'Bearer'
656+
657+
# Configure Bearer authorization: BearerAuth
658+
configuration = hotdata.Configuration(
659+
access_token = os.environ["BEARER_TOKEN"]
660+
)
661+
662+
# Enter a context with an instance of the API client
663+
with hotdata.ApiClient(configuration) as api_client:
664+
# Create an instance of the API class
665+
api_instance = hotdata.ConnectionsApi(api_client)
666+
connection_id = 'connection_id_example' # str | Connection ID
667+
var_schema = 'var_schema_example' # str | Schema name
668+
table = 'table_example' # str | Table name
669+
load_managed_table_request = hotdata.LoadManagedTableRequest() # LoadManagedTableRequest |
670+
671+
try:
672+
# Load managed table from upload
673+
api_response = api_instance.load_managed_table(connection_id, var_schema, table, load_managed_table_request)
674+
print("The response of ConnectionsApi->load_managed_table:\n")
675+
pprint(api_response)
676+
except Exception as e:
677+
print("Exception when calling ConnectionsApi->load_managed_table: %s\n" % e)
678+
```
679+
680+
681+
682+
### Parameters
683+
684+
685+
Name | Type | Description | Notes
686+
------------- | ------------- | ------------- | -------------
687+
**connection_id** | **str**| Connection ID |
688+
**var_schema** | **str**| Schema name |
689+
**table** | **str**| Table name |
690+
**load_managed_table_request** | [**LoadManagedTableRequest**](LoadManagedTableRequest.md)| |
691+
692+
### Return type
693+
694+
[**LoadManagedTableResponse**](LoadManagedTableResponse.md)
695+
696+
### Authorization
697+
698+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
699+
700+
### HTTP request headers
701+
702+
- **Content-Type**: application/json
703+
- **Accept**: application/json
704+
705+
### HTTP response details
706+
707+
| Status code | Description | Response headers |
708+
|-------------|-------------|------------------|
709+
**200** | Managed table loaded | - |
710+
**400** | Invalid request (bad mode, non-managed connection, bad parquet) | - |
711+
**404** | Connection or upload not found | - |
712+
**409** | Upload already consumed or in flight | - |
713+
714+
[[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)
715+
531716
# **purge_connection_cache**
532717
> purge_connection_cache(connection_id)
533718

docs/LoadManagedTableRequest.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# LoadManagedTableRequest
2+
3+
Request body for `POST /v1/connections/{connection_id}/schemas/{schema}/tables/{table}/loads`. Publishes a previously-uploaded parquet file as the new generation for the named managed table. `mode` is fixed to `\"replace\"` today; the field is kept in the request body so future modes (e.g. append) are an additive change.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**mode** | **str** | Load mode. Only `\"replace\"` is supported in this release. |
10+
**upload_id** | **str** | ID of a previously-staged upload (see `POST /v1/files`). The upload must reference a parquet file. The upload is claimed atomically; concurrent loads against the same `upload_id` return 409. |
11+
12+
## Example
13+
14+
```python
15+
from hotdata.models.load_managed_table_request import LoadManagedTableRequest
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of LoadManagedTableRequest from a JSON string
20+
load_managed_table_request_instance = LoadManagedTableRequest.from_json(json)
21+
# print the JSON string representation of the object
22+
print(LoadManagedTableRequest.to_json())
23+
24+
# convert the object into a dict
25+
load_managed_table_request_dict = load_managed_table_request_instance.to_dict()
26+
# create an instance of LoadManagedTableRequest from a dict
27+
load_managed_table_request_from_dict = LoadManagedTableRequest.from_dict(load_managed_table_request_dict)
28+
```
29+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
30+
31+

docs/LoadManagedTableResponse.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# LoadManagedTableResponse
2+
3+
Response body for `POST /v1/connections/{connection_id}/schemas/{schema}/tables/{table}/loads`.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**arrow_schema_json** | **str** | Arrow schema (JSON) parsed from the uploaded parquet footer. |
10+
**connection_id** | **str** | |
11+
**row_count** | **int** | Total rows in the published parquet file. |
12+
**schema_name** | **str** | |
13+
**table_name** | **str** | |
14+
15+
## Example
16+
17+
```python
18+
from hotdata.models.load_managed_table_response import LoadManagedTableResponse
19+
20+
# TODO update the JSON string below
21+
json = "{}"
22+
# create an instance of LoadManagedTableResponse from a JSON string
23+
load_managed_table_response_instance = LoadManagedTableResponse.from_json(json)
24+
# print the JSON string representation of the object
25+
print(LoadManagedTableResponse.to_json())
26+
27+
# convert the object into a dict
28+
load_managed_table_response_dict = load_managed_table_response_instance.to_dict()
29+
# create an instance of LoadManagedTableResponse from a dict
30+
load_managed_table_response_from_dict = LoadManagedTableResponse.from_dict(load_managed_table_response_dict)
31+
```
32+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
33+
34+

hotdata/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@
127127
"ListUploadsResponse",
128128
"ListWorkspaceContextsResponse",
129129
"ListWorkspacesResponse",
130+
"LoadManagedTableRequest",
131+
"LoadManagedTableResponse",
130132
"NumericProfileDetail",
131133
"QueryRequest",
132134
"QueryResponse",
@@ -280,6 +282,8 @@
280282
from hotdata.models.list_uploads_response import ListUploadsResponse as ListUploadsResponse
281283
from hotdata.models.list_workspace_contexts_response import ListWorkspaceContextsResponse as ListWorkspaceContextsResponse
282284
from hotdata.models.list_workspaces_response import ListWorkspacesResponse as ListWorkspacesResponse
285+
from hotdata.models.load_managed_table_request import LoadManagedTableRequest as LoadManagedTableRequest
286+
from hotdata.models.load_managed_table_response import LoadManagedTableResponse as LoadManagedTableResponse
283287
from hotdata.models.numeric_profile_detail import NumericProfileDetail as NumericProfileDetail
284288
from hotdata.models.query_request import QueryRequest as QueryRequest
285289
from hotdata.models.query_response import QueryResponse as QueryResponse

0 commit comments

Comments
 (0)