This release is a pre-release and may not be stable for production use.
floe-compute-duckdb
DuckDB compute plugin for the floe data platform.
Overview
This plugin enables DuckDB as a compute target for dbt transforms in the floe platform. DuckDB is a self-hosted, in-process analytical database that runs within K8s job pods alongside dbt.
Features
- In-process: Runs alongside dbt in the same pod
- Self-hosted: Managed by floe K8s infrastructure
- Iceberg support: Direct catalog attachment via iceberg extension
- Low overhead: No separate database server required
Installation
pip install floe-compute-duckdb
Or with dbt adapter:
pip install floe-compute-duckdb[dbt]
Usage
The plugin is automatically discovered by the floe registry via entry points:
from floe_core.plugin_registry import get_registry
from floe_core.plugin_types import PluginType
registry = get_registry()
duckdb_plugin = registry.get(PluginType.COMPUTE, "duckdb")
print(f"Plugin: {duckdb_plugin.name} v{duckdb_plugin.version}")
Generate dbt Profile
from floe_core.plugins.compute import ComputeConfig
config = ComputeConfig(
extra={
"path": ":memory:",
"threads": 4,
"extensions": ["iceberg", "httpfs"],
"settings": {"memory_limit": "4GB"}
}
)
profile = duckdb_plugin.generate_dbt_profile(config)
# {'type': 'duckdb', 'path': ':memory:', 'threads': 4, ...}
Validate Connection
result = duckdb_plugin.validate_connection(config)
if result.success:
print(f"Connected in {result.latency_ms:.1f}ms")
else:
print(f"Failed: {result.message}")
Query Timeout Configuration
The plugin supports query timeout enforcement via the timeout_seconds configuration:
from floe_core import ComputeConfig
config = ComputeConfig(
plugin="duckdb",
threads=4,
timeout_seconds=300, # 5 minute timeout
connection={"path": ":memory:"}
)
profile = duckdb_plugin.generate_dbt_profile(config)
# profile["timeout_seconds"] == 300
How timeout enforcement works:
- The plugin includes
timeout_secondsin the generated dbt profile - The dbt-duckdb adapter is responsible for actual timeout enforcement
- Platform operators can set timeouts in
manifest.yamlto enforce governance - Data engineers inherit the platform default unless explicitly overridden
Default value: 3600 seconds (1 hour)
Valid range: 1 to 86400 seconds (1 second to 24 hours)
Get K8s Resource Requirements
spec = duckdb_plugin.get_resource_requirements("medium")
print(f"CPU: {spec.cpu_request} - {spec.cpu_limit}")
print(f"Memory: {spec.memory_request} - {spec.memory_limit}")
Development
# Install in development mode
uv pip install -e ".[dev]"
# Run tests
uv run pytest tests/unit/ -v
# Type checking
uv run mypy src/
# Linting
uv run ruff check src/
License
Apache 2.0
Metadata
Release files for floe-compute-duckdb 0.1.0a1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| floe_compute_duckdb-0.1.0a1.tar.gz | 36.1 kB | Without provenance | Details for floe_compute_duckdb-0.1.0a1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| floe_compute_duckdb-0.1.0a1-py3-none-any.whl | Python 3 | none | any | Details for floe_compute_duckdb-0.1.0a1-py3-none-any.whl |
Total release size: 49.7 kB
Release files / floe_compute_duckdb-0.1.0a1.tar.gz
| Download URL | floe_compute_duckdb-0.1.0a1.tar.gz |
|---|---|
| Size | 36.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
30d56bb3843fb856c49feede7914b4f576705e4ab67b3cc40ae304f648434905
|
|
BLAKE2b-256 checksum How to use checksums |
0689945b193038a41c03241feb01b38aa8f56375f16fcdd02cfd80f5f16ffc09
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Release files / floe_compute_duckdb-0.1.0a1-py3-none-any.whl
| Download URL | floe_compute_duckdb-0.1.0a1-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1b542a1b6d9f9314a6234dddfe1ac1060cbf2a28276a574c175d2fb56b2874c6
|
|
BLAKE2b-256 checksum How to use checksums |
faf883815421cbb5f7efed568a82db0ea677928bdbc2a3d4ed54ef5c11179f4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for floe-compute-duckdb 0.1.0a1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.