dbt

The Alvin DBT integration allows Alvin to extract runtime metadata about DBT Models, Runs and Jobs connected to each run.

Setup Alvin DBT integration

1. Setup the Alvin API Key

Get hold of a valid API key. Follow this guide to find out how to generate an API key.

2. Install PyPI package

The Alvin CLI allows users to extract runtime metadata about DBT Models, Runs and Jobs connected to each run, to install it in your environment all you need is to run the following command: pip install alvin-simple-cliThe latest version of the alvin-simple-cli package can be found here.

3. Setup the Alvin CLI

If using an Orchestration Environment such as GitHub

If you are running the Alvin CLI in an orchestration environment such as GitHub, you may skip the setup command and just set the API_KEY through an environment variable named ALVIN_API_TOKEN.


  • Run alvin setup command to set your environment.

  • alvin_api_token(Generated from the UI at step number 1)

4. Execute alvin dbt process-artifacts command

After you run a DBT command such as:

  • run

  • test

  • seed

  • build

You may send the dbt artifacts to Alvin by running:alvin dbt process-artifacts--dw-platform-id {alvin_dw_platform_id} \--platform-id {alvin_dbt_platform_id} \--artifacts-path /dbt/demo/target \--project-name {your_dbt_project_name} \--user-email {any_arbitrary_email_string}List of parameters:

  • dw-platform-id value of your data warehouse platform set in Alvin that can be fetched from this Alvin UI link.

  • platform-id value used to store the dbt platform metadata, can be a string that matches the following regex pattern: ^[a-z][a-z0-9_]*.

  • artifacts-path relative or absolute directory where the dbt target is created.

  • project-name any arbitrary string that you can use to group your dbt results.

  • user-email email that you want to associate this dbt execution with.

Last updated