Skip to content

feat(py): A dbt adapter for Feldera (not a Feldera adapter, but a dbt adapter, that is wrapping Feldera)#5950

Merged
mihaibudiu merged 75 commits intofeldera:mainfrom
mdrakiburrahman:dev/mdrrahman/dbt-feldera
Apr 16, 2026
Merged

feat(py): A dbt adapter for Feldera (not a Feldera adapter, but a dbt adapter, that is wrapping Feldera)#5950
mihaibudiu merged 75 commits intofeldera:mainfrom
mdrakiburrahman:dev/mdrrahman/dbt-feldera

Conversation

@mdrakiburrahman
Copy link
Copy Markdown
Contributor

@mdrakiburrahman mdrakiburrahman commented Mar 30, 2026

A new dbt adapter for Feldera.


Small demo

Demo walkthrough

Notes


Describe Manual Test Plan

Includes a dbt-adventureworks Integration test that runs both PyTest and dbt CLI with bash. Uses Feldera in docker.

There is a .scripts/run.sh all target that runs all targets of the new Python project locally, see the dbt-feldera/README.md:

image

Checklist

  • Unit tests added/updated
  • Integration tests added/updated
  • Documentation updated
  • Changelog updated

Breaking Changes?

Mark if you think the answer is yes for any of these components:

  • OpenAPI / REST HTTP API / feldera-types / manager (What is a breaking change?)
  • Feldera SQL (Syntax, Semantics)
  • feldera-sqllib (incl. dependencies fxp, etc.) (What is a breaking change?)
  • Python SDK (What is a breaking change?) (No, but this includes a new Python project adjacent to it)
  • fda (CLI arguments)
  • Adapters (including configuration)
  • Storage Format / Checkpoints
  • Others (specify): A new Python project and some additive devcontainer changes

Describe Incompatible Changes

N/A

Issue

Closes #5794

Comment thread .devcontainer/devcontainer.json
Comment thread .devcontainer/docker-compose.devcontainer.yml
Comment thread .github/workflows/publish-python.yml
Comment thread .github/workflows/test-dbt-feldera.yml Outdated
Comment thread python/dbt-feldera/dbt/adapters/feldera/__version__.py Outdated
Comment thread python/dbt-feldera/dbt/adapters/feldera/cursor.py Outdated
Comment thread python/dbt-feldera/README.md Outdated
Comment thread python/dbt-feldera/pyproject.toml
…w count. TODO: Assert IVM by adding more data to source, perhaps via Kafka
@blp blp self-requested a review March 30, 2026 15:28
@blp
Copy link
Copy Markdown
Member

blp commented Mar 30, 2026

I was going to review this but on first glance I don't understand it at all. Feldera adapters are written in Rust and go in the adapters crate. This is something else completely different written in Python and I don't see how it is a Feldera adapter at all.

@mdrakiburrahman
Copy link
Copy Markdown
Contributor Author

mdrakiburrahman commented Mar 30, 2026

Hey @blp,

This is not a Feldera adapter, this is a dbt adapter:

https://www.getdbt.com/

dbt is a super popular CLI tool used by Data Engineers/Analysts. The idea of building a dbt adapter is to increase Feldera adoption amongst laymans.

Here are some dbt adapters for other ETL/Database engines, they're all written in Python:

https://github.com/dbt-labs/dbt-adapters

I suppose whoever wrote the Python client for Feldera would be a more suitable reviewer, as this PR is using that client to bridge dbt to feldera.

@blp
Copy link
Copy Markdown
Member

blp commented Mar 30, 2026

Hey @blp,

This is not a Feldera adapter, this is a dbt adapter:

https://www.getdbt.com/

OK. I will remove myself from the reviewers list, because I am not the right person to look at this.

@blp blp removed their request for review March 30, 2026 17:39
@lalithsuresh
Copy link
Copy Markdown
Contributor

@mdrakiburrahman Mihai should definitely look at this, but is traveling so might be slow to reply. In the meantime, tagging in @snkas who understands the python API well.

@mdrakiburrahman
Copy link
Copy Markdown
Contributor Author

mdrakiburrahman commented Mar 30, 2026

@lalithsuresh - no rush! I still have a few TODOs to get this PR merge worthy, but I'm curious to get feedback on how I'm bridging the SQL to REST API ~~(currently it's janky RegEx 🙃) - I'm changing to sqlglot - it's a zero-dep Python based SQL Parser (it's awesome, similar to Calcite)

@gz
Copy link
Copy Markdown
Contributor

gz commented Mar 30, 2026

also @abhizer

@gz gz requested a review from abhizer March 30, 2026 19:47
@mihaibudiu
Copy link
Copy Markdown
Contributor

When you are done with your rework please request another review.

@mdrakiburrahman
Copy link
Copy Markdown
Contributor Author

Hey @mihaibudiu,

I think I got em all! Apologies if I missed any, please take a look at the latest iteration.

Copy link
Copy Markdown
Contributor

@mihaibudiu mihaibudiu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have approved, although there are still a couple of minor issues.
I will try to play with this stuff; for now I have only read the code.

Comment thread python/dbt-feldera/dbt/adapters/feldera/pipeline_manager.py
Comment thread python/dbt-feldera/dbt/adapters/feldera/pipeline_manager.py
Comment thread python/dbt-feldera/dbt/adapters/feldera/sqlglot_parser.py
Comment thread python/dbt-feldera/dbt/include/feldera/macros/materializations/view.sql Outdated
Comment thread python/dbt-feldera/dbt/include/feldera/macros/utils.sql Outdated
Comment thread python/dbt-feldera/integration_tests/dbt-adventureworks/macros/surrogate_key.sql Outdated
Comment thread python/dbt-feldera/integration_tests/docker_manager.py
Comment thread python/dbt-feldera/integration_tests/test_dbt_feldera.py
Comment thread python/dbt-feldera/integration_tests/test_dbt_feldera.py
@mdrakiburrahman
Copy link
Copy Markdown
Contributor Author

Hey @gz, @mihaibudiu -

Would you have permissions to merge?

@mihaibudiu
Copy link
Copy Markdown
Contributor

Since this has been around for a while, I assume everyone who wanted to comment has commented, so I will put this in the merge queue.

@mihaibudiu mihaibudiu enabled auto-merge April 16, 2026 02:21
@mihaibudiu mihaibudiu added this pull request to the merge queue Apr 16, 2026
Merged via the queue into feldera:main with commit 05dd37f Apr 16, 2026
1 check passed
@mdrakiburrahman mdrakiburrahman deleted the dev/mdrrahman/dbt-feldera branch April 16, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create a dbt connector for Feldera

8 participants