Build from DBT
DBT is a powerful tool to transform your data, and VulcanSQL supports queries from DBT models directly. If you used DBT to create some models, you can make API for them instantly.
Installation
We need to install an additional package to integrate with DBT:
Install package.
npm i @vulcan-sql/extension-dbt
Setup
vulcan.yaml
extensions:
dbt: '@vulcan-sql/extension-dbt' # add this line
dbt:
modelFiles:
- ./target/manifest.json # config the path to manifest.jsoninfoManifest is an artifact which built from DBT cli, it should locate at “./target/manifest.json”
infoWe are not able to share profiles with DBT yet, you need to config profiles for both VulcanSQL and DBT separately.
Using models in Vulcan
Using models of DBT is extremely easy, just use the following syntax for the table name.
{% dbt "model.<project-name>.<model-name>" %}
For example, to select all from model my_first_dbt_model
in the project demo
:
select * from {% dbt "model.demo.my_first_dbt_model" %}