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 project

  • profiles_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 documentationarrow-up-right. If your profile has only one target, then this does not need to be specified.

# profile.yml

<profile name here>: # change this!
  adapters:
    <dbt adapter name here>: # change this!
      type: dbt
      project_dir:
      profiles_dir:
      profiles_target:

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()

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.

circle-exclamation

Last updated