dbt
Configuration
prism enables users to build analytics on top of dbt projects. The configurations for a dbt connection are:
project_dir:
the directory to your dbt projectprofiles_dir
: the directory to your dbt profile. If one isn't specified, then prism assumes the default dbt profile directory~/.dbt
profiles_target
: the profile target you wish to use. More information can be found in the dbt documentation. If your profile has only one target, then this does not need to be specified.
Under the hood, prism interacts with the dbt architecture to create the project, compile the manifest, getting the target and SQL adapter, and executing the query.
hooks.dbt_ref()
hooks.dbt_ref()
Once connected to a dbt project, users can access dbt models using the hooks.dbt_ref
function. This function behaves exactly as the ref
function does in dbt. It takes as input a model from your dbt project or a package model and returns it as a pandas DataFrame.
Warning: hooks.dbt_ref
does NOT materialize your models for you! You'll need to materialize them yourselve (e.g., with dbt run
) before using Prism's hooks.