Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.github/workflows/python.yml
.gitignore
.gitlab-ci.yml
docs/AddManagedSchemaRequest.md
docs/AddManagedTableDecl.md
docs/AddManagedTableRequest.md
docs/ApiErrorDetail.md
docs/ApiErrorResponse.md
docs/AsyncQueryResponse.md
Expand Down Expand Up @@ -99,6 +102,8 @@ docs/ListUploadsResponse.md
docs/ListWorkspacesResponse.md
docs/LoadManagedTableRequest.md
docs/LoadManagedTableResponse.md
docs/ManagedSchemaResponse.md
docs/ManagedTableResponse.md
docs/NumericProfileDetail.md
docs/QueryApi.md
docs/QueryRequest.md
Expand Down Expand Up @@ -175,6 +180,9 @@ hotdata/api_response.py
hotdata/configuration.py
hotdata/exceptions.py
hotdata/models/__init__.py
hotdata/models/add_managed_schema_request.py
hotdata/models/add_managed_table_decl.py
hotdata/models/add_managed_table_request.py
hotdata/models/api_error_detail.py
hotdata/models/api_error_response.py
hotdata/models/async_query_response.py
Expand Down Expand Up @@ -264,6 +272,8 @@ hotdata/models/list_uploads_response.py
hotdata/models/list_workspaces_response.py
hotdata/models/load_managed_table_request.py
hotdata/models/load_managed_table_response.py
hotdata/models/managed_schema_response.py
hotdata/models/managed_table_response.py
hotdata/models/numeric_profile_detail.py
hotdata/models/query_request.py
hotdata/models/query_response.py
Expand Down Expand Up @@ -313,4 +323,9 @@ requirements.txt
setup.cfg
test-requirements.txt
test/__init__.py
test/test_add_managed_schema_request.py
test/test_add_managed_table_decl.py
test/test_add_managed_table_request.py
test/test_managed_schema_response.py
test/test_managed_table_response.py
tox.ini
31 changes: 31 additions & 0 deletions docs/AddManagedSchemaRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# AddManagedSchemaRequest

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.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**tables** | [**List[AddManagedTableDecl]**](AddManagedTableDecl.md) | | [optional]

## Example

