Skip to content
Open
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
12 changes: 12 additions & 0 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ docs/DatabaseCountResponse.md
docs/DatabaseDefaultSchemaDecl.md
docs/DatabaseDefaultTableDecl.md
docs/DatabaseDetailResponse.md
docs/DatabaseLineageResponse.md
docs/DatabaseSummary.md
docs/DatabasesApi.md
docs/DeleteDatabaseBatchResponse.md
Expand All @@ -58,6 +59,7 @@ docs/FinalizeUploadPart.md
docs/FinalizeUploadRequest.md
docs/FinalizeUploadResponse.md
docs/ForkDatabaseRequest.md
docs/ForkedFromInfo.md
docs/GetConnectionResponse.md
docs/GetDatabaseContextResponse.md
docs/GetResultResponse.md
Expand All @@ -72,6 +74,8 @@ docs/JobStatus.md
docs/JobStatusResponse.md
docs/JobType.md
docs/JobsApi.md
docs/LineageAncestorInfo.md
docs/LineageForkInfo.md
docs/ListConnectionsResponse.md
docs/ListDatabaseContextsResponse.md
docs/ListDatabasesResponse.md
Expand Down Expand Up @@ -187,6 +191,7 @@ hotdata/models/database_count_response.py
hotdata/models/database_default_schema_decl.py
hotdata/models/database_default_table_decl.py
hotdata/models/database_detail_response.py
hotdata/models/database_lineage_response.py
hotdata/models/database_summary.py
hotdata/models/delete_database_batch_response.py
hotdata/models/discovery_status.py
Expand All @@ -197,6 +202,7 @@ hotdata/models/finalize_upload_part.py
hotdata/models/finalize_upload_request.py
hotdata/models/finalize_upload_response.py
hotdata/models/fork_database_request.py
hotdata/models/forked_from_info.py
hotdata/models/get_connection_response.py
hotdata/models/get_database_context_response.py
hotdata/models/get_result_response.py
Expand All @@ -208,6 +214,8 @@ hotdata/models/job_result.py
hotdata/models/job_status.py
hotdata/models/job_status_response.py
hotdata/models/job_type.py
hotdata/models/lineage_ancestor_info.py
hotdata/models/lineage_fork_info.py
hotdata/models/list_connections_response.py
hotdata/models/list_database_contexts_response.py
hotdata/models/list_databases_response.py
Expand Down Expand Up @@ -301,6 +309,7 @@ test/test_database_count_response.py
test/test_database_default_schema_decl.py
test/test_database_default_table_decl.py
test/test_database_detail_response.py
test/test_database_lineage_response.py
test/test_database_summary.py
test/test_databases_api.py
test/test_delete_database_batch_response.py
Expand All @@ -313,6 +322,7 @@ test/test_finalize_upload_part.py
test/test_finalize_upload_request.py
test/test_finalize_upload_response.py
test/test_fork_database_request.py
test/test_forked_from_info.py
test/test_get_connection_response.py
test/test_get_database_context_response.py
test/test_get_result_response.py
Expand All @@ -327,6 +337,8 @@ test/test_job_status.py
test/test_job_status_response.py
test/test_job_type.py
test/test_jobs_api.py
test/test_lineage_ancestor_info.py
test/test_lineage_fork_info.py
test/test_list_connections_response.py
test/test_list_database_contexts_response.py
test/test_list_databases_response.py
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

- feat(databases): add lineage and exact-name lookup endpoints

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a ### Removed entry for the public API that this regeneration deletes.

This PR removes three public symbols. ConnectionsApi.purge_connection_cache and ConnectionsApi.purge_table_cache are deleted from hotdata/api/connections_api.py. CreateConnectionRequest.skip_discovery is deleted from hotdata/models/create_connection_request.py.

The ### Changed bullet names only the added endpoints. A user reading the release notes sees no removal at all.

Failure scenario 1: a caller upgrades and runs connections_api.purge_connection_cache(conn_id). Python raises AttributeError.

