FeatureMesh ADBC
Run FeatureQL from Python code that uses ADBC, Arrow's database connectivity API, and get Arrow tables back. It works with DuckDB, PostgreSQL, Trino, ClickHouse, BigQuery, Snowflake and Databricks, and with featuremeshd, FeatureMesh's serving runtime.
Documentation: Query FeatureQL through ADBC.
How it works
The package wraps an ADBC driver and runs in one of two modes.
Transpiled mode: your own database runs the query. The package sends each statement to a FeatureMesh registry, gets back SQL for your database, and runs that SQL through the database's ADBC driver. Only the statement text goes to the registry, never your data.
FeatureQL ──► featuremesh-adbc ──(1) statement──────────► FeatureMesh registry
│ ◄─(2) SQL for your database──┘
│
└──(3) SQL──► ADBC driver ──► your database ──► Arrow table
Direct mode (the default): the statement goes to the driver unchanged. Use it with the Flight SQL driver against featuremeshd, which reads FeatureQL itself.
FeatureQL ──► featuremesh-adbc ──► Flight SQL driver ──► featuremeshd ──► Arrow table
Install
pip install featuremesh-adbc
Then install the ADBC driver of your database. The driver name you pass to connect() picks it:
| Database | driver |
Install the driver with |
|---|---|---|
| DuckDB | duckdb |
pip install duckdb (the driver ships inside it) |
| PostgreSQL | postgresql |
pip install adbc-driver-postgresql |
| BigQuery | bigquery |
pip install adbc-driver-bigquery |
| Snowflake | snowflake |
pip install adbc-driver-snowflake |
| featuremeshd | flightsql |
pip install adbc-driver-flightsql |
| Trino | trino |
dbc install trino |
| ClickHouse | clickhouse |
dbc install clickhouse |
| Databricks | databricks |
dbc install databricks |
Trino, ClickHouse and Databricks have no pip package: install them with
dbc, Columnar's ADBC driver installer. The package loads the pip
driver when it is installed, and otherwise the driver dbc installed. A missing driver raises
InterfaceError naming both install commands.
Requirements: Python 3.12 or later. The transpiled mode needs a FeatureMesh registry 0.4.1 or later
(the managed one is https://api.featuremesh.com/v1/featureql) and a registry token. The direct
mode needs featuremeshd 0.3.1 or later and a project user or service account token.
Run FeatureQL on your database (transpiled mode)
from featuremesh_adbc import dbapi
FEATUREMESH = {
"adbc.featuremesh.execution_mode": "transpiled",
"adbc.featuremesh.registry_url": "https://api.featuremesh.com/v1/featureql",
"adbc.featuremesh.registry_token": "<your token>",
}
with dbapi.connect(driver="duckdb", path=":memory:", **FEATUREMESH) as con, con.cursor() as cursor:
cursor.execute("""
DEFINE id := INPUT(BIGINT)
RETURN id, double := id * 2
FOR id := BIND_VALUES(SEQUENCE(1, 3))
ORDER BY id
""")
print(cursor.fetch_arrow_table().to_pylist())
# [{'ID': 1, 'DOUBLE': 2}, {'ID': 2, 'DOUBLE': 4}, {'ID': 3, 'DOUBLE': 6}]
cursor.fetch_df() returns a pandas data frame instead (it needs pandas).
Connect to each database
Only the driver and its options change; the FeatureMesh options and the FeatureQL stay the same.
Every other keyword is an ADBC option of the driver, passed as is (flat, or grouped under
db_kwargs).
# PostgreSQL
dbapi.connect(driver="postgresql", uri="postgresql://user:password@host:5432/database", **FEATUREMESH)
# Trino
dbapi.connect(driver="trino", uri="http://user@host:8080?catalog=memory&schema=default", **FEATUREMESH)
# ClickHouse (HTTP interface)
dbapi.connect(driver="clickhouse", uri="http://host:8123", username="user", password="password", **FEATUREMESH)
# BigQuery (Google application default credentials); the driver needs a default dataset
dbapi.connect(
driver="bigquery",
**{"adbc.bigquery.sql.project_id": "my-project", "adbc.bigquery.sql.dataset_id": "my_dataset"},
**FEATUREMESH,
)
# Snowflake (programmatic access token)
dbapi.connect(
driver="snowflake",
username="user",
**{
"adbc.snowflake.sql.account": "myorg-myaccount",
"adbc.snowflake.sql.auth_type": "auth_pat",
"adbc.snowflake.sql.client_option.auth_token": "<snowflake token>",
"adbc.snowflake.sql.warehouse": "my_warehouse",
},
**FEATUREMESH,
)
# Databricks (personal access token)
dbapi.connect(driver="databricks", uri="databricks://token:<pat>@<host>:443/<http path>", **FEATUREMESH)
What the registry translates
- A FeatureQL statement (
RETURN ...,DEFINE ... RETURN ...) is translated for your database:RETURN a := ARRAY[1, 2, 3]runs on each of them. - A plain SQL statement (
SELECT ...) comes back unchanged, so it must already be valid on your database:SELECT ARRAY[1, 2, 3]fails on Snowflake and Databricks. - The registry writes SQL for the backend named after the driver (
postgresqlis sent aspostgres). When they differ, for example a Flight SQL server in front of another engine, setadbc.featuremesh.backend. "adbc.featuremesh.debug": Trueprints the SQL the registry returned.
Send FeatureQL to featuremeshd (direct mode)
featuremeshd answers FeatureQL on its Flight SQL port (10093 by default) and checks every caller:
send a project user or service account token in the Authorization header.
from featuremesh_adbc import dbapi
auth = {"adbc.flight.sql.authorization_header": "Bearer <your token>"}
with dbapi.connect(driver="flightsql", uri="grpc://<featuremeshd host>:10093", **auth) as con, con.cursor() as cursor:
cursor.execute("RETURN F1 := 1, F2 := 2, F3 := F1 + F2;")
print(cursor.fetch_arrow_table().to_pylist()) # [{'f1': 1, 'f2': 2, 'f3': 3}]
In this mode the cursor is the driver's own and the registry options are not used.
Options
| Option | Values | Default |
|---|---|---|
adbc.featuremesh.execution_mode |
direct: the statement goes to the driver unchanged. transpiled: the registry translates it first |
direct |
adbc.featuremesh.registry_url |
The registry's FeatureQL endpoint. Required in the transpiled mode | none |
adbc.featuremesh.registry_token |
Your registry token. Required in the transpiled mode | none |
adbc.featuremesh.backend |
The backend the registry writes SQL for | the driver's name (postgresql → postgres) |
adbc.featuremesh.debug |
True prints the SQL the registry returned |
False |
Results differ by engine
The rows are the same; each engine names and types the columns its own way:
- FeatureQL names are case-insensitive. In the transpiled mode the databases return them in upper
case (
ID); featuremeshd returns them in lower case (id). - Snowflake's driver returns an ARRAY as JSON text (
'[1, 2, 3]') and integers asDecimal.
When a statement is refused
The cursor runs one SQL statement per call. A FeatureQL statement whose translation needs several
steps (temporary tables created first, for example) is refused with PLAN-NEEDS-STEPS: run it with
the featuremesh Python library, which runs every step.
A registry newer than this package can answer with a plan the package does not know. The package
refuses it with PLAN-VERSION-UNSUPPORTED or PLAN-UNKNOWN-VALUE before running anything: upgrade
the package.
License
Proprietary: see the LICENSE file in the package. Contact hello@featuremesh.com for other uses.
Metadata
Release files for featuremesh-adbc 0.1.0
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 |
|---|---|---|---|---|
| featuremesh_adbc-0.1.0.tar.gz | 15.8 kB | With provenance | Details for featuremesh_adbc-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| featuremesh_adbc-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for featuremesh_adbc-0.1.0-py3-none-any.whl |
Total release size: 34.6 kB
Release files / featuremesh_adbc-0.1.0.tar.gz
| Download URL | featuremesh_adbc-0.1.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3af186d830af97e87b4710f33b6a782b9da5f6c4fc8f58d47d78faece840871f
|
|
BLAKE2b-256 checksum How to use checksums |
cdd610f43861ac545d3846ef7074faa94b51f552e831960033120ce732e881c3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logRelease files / featuremesh_adbc-0.1.0-py3-none-any.whl
| Download URL | featuremesh_adbc-0.1.0-py3-none-any.whl |
|---|---|
| Size | 18.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
63bc715cbef4f9e11c63eb59c11dd31949cfbf4bb3b7cbe47ebab6fbdf1954e5
|
|
BLAKE2b-256 checksum How to use checksums |
a605c469927b157e5b48635a72d33dcef68ba60625534219e9d775d147857da4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logSecurity for featuremesh-adbc 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for featuremesh_adbc-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 1, 2026.
Transparency logA 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.