```python
from hotdata.models.add_managed_schema_request import AddManagedSchemaRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AddManagedSchemaRequest from a JSON string
add_managed_schema_request_instance = AddManagedSchemaRequest.from_json(json)
# print the JSON string representation of the object
print(AddManagedSchemaRequest.to_json())

# convert the object into a dict
add_managed_schema_request_dict = add_managed_schema_request_instance.to_dict()
# create an instance of AddManagedSchemaRequest from a dict
add_managed_schema_request_from_dict = AddManagedSchemaRequest.from_dict(add_managed_schema_request_dict)
```
[[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 changes: 30 additions & 0 deletions docs/AddManagedTableDecl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AddManagedTableDecl

One table declaration inside an add-schema request body.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |

## Example

```python
from hotdata.models.add_managed_table_decl import AddManagedTableDecl

# TODO update the JSON string below
json = "{}"
# create an instance of AddManagedTableDecl from a JSON string
add_managed_table_decl_instance = AddManagedTableDecl.from_json(json)
# print the JSON string representation of the object
print(AddManagedTableDecl.to_json())

# convert the object into a dict
add_managed_table_decl_dict = add_managed_table_decl_instance.to_dict()
# create an instance of AddManagedTableDecl from a dict
add_managed_table_decl_from_dict = AddManagedTableDecl.from_dict(add_managed_table_decl_dict)
```
[[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 changes: 30 additions & 0 deletions docs/AddManagedTableRequest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# AddManagedTableRequest

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`.

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |

## Example

```python
from hotdata.models.add_managed_table_request import AddManagedTableRequest

# TODO update the JSON string below
json = "{}"
# create an instance of AddManagedTableRequest from a JSON string
add_managed_table_request_instance = AddManagedTableRequest.from_json(json)
# print the JSON string representation of the object
print(AddManagedTableRequest.to_json())

# convert the object into a dict
add_managed_table_request_dict = add_managed_table_request_instance.to_dict()
# create an instance of AddManagedTableRequest from a dict
add_managed_table_request_from_dict = AddManagedTableRequest.from_dict(add_managed_table_request_dict)
```
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


186 changes: 186 additions & 0 deletions docs/ConnectionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ All URIs are relative to *https://api.hotdata.dev*

Method | HTTP request | Description
------------- | ------------- | -------------
[**add_managed_schema**](ConnectionsApi.md#add_managed_schema) | **POST** /v1/connections/{connection_id}/schemas | Add managed schema
[**add_managed_table**](ConnectionsApi.md#add_managed_table) | **POST** /v1/connections/{connection_id}/schemas/{schema}/tables | Add managed table
[**check_connection_health**](ConnectionsApi.md#check_connection_health) | **GET** /v1/connections/{connection_id}/health | Check connection health
[**create_connection**](ConnectionsApi.md#create_connection) | **POST** /v1/connections | Create connection
[**delete_connection**](ConnectionsApi.md#delete_connection) | **DELETE** /v1/connections/{connection_id} | Delete connection
Expand All @@ -16,6 +18,190 @@ Method | HTTP request | Description
[**purge_table_cache**](ConnectionsApi.md#purge_table_cache) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/cache | Purge table cache


# **add_managed_schema**
> ManagedSchemaResponse add_managed_schema(connection_id, add_managed_schema_request)

Add managed schema

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.

### Example

* Api Key Authentication (WorkspaceId):
* Bearer Authentication (BearerAuth):

```python
import hotdata
from hotdata.models.add_managed_schema_request import AddManagedSchemaRequest
from hotdata.models.managed_schema_response import ManagedSchemaResponse
from hotdata.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.hotdata.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = hotdata.Configuration(
host = "https://api.hotdata.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: WorkspaceId
configuration.api_key['WorkspaceId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['WorkspaceId'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = hotdata.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hotdata.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hotdata.ConnectionsApi(api_client)
connection_id = 'connection_id_example' # str | Connection ID
add_managed_schema_request = hotdata.AddManagedSchemaRequest() # AddManagedSchemaRequest |

try:
# Add managed schema
api_response = api_instance.add_managed_schema(connection_id, add_managed_schema_request)
print("The response of ConnectionsApi->add_managed_schema:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConnectionsApi->add_managed_schema: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**connection_id** | **str**| Connection ID |
**add_managed_schema_request** | [**AddManagedSchemaRequest**](AddManagedSchemaRequest.md)| |

### Return type

[**ManagedSchemaResponse**](ManagedSchemaResponse.md)

### Authorization

[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Schema added | - |
**400** | Connection is not a managed catalog or identifier is invalid | - |
**404** | Connection not found | - |
**409** | Schema already exists | - |

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

# **add_managed_table**
> ManagedTableResponse add_managed_table(connection_id, var_schema, add_managed_table_request)

Add managed table

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.

### Example

* Api Key Authentication (WorkspaceId):
* Bearer Authentication (BearerAuth):

```python
import hotdata
from hotdata.models.add_managed_table_request import AddManagedTableRequest
from hotdata.models.managed_table_response import ManagedTableResponse
from hotdata.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://api.hotdata.dev
# See configuration.py for a list of all supported configuration parameters.
configuration = hotdata.Configuration(
host = "https://api.hotdata.dev"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: WorkspaceId
configuration.api_key['WorkspaceId'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['WorkspaceId'] = 'Bearer'

# Configure Bearer authorization: BearerAuth
configuration = hotdata.Configuration(
access_token = os.environ["BEARER_TOKEN"]
)

# Enter a context with an instance of the API client
with hotdata.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = hotdata.ConnectionsApi(api_client)
connection_id = 'connection_id_example' # str | Connection ID
var_schema = 'var_schema_example' # str | Schema name
add_managed_table_request = hotdata.AddManagedTableRequest() # AddManagedTableRequest |

try:
# Add managed table
api_response = api_instance.add_managed_table(connection_id, var_schema, add_managed_table_request)
print("The response of ConnectionsApi->add_managed_table:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling ConnectionsApi->add_managed_table: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**connection_id** | **str**| Connection ID |
**var_schema** | **str**| Schema name |
**add_managed_table_request** | [**AddManagedTableRequest**](AddManagedTableRequest.md)| |

### Return type

[**ManagedTableResponse**](ManagedTableResponse.md)

### Authorization

[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**201** | Table added | - |
**400** | Connection is not a managed catalog or identifier is invalid | - |
**404** | Connection or schema not found | - |
**409** | Table already exists | - |

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

# **check_connection_health**
> ConnectionHealthResponse check_connection_health(connection_id)

Expand Down
Loading
Loading