dlt destination for loading data into Hotdata managed databases.
Project description
hotdata-dlt-destination
hotdata-dlt-destination is a Python package that implements a custom dlt destination for loading data into Hotdata managed databases with deterministic idempotency keys and explicit write semantics.
What this repo includes
- Custom destination via
@dlt.destinationinsrc/hotdata_dlt_destination/destination.py - Managed-database ingestion through
hotdata-runtime(upload_parquet,load_managed_table,SELECT) - Read-modify-write append/merge using only supported API operations
- Deterministic batch and row idempotency keys
- Example pipelines:
hotdata-dlt-basic-pipeline(append)hotdata-dlt-incremental-pipeline(upsert/merge)hotdata-dlt-linear-pipeline(Linear issues → Hotdata)
- Unit tests in
tests/ - Architecture and runbook docs in
docs/
Data contract defaults
- Managed database:
database_name(defaultdlt, created on first load when missing) - Schema:
public - Table name: normalized lowercase dlt table identifier
- Nested table names:
{parent}__{child} - Write semantics (all use
load_managed_table(replace)under the hood):replace: upload batch parquet and replace the target tableappend: read existing target rows, append batch in Python, replace targetupsert/merge: read existing rows, upsert by dltprimary_key(or_hotdata_row_key), replace target
- Idempotency:
- Batch key
_hotdata_batch_key= hash(table + full batch payload) - Row key
_hotdata_row_key= hash(table + canonical row payload)
- Batch key
Configure
Set environment variables (or pass destination kwargs / dlt secrets):
HOTDATA_API_KEYHOTDATA_WORKSPACEHOTDATA_DATABASE(managed database name, defaultdlt)- optional:
HOTDATA_SCHEMA,HOTDATA_WRITE_DISPOSITION,HOTDATA_DECLARED_TABLES, retry tuning
For pipelines with multiple tables, declare every target table when the managed database is first created:
hotdata_destination(
database_name="analytics",
declared_tables=["customers", "orders", "orders__items"],
)
Usage
import dlt
from hotdata_dlt_destination import hotdata_destination
pipeline = dlt.pipeline(
pipeline_name="my_pipeline",
destination=hotdata_destination(
database_name="analytics",
write_disposition="append",
declared_tables=["customers"],
),
)
pipeline.run(my_resource())
Per-resource write_disposition and primary_key from dlt take precedence over the destination default.
Developer workflow
uv sync
uv run ruff check .
uv run pytest
uv run hotdata-dlt-destination
Run pipelines:
uv run hotdata-dlt-basic-pipeline
uv run hotdata-dlt-incremental-pipeline
uv run hotdata-dlt-linear-pipeline
Run the live end-to-end integration test (requires Hotdata + Linear env vars):
uv run pytest tests/test_e2e_linear_hotdata.py -m integration
References
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hotdata_dlt_destination-0.3.0.tar.gz.
File metadata
- Download URL: hotdata_dlt_destination-0.3.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9df695a1282175b2d0f78eb2300e42d6f240526b2b0ca6ac408c8a734521ff87
|
|
| MD5 |
50f490b9afcb87ed31c5286465fd4010
|
|
| BLAKE2b-256 |
c579d373befe8d071904187aa689f69b8a1aa50713a1b8561b4780a852238574
|
Provenance
The following attestation bundles were made for hotdata_dlt_destination-0.3.0.tar.gz:
Publisher:
publish.yml on hotdata-dev/hotdata-dlt-destination
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hotdata_dlt_destination-0.3.0.tar.gz -
Subject digest:
9df695a1282175b2d0f78eb2300e42d6f240526b2b0ca6ac408c8a734521ff87 - Sigstore transparency entry: 1585857437
- Sigstore integration time:
-
Permalink:
hotdata-dev/hotdata-dlt-destination@14b05fc54e0f57167022dbd0404090923f11e1d2 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/hotdata-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@14b05fc54e0f57167022dbd0404090923f11e1d2 -
Trigger Event:
push
-
Statement type:
File details
Details for the file hotdata_dlt_destination-0.3.0-py3-none-any.whl.
File metadata
- Download URL: hotdata_dlt_destination-0.3.0-py3-none-any.whl
- Upload date:
- Size: 13.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
956a9bd760c6bf3151d967daccd4935f1943ac3ef49f8074ede4fde5f3b7bfdb
|
|
| MD5 |
b0e667c4edddab9c8ad53d44d361efb3
|
|
| BLAKE2b-256 |
f3f8acecd181ac9ce0b6627500ba1c0af006869f062ffa12703b1485e47397a4
|
Provenance
The following attestation bundles were made for hotdata_dlt_destination-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on hotdata-dev/hotdata-dlt-destination
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hotdata_dlt_destination-0.3.0-py3-none-any.whl -
Subject digest:
956a9bd760c6bf3151d967daccd4935f1943ac3ef49f8074ede4fde5f3b7bfdb - Sigstore transparency entry: 1585857534
- Sigstore integration time:
-
Permalink:
hotdata-dev/hotdata-dlt-destination@14b05fc54e0f57167022dbd0404090923f11e1d2 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/hotdata-dev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@14b05fc54e0f57167022dbd0404090923f11e1d2 -
Trigger Event:
push
-
Statement type: