Skip to main content

dbt-redis-adbc

A dbt Core adapter for Redis 8.x, built on the Redis ADBC driver. Compatible with dbt Core 1.12 and later 1.x releases.

This community-origin adapter supports direct Redis ADBC and a separate v1 Flight SQL transport. See the integration status and evidence for validation limits, the experimental dbt v2 fork, and maintenance/support scope.

Complete installation and first-model guide covers Python installation, native driver download and checksum verification, TLS configuration, a dbt profile, and your first model.

Install

Requires Python 3.14 or later (PyArrow 26+) and Redis 8.x with the Query Engine (Search) enabled. Integration tests require a Redis Enterprise cluster with TLS and username/password authentication.

python -m pip install dbt-redis-adbc==0.0.34

The Python package does not include the native Redis ADBC driver. Download and extract the shared library for your platform from the driver releases. The example project uses the latest stable driver release (v0.0.27 at validation). Prebuilt libraries are available for macOS Apple Silicon, Linux x86-64, and Linux arm64.

Set REDIS_ADBC_DRIVER to the library's absolute path. See the driver's server requirements and ACL permissions before connecting.

Configure

Set your dbt project's profile to redis_project and add this profile to ~/.dbt/profiles.yml:

redis_project:
  target: dev
  outputs:
    dev:
      type: redis_adbc
      driver: "{{ env_var('REDIS_ADBC_DRIVER') }}"
      uri: "{{ env_var('REDIS_URI') }}"
      username: "{{ env_var('REDIS_USERNAME', '') }}"
      password: "{{ env_var('REDIS_PASSWORD', '') }}"
      driver_options:
        adbc.redis.tls_ca_file: "{{ env_var('REDIS_TLS_CA_FILE', '') }}"
      database: redis
      schema: analytics
      threads: 4

Use a rediss:// URI for TLS. Keep credentials in the separate username and password fields. For a private CA, set REDIS_TLS_CA_FILE to its PEM bundle's absolute path. From your project, verify the connection with:

dbt debug --profile redis_project

Flight SQL

To use a separately deployed Redis Arrow Flight server, install the Flight client extra:

python -m pip install 'dbt-redis-adbc[flightsql]'
redis_project:
  target: flight
  outputs:
    flight:
      type: redis_adbc
      transport: flightsql
      uri: "{{ env_var('FLIGHT_SQL_URI', 'grpc://localhost:8815') }}"
      username: "{{ env_var('FLIGHT_SQL_USERNAME', '') }}"
      password: "{{ env_var('FLIGHT_SQL_PASSWORD', '') }}"
      database: redis
      schema: analytics
      time_zone: UTC
      threads: 4

The client loads adbc_driver_flightsql automatically; an explicit driver can point to a Flight SQL shared library instead. REDIS_ADBC_DRIVER applies only to the default transport: redis. The server loads Redis ADBC and needs Redis with Search. This mode targets the Redis-backed Flight SQL server, rather than arbitrary Flight SQL databases.

Enable sessions on the server and route each connection to the same server process. The adapter enables Flight cookie middleware and sets schema/time zone in each connection's SQL session, preserving temporary tables across requests. Configure aggregate_pushdown, rename_rekey, Redis read/write timeouts and other adbc.redis.* options on the server; the client rejects those settings. driver_options accepts Flight client options, including TLS root certificates and RPC timeouts. Cookie middleware cannot be disabled.

For TLS use grpc+tls:// and configure certificate trust in the Flight client; username/password refer to the server's Flight authentication. Available TLS and authentication features depend on the server build. Follow its deployment guide. No SQL transactions are introduced by this transport. dbt v2 is separate. See the local validation record for tested versions, workflow coverage, and deployment limits.

Model indexes

Configure named, nonunique Redis Search indexes on table models:

{{ config(materialized='table',
          indexes=[{'columns': ['name'], 'type': 'btree'},
                   {'columns': ['id', 'name'], 'type': 'hash'}]) }}
select 1 as id, 'one' as name

columns must be a non-empty list of existing column names, with exact case. Column names are quoted as identifiers. type defaults to btree; btree and hash are compatibility hints backed by Redis Search, not PostgreSQL storage methods. unique: false is accepted. UNIQUE, expression and partial indexes, other methods, and unknown options raise a compilation error.

The adapter emits CREATE INDEX IF NOT EXISTS with generated dbt_idx_… names. Names include the dbt invocation so a replacement table can build its indexes before the previous target is retired. Indexes follow the intermediate table's rename to the target, appear in pg_indexes / pg_index, and their SQL names are removed when the old table is dropped. A table rebuild applies the current configuration; an incremental model creates indexes on its initial build or --full-refresh, and keeps them on ordinary incremental runs. Use --full-refresh to change an incremental model's indexes. Views do not create indexes.

The driver normally indexes supported columns already; this config additionally registers SQL names and requests indexing for the listed columns. Dropping a named SQL index forgets its name but retains shared physical Search fields.

Use the latest stable driver release (currently v0.0.27). Its managed storage requires a fresh, isolated database when moving from older storage formats; existing storage is rejected without modification. Rebuild models and reload sources into the new database; there is no automatic storage migration. See the driver snapshot guide.

Issue #38 validation records the tested revisions and actual native ADBC run results.

Driver table modes

The driver has three table modes. Everything dbt builds is a managed table, the default. Live and unmanaged tables expose HASHes that your application owns, and can be dbt sources:

Mode HASH owner Index owner Schema What dbt can do with it
Managed Driver Driver Any Everything
Live Application Driver redis_live or a live schema Use it as a source for any model or snapshot (driver v0.0.33 or later)
Unmanaged Application Application redis_foreign, or the schema you adopt into Use it as a source for any model or snapshot

Enable the modes in the profile's driver_options:

      driver_options:
        adbc.redis.live_tables: true
        # The driver requires the mode before foreign_indexes is enabled.
        adbc.redis.foreign_indexes_mode: unmanaged
        adbc.redis.foreign_indexes: true

Then declare the tables as sources:

sources:
  - name: app
    schema: redis_live
    tables:
      - name: users          # a registered live collection
  - name: shop
    schema: redis_foreign
    tables:
      - name: orders_idx     # the application's Search index, by its exact name

Register live collections with the driver's redis-adbc live register or SQL CREATE TABLE in redis_live (live guide). With foreign_indexes, every application Search index on HASHes appears in redis_foreign. The driver registers these when a connection opens, so create the index before running dbt. redis-adbc adopt -mode unmanaged registers a collection under a table name and schema of your choice (unmanaged guide).

Limitations:

  • Driver v0.0.32 and earlier refuse every managed write that reads a live table, including CREATE VIEW, with managed writes cannot access live tables. With them, only plain SELECTs, such as tests and dbt show, can read a live source.
  • Don't build models into a live schema. The driver refuses views there. From v0.0.33 a table rebuilds, but dbt drops the previous copy with DROP TABLE, which only unregisters a live table. Every rebuild leaves the old rows' HASHes in Redis.
  • Reads are not point-in-time. Live and unmanaged reads return the application's current values, so a model or test can see changes made while it runs. A view over a live table reads the live rows at each query. Managed targets are still published atomically.
  • Search indexes writes asynchronously. A build that starts right after an application write may not see that row yet.
  • Flight SQL: set these options on the Flight server, not in the client profile. This combination is untested.

test_driver_table_modes.py builds a view, a table, a merge incremental model and a snapshot over a live source and over a foreign-index unmanaged source. It passed with driver v0.0.33 on the three-shard Redis Software test cluster (redislabs/redis:8.2.0-78.18). Live tables need driver v0.0.30 or later, and models over them v0.0.33 or later. Native dbt v2 passes the same scalar driver_options, but hasn't been tested with these modes.

Features and limitations

  • Tables, views, native SQL materialized views, ephemeral models, Arrow bulk-loaded seeds, and snapshots
  • SQL incremental models with append, delete+insert, merge, and microbatch
  • Model contracts, persisted relation and column descriptions, and Python table models
  • Live and unmanaged driver tables as sources; see Driver table modes
  • No SQL transactions or rollback: statements autocommit, and interrupted writes may need cleanup or a rerun
  • Native SQL statements and in-memory Arrow tables retry a refused snapshot catalog publication up to nineteen times with backoff. Scripts execute one statement at a time so committed statements are not replayed. Arrow record batch readers are captured once in a temporary disk file to supply fresh input on retry. Bound SQL input, unknown stream types, and unknown publication outcomes are not automatically replayed. Flight SQL retries only the server's explicit refused-publication error, with its status, vendor code, and SQLSTATE marker; generic transport failures are not replayed.
  • Native SELECT grants can opt into dedicated Redis Software ACLs; see SQL grants.
  • Python models run in the dbt process and load their inputs into its memory; incremental Python models support append, delete+insert and merge through Arrow staging

Python models may set materialized='incremental' and use dbt.is_incremental to filter their Arrow input. Supported strategies are append, delete+insert and merge; merge requires unique_key. The default uses delete+insert with a key and append otherwise. Python executes once into a permanent intermediate relation, then native SQL applies the rows. Full refresh builds a replacement first. Standard schema-change options, hooks, docs, grants and initial/full-refresh indexes are preserved. Python microbatch and enforced incremental contracts are rejected. Every statement autocommits; arbitrary Python/session side effects are not rolled back or automatically replayed. dbt.ref() still loads its result into the dbt process's memory.

The single-relation catalog API is implemented, and clone state/self-target checks use the view fallback without advertising native zero-copy cloning. See the coverage and validation record.

Materialized-view reruns refresh the stored query; SQL definition changes require --full-refresh. Nonunique indexes and on_configuration_change are supported; UNIQUE indexes are rejected. The SQL requires driver v0.0.20+, with the lifecycle validated on v0.0.27. Driver v0.0.23+ rejects earlier storage catalogs; use a fresh isolated driver database or a supported import path when upgrading. Refresh and rename swaps autocommit and do not promise PostgreSQL transaction or uninterrupted concurrent-reader semantics. Index columns containing spaces require driver source commit 41d468d or later; released v0.0.27 rejects them (driver #449). See the materialized-view guide.

See the adapter reference for all profile options, supported features, and limitations. The example project and functional tests demonstrate the adapter with NYC taxi data.

Metadata

Release files for dbt-redis-adbc 0.0.34

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dbt-redis-adbc 0.0.34
File Size Uploaded Provenance Actions
dbt_redis_adbc-0.0.34.tar.gz 55.3 kB With provenance Details for dbt_redis_adbc-0.0.34.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dbt-redis-adbc 0.0.34
File Interpreter ABI Platform Actions
dbt_redis_adbc-0.0.34-py3-none-any.whl Python 3 none any Details for dbt_redis_adbc-0.0.34-py3-none-any.whl

Total release size: 88.7 kB

Release files / dbt_redis_adbc-0.0.34.tar.gz

Download URL dbt_redis_adbc-0.0.34.tar.gz
Size 55.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7f62950fa8e8016f0e513d43d833e87a2b3a961949fee41d3ce9415f0d7d554f
BLAKE2b-256 checksum
How to use checksums
fdc34e0d07c0be12b5f9741981e52e23f27d06f0a61332dc268e372c0bd7d4ea
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 5, 2026.

Transparency log

Release files / dbt_redis_adbc-0.0.34-py3-none-any.whl

Download URL dbt_redis_adbc-0.0.34-py3-none-any.whl
Size 33.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4485f83cbdfa8034798bbfca7103416916bae765316886c7f9739c857b25901b
BLAKE2b-256 checksum
How to use checksums
dc9e827d409f0abd8286e7b34801b7c094af06af6029a7117f76245d80e119b5
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 5, 2026.

Transparency log

Security for dbt-redis-adbc 0.0.34

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.

Select from 2 files

Attestation for dbt_redis_adbc-0.0.34.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 5, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page