SQLAlchemy Plugin usage #286
Replies: 1 comment 1 reply
-
Hey Dan, thanks for trying this out! Happy to help here. Plugins are mostly used for handling "special" sources in your dbt projects, which is any sort of data that requires you to execute some Python code in order to turn the source definition into something that DuckDB knows how to consume, which is usually a data frame. In the case of the SQLAlchemy plugin, you can configure sources in a YAML file like this example from the plugin tests:
Here, we reference the plugin named Once this configuration is in place, you can refer to the tables in the source in your dbt models via the macro If you ever need a hand, I hang out in the #db-duckdb channel in the dbt Slack and the #dbt channel in the DuckDB discord. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the excellent project!
I'm a total n00b to dbt and a bit lost, I got the basic setup working locally. I'm now trying to use SQLAlchemy as a plugin. I'm a bit confused about how I'm actually meant to use it.
my
profile.yml
looks like this:how would I then write SQL in my
models
to select from this? Is there some magic DuckDB query I execute, or do I need to configure dbt somehow to reference thesqla_db
?Beta Was this translation helpful? Give feedback.
All reactions