Skip to main content

Query a Flowfile catalog from DuckDB / Superset — zero-copy, read-only.

Project description

flowfile-duckdb

Query a Flowfile catalog from DuckDB (and anything that speaks DuckDB, like Apache Superset) — zero-copy, read-only.

Flowfile stores catalog tables as open Delta Lake tables (Parquet + _delta_log) and tracks them in a small SQLite database (flowfile_catalog.db). DuckDB reads Delta natively via delta_scan, so this package is a thin metadata bridge: it reads the SQLite catalog and exposes every table to DuckDB as a view over delta_scan(...) (or read_parquet(...) for legacy Parquet tables). No data is copied or moved; queries read the underlying files live.

Install

With uv (recommended):

uv pip install flowfile-duckdb          # once published
uv pip install -e .                     # from a checkout

Or plain pip:

pip install flowfile-duckdb

CLI

flowfile-duckdb list                          # sanity-check discovered tables
flowfile-duckdb build --out catalog.duckdb    # persist a DuckDB file with the views
flowfile-duckdb attach > init.sql             # emit the CREATE VIEW SQL as an init script

Common flags: --catalog-db PATH, --schema-template, --include-cloud, --owner-id N.

Python

import duckdb
from flowfile_duckdb import attach_flowfile_catalog

con = duckdb.connect()
attach_flowfile_catalog(con)                  # schemas render as e.g. Demo_sales_analytics
con.sql('SELECT * FROM "Demo_sales_analytics"."sales" LIMIT 5')

Schema names default to {catalog}_{schema} (single underscore); override via schema_template= (e.g. "{schema}" to drop the catalog prefix).

Where is the catalog DB?

Resolved the same way Flowfile resolves it:

  1. FLOWFILE_DB_PATH — explicit path to flowfile_catalog.db.
  2. <FLOWFILE_STORAGE_DIR or ~/.flowfile>/database/flowfile_catalog.db (default).

The SQLite connection is opened read-only.

Apache Superset

pip install duckdb-engine
flowfile-duckdb build --out /data/flowfile_catalog.duckdb

Add a Superset database with SQLAlchemy URI duckdb:////data/flowfile_catalog.duckdb. See examples/superset.md.

Publishing (maintainers)

Distribution is automated via GitHub Actions (.github/workflows/publish.yml), using PyPI Trusted Publishing (OIDC — no API token stored):

  1. On PyPI, add a trusted publisher for this project: owner edwardvaneechoud, repo flowfile-duckdb, workflow publish.yml, environment pypi.
  2. Create a GitHub Environment named pypi.
  3. Push a v* tag (or publish a GitHub Release) — the workflow builds with uv and publishes to PyPI.
git tag v0.1.0 && git push origin v0.1.0

Known limitations / next steps

  • Cloud tables (s3://, az://, gs://) are skipped unless --include-cloud, which also needs a DuckDB CREATE SECRET. flowfile_duckdb/secrets.py maps a decrypted options dict to CREATE SECRET SQL but deliberately does not decrypt Flowfile's $ffsec$ secrets (that needs Flowfile's master key + HKDF).
  • Virtual / SQL tables have no physical files and are skipped (they can't be read without Flowfile's engine).
  • Refresh: views read live data, but the table list is a snapshot — re-run build/attach to pick up newly created tables.
  • On multi-user (docker-mode) installs the catalog holds every user's tables; use --owner-id to scope to one user.

License

MIT

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

flowfile_duckdb-0.1.0.tar.gz (37.6 kB view details)

Uploaded Source

Built Distribution

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

flowfile_duckdb-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file flowfile_duckdb-0.1.0.tar.gz.

File metadata

  • Download URL: flowfile_duckdb-0.1.0.tar.gz
  • Upload date:
  • Size: 37.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for flowfile_duckdb-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e67ec2610ae62a73a58ee2f401265899b42bc017fefedbd0cec5f825452ae8c8
MD5 0767855f8d5e6d1ce9ab19a0a6c83d54
BLAKE2b-256 9cea4d4748ad6c2d958b6eb609a9eb4a792fb47f3027229a468be1af9d3da39b

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowfile_duckdb-0.1.0.tar.gz:

Publisher: publish.yml on Edwardvaneechoud/flowfile-duckdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flowfile_duckdb-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for flowfile_duckdb-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67571b8e1eaed896c42ffe479e96996335baca07996da7d000b47d37b595a57b
MD5 308819cab30cd2922be41a441f4134cc
BLAKE2b-256 4f1572f658bf418b7a207941270c8b2b26523d21457c6647d6c55e5a8ffdedfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for flowfile_duckdb-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Edwardvaneechoud/flowfile-duckdb

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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