Skip to content

Commit 41418a8

Browse files
chore: regenerate client from updated OpenAPI spec (#96)
Co-authored-by: hotdata-automation[bot] <267177015+hotdata-automation[bot]@users.noreply.github.com>
1 parent 5989242 commit 41418a8

22 files changed

Lines changed: 2530 additions & 0 deletions

.openapi-generator/FILES

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
.github/workflows/python.yml
22
.gitignore
33
.gitlab-ci.yml
4+
docs/AddManagedSchemaRequest.md
5+
docs/AddManagedTableDecl.md
6+
docs/AddManagedTableRequest.md
47
docs/ApiErrorDetail.md
58
docs/ApiErrorResponse.md
69
docs/AsyncQueryResponse.md
@@ -99,6 +102,8 @@ docs/ListUploadsResponse.md
99102
docs/ListWorkspacesResponse.md
100103
docs/LoadManagedTableRequest.md
101104
docs/LoadManagedTableResponse.md
105+
docs/ManagedSchemaResponse.md
106+
docs/ManagedTableResponse.md
102107
docs/NumericProfileDetail.md
103108
docs/QueryApi.md
104109
docs/QueryRequest.md
@@ -175,6 +180,9 @@ hotdata/api_response.py
175180
hotdata/configuration.py
176181
hotdata/exceptions.py
177182
hotdata/models/__init__.py
183+
hotdata/models/add_managed_schema_request.py
184+
hotdata/models/add_managed_table_decl.py
185+
hotdata/models/add_managed_table_request.py
178186
hotdata/models/api_error_detail.py
179187
hotdata/models/api_error_response.py
180188
hotdata/models/async_query_response.py
@@ -264,6 +272,8 @@ hotdata/models/list_uploads_response.py
264272
hotdata/models/list_workspaces_response.py
265273
hotdata/models/load_managed_table_request.py
266274
hotdata/models/load_managed_table_response.py
275+
hotdata/models/managed_schema_response.py
276+
hotdata/models/managed_table_response.py
267277
hotdata/models/numeric_profile_detail.py
268278
hotdata/models/query_request.py
269279
hotdata/models/query_response.py
@@ -313,4 +323,9 @@ requirements.txt
313323
setup.cfg
314324
test-requirements.txt
315325
test/__init__.py
326+
test/test_add_managed_schema_request.py
327+
test/test_add_managed_table_decl.py
328+
test/test_add_managed_table_request.py
329+
test/test_managed_schema_response.py
330+
test/test_managed_table_response.py
316331
tox.ini

docs/AddManagedSchemaRequest.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# AddManagedSchemaRequest
2+
3+
Request body for adding a schema to an existing managed catalog: `POST /v1/connections/{id}/schemas` and `POST /v1/databases/{id}/schemas`. `tables` is optional — omit it to declare an empty schema and add tables later.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**name** | **str** | |
10+
**tables** | [**List[AddManagedTableDecl]**](AddManagedTableDecl.md) | | [optional]
11+
12+
## Example
13+
14+
```python
15+
from hotdata.models.add_managed_schema_request import AddManagedSchemaRequest
16+
17+
# TODO update the JSON string below
18+
json = "{}"
19+
# create an instance of AddManagedSchemaRequest from a JSON string
20+
add_managed_schema_request_instance = AddManagedSchemaRequest.from_json(json)
21+
# print the JSON string representation of the object
22+
print(AddManagedSchemaRequest.to_json())
23+
24+
# convert the object into a dict
25+
add_managed_schema_request_dict = add_managed_schema_request_instance.to_dict()
26+
# create an instance of AddManagedSchemaRequest from a dict
27+
add_managed_schema_request_from_dict = AddManagedSchemaRequest.from_dict(add_managed_schema_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/AddManagedTableDecl.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AddManagedTableDecl
2+
3+
One table declaration inside an add-schema request body.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**name** | **str** | |
10+
11+
## Example
12+
13+
```python
14+
from hotdata.models.add_managed_table_decl import AddManagedTableDecl
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of AddManagedTableDecl from a JSON string
19+
add_managed_table_decl_instance = AddManagedTableDecl.from_json(json)
20+
# print the JSON string representation of the object
21+
print(AddManagedTableDecl.to_json())
22+
23+
# convert the object into a dict
24+
add_managed_table_decl_dict = add_managed_table_decl_instance.to_dict()
25+
# create an instance of AddManagedTableDecl from a dict
26+
add_managed_table_decl_from_dict = AddManagedTableDecl.from_dict(add_managed_table_decl_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+

docs/AddManagedTableRequest.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# AddManagedTableRequest
2+
3+
Request body for adding a table to an existing schema: `POST /v1/connections/{id}/schemas/{schema}/tables` and `POST /v1/databases/{id}/schemas/{schema}/tables`.
4+
5+
## Properties
6+
7+
Name | Type | Description | Notes
8+
------------ | ------------- | ------------- | -------------
9+
**name** | **str** | |
10+
11+
## Example
12+
13+
```python
14+
from hotdata.models.add_managed_table_request import AddManagedTableRequest
15+
16+
# TODO update the JSON string below
17+
json = "{}"
18+
# create an instance of AddManagedTableRequest from a JSON string
19+
add_managed_table_request_instance = AddManagedTableRequest.from_json(json)
20+
# print the JSON string representation of the object
21+
print(AddManagedTableRequest.to_json())
22+
23+
# convert the object into a dict
24+
add_managed_table_request_dict = add_managed_table_request_instance.to_dict()
25+
# create an instance of AddManagedTableRequest from a dict
26+
add_managed_table_request_from_dict = AddManagedTableRequest.from_dict(add_managed_table_request_dict)
27+
```
28+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
29+
30+

docs/ConnectionsApi.md

Lines changed: 186 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
@@ -16,6 +18,190 @@ Method | HTTP request | Description
1618
[**purge_table_cache**](ConnectionsApi.md#purge_table_cache) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/cache | Purge table cache
1719

1820

21+
# **add_managed_schema**
22+
> ManagedSchemaResponse add_managed_schema(connection_id, add_managed_schema_request)
23+
24+
Add managed schema
25+
26+
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.
27+
28+
### Example
29+
30+
* Api Key Authentication (WorkspaceId):
31+
* Bearer Authentication (BearerAuth):
32+
33+
```python
34+
import hotdata
35+
from hotdata.models.add_managed_schema_request import AddManagedSchemaRequest
36+
from hotdata.models.managed_schema_response import ManagedSchemaResponse
37+
from hotdata.rest import ApiException
38+
from pprint import pprint
39+
40+
# Defining the host is optional and defaults to https://api.hotdata.dev
41+
# See configuration.py for a list of all supported configuration parameters.
42+
configuration = hotdata.Configuration(
43+
host = "https://api.hotdata.dev"
44+
)
45+
46+
# The client must configure the authentication and authorization parameters
47+
# in accordance with the API server security policy.
48+
# Examples for each auth method are provided below, use the example that
49+
# satisfies your auth use case.
50+
51+
# Configure API key authorization: WorkspaceId
52+
configuration.api_key['WorkspaceId'] = os.environ["API_KEY"]
53+
54+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
55+
# configuration.api_key_prefix['WorkspaceId'] = 'Bearer'
56+
57+
# Configure Bearer authorization: BearerAuth
58+
configuration = hotdata.Configuration(
59+
access_token = os.environ["BEARER_TOKEN"]
60+
)
61+
62+
# Enter a context with an instance of the API client
63+
with hotdata.ApiClient(configuration) as api_client:
64+
# Create an instance of the API class
65+
api_instance = hotdata.ConnectionsApi(api_client)
66+
connection_id = 'connection_id_example' # str | Connection ID
67+
add_managed_schema_request = hotdata.AddManagedSchemaRequest() # AddManagedSchemaRequest |
68+
69+
try:
70+
# Add managed schema
71+
api_response = api_instance.add_managed_schema(connection_id, add_managed_schema_request)
72+
print("The response of ConnectionsApi->add_managed_schema:\n")
73+
pprint(api_response)
74+
except Exception as e:
75+
print("Exception when calling ConnectionsApi->add_managed_schema: %s\n" % e)
76+
```
77+
78+
79+
80+
### Parameters
81+
82+
83+
Name | Type | Description | Notes
84+
------------- | ------------- | ------------- | -------------
85+
**connection_id** | **str**| Connection ID |
86+
**add_managed_schema_request** | [**AddManagedSchemaRequest**](AddManagedSchemaRequest.md)| |
87+
88+
### Return type
89+
90+
[**ManagedSchemaResponse**](ManagedSchemaResponse.md)
91+
92+
### Authorization
93+
94+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
95+
96+
### HTTP request headers
97+
98+
- **Content-Type**: application/json
99+
- **Accept**: application/json
100+
101+
### HTTP response details
102+
103+
| Status code | Description | Response headers |
104+
|-------------|-------------|------------------|
105+
**201** | Schema added | - |
106+
**400** | Connection is not a managed catalog or identifier is invalid | - |
107+
**404** | Connection not found | - |
108+
**409** | Schema already exists | - |
109+
110+
[[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)
111+
112+
# **add_managed_table**
113+
> ManagedTableResponse add_managed_table(connection_id, var_schema, add_managed_table_request)
114+
115+
Add managed table
116+
117+
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.
118+
119+
### Example
120+
121+
* Api Key Authentication (WorkspaceId):
122+
* Bearer Authentication (BearerAuth):
123+
124+
```python
125+
import hotdata
126+
from hotdata.models.add_managed_table_request import AddManagedTableRequest
127+
from hotdata.models.managed_table_response import ManagedTableResponse
128+
from hotdata.rest import ApiException
129+
from pprint import pprint
130+
131+
# Defining the host is optional and defaults to https://api.hotdata.dev
132+
# See configuration.py for a list of all supported configuration parameters.
133+
configuration = hotdata.Configuration(
134+
host = "https://api.hotdata.dev"
135+
)
136+
137+
# The client must configure the authentication and authorization parameters
138+
# in accordance with the API server security policy.
139+
# Examples for each auth method are provided below, use the example that
140+
# satisfies your auth use case.
141+
142+
# Configure API key authorization: WorkspaceId
143+
configuration.api_key['WorkspaceId'] = os.environ["API_KEY"]
144+
145+
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
146+
# configuration.api_key_prefix['WorkspaceId'] = 'Bearer'
147+
148+
# Configure Bearer authorization: BearerAuth
149+
configuration = hotdata.Configuration(
150+
access_token = os.environ["BEARER_TOKEN"]
151+
)
152+
153+
# Enter a context with an instance of the API client
154+
with hotdata.ApiClient(configuration) as api_client:
155+
# Create an instance of the API class
156+
api_instance = hotdata.ConnectionsApi(api_client)
157+
connection_id = 'connection_id_example' # str | Connection ID
158+
var_schema = 'var_schema_example' # str | Schema name
159+
add_managed_table_request = hotdata.AddManagedTableRequest() # AddManagedTableRequest |
160+
161+
try:
162+
# Add managed table
163+
api_response = api_instance.add_managed_table(connection_id, var_schema, add_managed_table_request)
164+
print("The response of ConnectionsApi->add_managed_table:\n")
165+
pprint(api_response)
166+
except Exception as e:
167+
print("Exception when calling ConnectionsApi->add_managed_table: %s\n" % e)
168+
```
169+
170+
171+
172+
### Parameters
173+
174+
175+
Name | Type | Description | Notes
176+
------------- | ------------- | ------------- | -------------
177+
**connection_id** | **str**| Connection ID |
178+
**var_schema** | **str**| Schema name |
179+
**add_managed_table_request** | [**AddManagedTableRequest**](AddManagedTableRequest.md)| |
180+
181+
### Return type
182+
183+
[**ManagedTableResponse**](ManagedTableResponse.md)
184+
185+
### Authorization
186+
187+
[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)
188+
189+
### HTTP request headers
190+
191+
- **Content-Type**: application/json
192+
- **Accept**: application/json
193+
194+
### HTTP response details
195+
196+
| Status code | Description | Response headers |
197+
|-------------|-------------|------------------|
198+
**201** | Table added | - |
199+
**400** | Connection is not a managed catalog or identifier is invalid | - |
200+
**404** | Connection or schema not found | - |
201+
**409** | Table already exists | - |
202+
203+
[[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)
204+
19205
# **check_connection_health**
20206
> ConnectionHealthResponse check_connection_health(connection_id)
21207

0 commit comments

Comments
 (0)