Skip to main content

dlt destination for Firebolt (staged Parquet + COPY INTO)

Project description

dlt-firebolt

Community dlt destination for Firebolt.

Load data with filesystem staging (Parquet on S3) and COPY INTO, the same pattern used by dlt's Snowflake and Redshift destinations.

Install

pip install dlt-firebolt

Requires Python 3.10+.

Register the destination once in your project:

import firebolt_dest  # registers destination="firebolt"

Prerequisites

  1. Firebolt service account with access to your database and engine.
  2. S3 bucket for dlt filesystem staging.
  3. Firebolt external location for that bucket prefix:
CREATE LOCATION "your_location_name" WITH
  SOURCE = 'CLOUD_STORAGE'
  URL = 's3://your-bucket/your-prefix/'
  CREDENTIALS = (AWS_ROLE_ARN = 'arn:aws:iam::...:role/...');

Set FIREBOLT_S3_LOCATION_NAME (or s3_location_name in secrets) to the exact location name from CREATE LOCATION.

Quick start

import dlt
import firebolt_dest
from firebolt_dest.configuration import make_firebolt_pipeline

@dlt.resource(name="orders", write_disposition="append")
def orders():
    yield {"order_id": 1, "customer": "Acme"}

pipeline = make_firebolt_pipeline(
    pipeline_name="my_pipeline",
    dataset_name="my_dataset",
)

pipeline.run(orders(), loader_file_format="parquet")

Tables are created as {dataset}_{table} (for example my_dataset_orders).

Using .dlt/secrets.toml

pipeline = make_firebolt_pipeline(
    pipeline_name="my_pipeline",
    dataset_name="my_dataset",
    from_secrets=True,
)

Example secrets file:

[destination.firebolt]
s3_location_name = "your_location_name"
s3_prefix = "dlt-landing"

[destination.firebolt.credentials]
host = "YOUR_DATABASE"
database = "YOUR_ENGINE"
username = "YOUR_CLIENT_ID"
password = "YOUR_CLIENT_SECRET"
account_name = "YOUR_ACCOUNT_NAME"

[destination.filesystem]
bucket_url = "s3://your-bucket/dlt-landing/dlt/staging"

See .dlt/secrets.toml.example in the repository for a full template.

Configuration

Variable Required Description
FIREBOLT_CLIENT_ID yes Service account client ID
FIREBOLT_CLIENT_SECRET yes Service account secret
FIREBOLT_ACCOUNT_NAME yes Firebolt account name
FIREBOLT_DATABASE yes Target database
FIREBOLT_ENGINE yes Engine name
FIREBOLT_S3_LOCATION_NAME yes Firebolt external location name (must match CREATE LOCATION)
S3_BUCKET yes Staging bucket
S3_PREFIX no Key prefix (default: dlt-landing)
DLT_DATASET_NAME no Default dataset name (default: demo)

Set credentials via environment variables or .dlt/secrets.toml. Do not commit secrets.

Supported capabilities

Feature Support
Loader format Parquet only
Staging Filesystem (S3) required
append Yes
replace truncate-and-insert, insert-from-staging
merge delete-insert (single-table and nested)
Transactions Merge follow-up jobs run in an explicit transaction; ordinary loads use autocommit

Development

Clone the repository and install in editable mode with dev dependencies:

git clone https://github.com/firebolt-analytics/dlt-firebolt.git
cd dlt-firebolt
pip install -e ".[dev]"
cp .env.example .env   # fill in Firebolt and S3 credentials
pytest -m "not integration"

Optional live integration tests (requires Firebolt, S3, and AWS credentials):

FIREBOLT_RUN_INTEGRATION=1 pytest -m integration -v

License

Apache License 2.0. See LICENSE.

Status

Community package maintained by Firebolt Analytics. Not part of core dlt.

  • Published on PyPI (pip install dlt-firebolt)
  • Append, merge, and replace dispositions
  • Nested multi-table merge
  • Website integration docs
  • Optional listing on dlt community destinations page

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dlt_firebolt-0.1.2.tar.gz (17.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dlt_firebolt-0.1.2-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file dlt_firebolt-0.1.2.tar.gz.

File metadata

  • Download URL: dlt_firebolt-0.1.2.tar.gz
  • Upload date:
  • Size: 17.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dlt_firebolt-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a278cca377109cb75f1f516750df51f74da55c7ed37e8c378d6d69afaf088897
MD5 bbdf11719006f18556390d7561bf6c1b
BLAKE2b-256 0ccd69fb834cbe9ef927b2fb9b6a9da65977f2b6680667fd47ec6c4cfc385d54

See more details on using hashes here.

File details

Details for the file dlt_firebolt-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: dlt_firebolt-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for dlt_firebolt-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d72dcee26c55fad71a761f563208a5b2dfd07c999cce289102330e42f94751aa
MD5 ad5097b703a95394acedaced02e665c6
BLAKE2b-256 be84c4401e9dc45f54ba52384d13dc4dba5880b326d2350024fb49cbb93cff1f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page