Failure scenario 2: a caller constructs CreateConnectionRequest(name=..., source_type=..., config=..., skip_discovery=True). CreateConnectionRequest.model_config does not set extra="forbid", so pydantic defaults to extra="ignore" and drops the argument. No exception is raised. Schema discovery then runs against the new connection, which is the opposite of the requested behaviour.

The [Unreleased] section already records three earlier removals under ### Removed, each prefixed **Breaking:** (CHANGELOG.md lines 10-20). Follow that same format here.

- chore(databases): clarify fork naming behavior
- docs: adopt "instant database" / "instant catalog" terminology in hand-written
prose. Documentation only — all public API symbols (`ManagedTableResponse`,
Expand Down
1 change: 1 addition & 0 deletions docs/AddManagedTableDecl.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ One table declaration inside an add-schema request body.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key** | **List[str]** | Columns that uniquely identify a row, enabling the key-based load modes (`delete`, `update`, `upsert`) on this table: those loads match rows by these columns' values. Omit (the default) to declare no key; the table can still be loaded with `replace` and `append`, but key-based modes are then rejected. | [optional]
**key_determines** | **List[str]** | Columns whose value is determined by this table's `key`: for every uploaded row, every stored row sharing its key holds the same value of these columns. Declaring this lets a keyed mutation (`delete`, `update`, `upsert`) restrict its search for prior versions to the values the upload carries, which prunes far harder than the key alone when the key's own file statistics are weak. Omit (the default) for the unrestricted search. **Correctness-affecting, not a hint.** If the assertion is false, a mutation supersedes one version of a key and appends beside another, silently duplicating it. Declare it only where the invariant is established. | [optional]
**name** | **str** | |
**partition_by** | [**List[TablePartitionKey]**](TablePartitionKey.md) | Partition keys for this table, applied in order. Omit for no partitioning. Declared when the table is created and fixed thereafter. | [optional]
**sorted_by** | [**List[TableSortKey]**](TableSortKey.md) | Sort keys for this table, applied in order. Omit for no sort order. Declared when the table is created and fixed thereafter. | [optional]
Expand Down
1 change: 1 addition & 0 deletions docs/AddManagedTableRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Request body for adding a table to an existing schema: `POST /v1/connections/{id
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**key** | **List[str]** | Columns that uniquely identify a row, enabling the key-based load modes (`delete`, `update`, `upsert`) on this table: those loads match rows by these columns' values. Omit (the default) to declare no key; the table can still be loaded with `replace` and `append`, but key-based modes are then rejected. | [optional]
**key_determines** | **List[str]** | Columns whose value is determined by this table's `key`: for every uploaded row, every stored row sharing its key holds the same value of these columns. Declaring this lets a keyed mutation (`delete`, `update`, `upsert`) restrict its search for prior versions to the values the upload carries, which prunes far harder than the key alone when the key's own file statistics are weak. Omit (the default) for the unrestricted search. **Correctness-affecting, not a hint.** If the assertion is false, a mutation supersedes one version of a key and appends beside another, silently duplicating it. Declare it only where the invariant is established. | [optional]
**name** | **str** | |
**partition_by** | [**List[TablePartitionKey]**](TablePartitionKey.md) | Partition keys for this table, applied in order. Omit for no partitioning. Declared when the table is created and fixed thereafter. | [optional]
**sorted_by** | [**List[TableSortKey]**](TableSortKey.md) | Sort keys for this table, applied in order. Omit for no sort order. Declared when the table is created and fixed thereafter. | [optional]
Expand Down
2 changes: 1 addition & 1 deletion docs/BulkCreateDatabasesRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**default_schema** | **str** | Schema that unqualified table names resolve to inside each database. | [optional]
**expires_at** | **str** | When the created databases expire. Accepts an RFC 3339 timestamp or a relative duration such as `24h`, `90m`, or `7d`. | [optional]
**idempotency_key** | **str** | Repeat this value to retry a request safely. A retry carrying a key that was already used returns the original batch — the same `batch_id` and the same databases — instead of creating a second set. The key identifies the request, not its contents: reusing a key with a different `count` or template returns the original batch unchanged rather than reporting a mismatch. Use a fresh key per distinct request. | [optional]
**name_template** | **str** | Optional display-label pattern for each database. `{index}` is replaced with the database's zero-based position — for example `tenant-{index}` produces `tenant-0`, `tenant-1`, and so on. When omitted, each database is labelled from its own ID. Labels are not identifiers and are not required to be unique. | [optional]
**name_template** | **str** | Optional display-label pattern for each database. Must contain `{index}`, which is replaced with the database's zero-based position, padded with leading zeros to the width of the batch's largest index — with a `count` of 100, `tenant-{index}` produces `tenant-00` through `tenant-99`. A pattern without `{index}` is rejected, since every database in the batch would be given the same label. Each label also carries a suffix identifying the batch, so repeating the same pattern on a later call does not reuse labels from this one. When omitted, each database is labelled from its own ID. | [optional]
**schemas** | [**List[DatabaseDefaultSchemaDecl]**](DatabaseDefaultSchemaDecl.md) | Schemas and tables to declare on every database in the batch, in the same shape a single create accepts. The declaration applies identically to each database, so a batch of 10,000 declaring one table yields 10,000 databases that each hold that table and are ready to load — with no follow-up call per database. Omitted or empty means each database starts with no tables. | [optional]

## Example
Expand Down
178 changes: 2 additions & 176 deletions docs/ConnectionsApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ Method | HTTP request | Description
[**get_table_profile**](ConnectionsApi.md#get_table_profile) | **GET** /v1/connections/{connection_id}/tables/{schema}/{table}/profile | Get table profile
[**list_connections**](ConnectionsApi.md#list_connections) | **GET** /v1/connections | List connections
[**load_managed_table**](ConnectionsApi.md#load_managed_table) | **POST** /v1/connections/{connection_id}/schemas/{schema}/tables/{table}/loads | Load managed table from inline data, upload, or query result
[**purge_connection_cache**](ConnectionsApi.md#purge_connection_cache) | **DELETE** /v1/connections/{connection_id}/cache | Purge connection cache
[**purge_table_cache**](ConnectionsApi.md#purge_table_cache) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/cache | Purge table cache


# **add_managed_schema**
Expand Down Expand Up @@ -723,7 +721,7 @@ This endpoint does not need any parameter.

Load managed table from inline data, upload, or query result

Publish data as the new contents of a managed table from one of three sources — provide exactly one. With `data`, CSV text is sent inline in this request, up to 2 MiB; column types are detected from the data unless `columns` declares them, and a larger payload is rejected with 413 and the error code `INLINE_DATA_TOO_LARGE`, at which point the data should be uploaded and loaded by `upload_id` instead. With `upload_id`, a previously-uploaded file is published: CSV, JSON, and Parquet are supported; the format is auto-detected from the upload's `Content-Type` and file contents, or set explicitly via the `format` field. With `result_id`, a persisted query result is copied into the table, so the table keeps its data even after the result expires; a result can be loaded into any number of tables. If the target table (or its schema) has not been declared yet, it is created automatically as part of the load — declaring tables up front is optional. `mode` selects how the data is applied: `replace` overwrites the table's contents, `append` inserts the new rows on top of the existing data. Concurrent loads against the same upload return 409. For an upload or inline data, set `async` to run the load in the background and get back a job ID to poll; add `async_after_ms` to wait briefly for it to finish before falling back to a job ID. A `result_id` load runs synchronously.
Publish data as the new contents of a managed table from one of three sources — provide exactly one. With `data`, CSV text is sent inline in this request, up to 2 MiB; column types are detected from the data unless `columns` declares them, and a larger payload is rejected with 413 and the error code `INLINE_DATA_TOO_LARGE`, at which point the data should be uploaded and loaded by `upload_id` instead. With `upload_id`, a previously-uploaded file is published: CSV, JSON, and Parquet are supported; the format is auto-detected from the upload's `Content-Type` and file contents, or set explicitly via the `format` field. With `result_id`, a persisted query result is copied into the table, so the table keeps its data even after the result expires; a result can be loaded into any number of tables. If the target table (or its schema) has not been declared yet, it is created automatically as part of the load — declaring tables up front is optional. `mode` selects how the data is applied and accepts five values: `replace` makes the uploaded rows the table's entire contents, `append` inserts them on top of the existing data, and `delete`, `update`, and `upsert` match rows by key — removing, replacing, or inserting-or-replacing the matched rows respectively. The three key-matching modes need a key: the one the table was created with, or one given in `key` on the request. Concurrent loads against the same upload return 409. For an upload or inline data, set `async` to run the load in the background and get back a job ID to poll; add `async_after_ms` to wait briefly for it to finish before falling back to a job ID. A `result_id` load runs synchronously.

### Example

Expand Down Expand Up @@ -766,7 +764,7 @@ with hotdata.ApiClient(configuration) as api_client:
connection_id = 'connection_id_example' # str | Connection ID
var_schema = 'var_schema_example' # str | Schema name
table = 'table_example' # str | Table name
load_managed_table_request = {"data":"order_id,customer_id,amount\n1001,42,1999\n1002,7,4550\n","mode":"replace"} # LoadManagedTableRequest |
load_managed_table_request = {"mode":"replace","data":"order_id,customer_id,amount\n1001,42,1999\n1002,7,4550\n"} # LoadManagedTableRequest |

try:
# Load managed table from inline data, upload, or query result
Expand Down Expand Up @@ -815,175 +813,3 @@ Name | Type | Description | Notes

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

# **purge_connection_cache**
> purge_connection_cache(connection_id)

Purge connection cache

Purge all cached data for a connection. The next query against these tables will trigger a fresh sync from the remote source.

### Example

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

```python
import hotdata
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

try:
# Purge connection cache
api_instance.purge_connection_cache(connection_id)
except Exception as e:
print("Exception when calling ConnectionsApi->purge_connection_cache: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**connection_id** | **str**| Connection ID |

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

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

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | Cache purged | - |
**400** | Managed catalogs own their data and cannot be cache-purged | - |
**404** | Connection not found | - |
**409** | Connection backs a database's default catalog and cannot be purged directly | - |

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

# **purge_table_cache**
> purge_table_cache(connection_id, var_schema, table)

Purge table cache

Purge the cached data for a single table. The next query will trigger a fresh sync.

### Example

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

```python
import hotdata
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
table = 'table_example' # str | Table name

try:
# Purge table cache
api_instance.purge_table_cache(connection_id, var_schema, table)
except Exception as e:
print("Exception when calling ConnectionsApi->purge_table_cache: %s\n" % e)
```



### Parameters


Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**connection_id** | **str**| Connection ID |
**var_schema** | **str**| Schema name |
**table** | **str**| Table name |

### Return type

void (empty response body)

### Authorization

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

### HTTP request headers

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

### HTTP response details

| Status code | Description | Response headers |
|-------------|-------------|------------------|
**204** | Table cache purged | - |
**404** | Not found | - |

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

1 change: 0 additions & 1 deletion docs/CreateConnectionRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Name | Type | Description | Notes
**name** | **str** | |
**secret_id** | **str** | Optional reference to a secret by ID (e.g., \"secr_abc123\"). If provided, this secret will be used for authentication. Mutually exclusive with `secret_name`. | [optional]
**secret_name** | **str** | Optional reference to a secret by name. If provided, this secret will be used for authentication. Mutually exclusive with `secret_id`. | [optional]
**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] [default to False]
**source_type** | **str** | |

## Example
Expand Down
Loading
Loading