dbt-dry-run (BigQuery Only)

dbt-dry-run (autotraderuk variant)

The dbt-dry-run utility dbt-dry-run is a meltano plugin based on the awesome tool created by the team at AutoTraderUk. It allows dbt-bigquery users to validate if their models will run (without encuring costs). It leverages bigquery's dry-run feature. A note This plugin is at it's most powerful (in our opinion) in CI (we use github actions). It allows us to ensure that our changes will not break production.

EDK Based Plugin

This utility is based on the Meltano Extension Developer Kit (EDK) which is the preferred way to build and add non-Singer plugins to Meltano Hub. For more information about the EDK, please read this section of the Meltano docs. If you have any feedback or suggestions, add them to the EDK repo.

Getting Started

Prerequisites

If you haven't already, follow the initial steps of the Getting Started guide:

  1. Install Meltano
  2. Create your Meltano project

Installation and configuration

  1. Add the dbt-dry-run utility to your project using
    meltano add
    :
  2. meltano add utility dbt-dry-run
  3. Configure the dbt-dry-run settings using
    meltano config
    :
  4. meltano config dbt-dry-run set --interactive

Next steps

To run this plugin for the first time, simply specify you DBT_BIGQUERY_PROFILES_DIR, DBT_BIGQUERY_PROJECT_DIR and DBT_DRY_RUN_TARGET. You will also need to compile your dbt models using the command dbt-bigquery compile.

To run your plugin, you will need to define a target as well. We propose to easily to this by creating this custom command:

commands:
run:
  args:
    --target ${DBT_DRY_RUN_TARGET}
    --verbose
  definition: |
    Allows you to run the plugin. Requires that you specify a profile target.
    Note - Requires you run `dbt-bigquery compile` before executing.
  executable: dbt_dry_run_invoker
  ``` which will allow you to run the plugin at the specified target profile.


Once this is done, simply run `dbt-dry-run:run` and watch the magic happen!

If you run into any issues, learn how to get help.

Capabilities

This plugin currently has no capabilities defined. If you know the capabilities required by this plugin, please contribute!

Settings

The dbt-dry-run settings that are known to Meltano are documented below. To quickly find the setting you're looking for, click on any setting name from the list:

You can also list these settings using

meltano config
with the list subcommand:

meltano config dbt-dry-run list

You can override these settings or specify additional ones in your meltano.yml by adding the settings key.

Please consider adding any settings you have defined locally to this definition on MeltanoHub by making a pull request to the YAML file that defines the settings for this plugin.

(project-dir)

  • Environment variable: DBT_DRY_RUN_PROJECT-DIR
  • Default Value: ${MELTANO_PROJECT_ROOT}/transform/

Location of the directory hosting your dbt_project.yml file.


Configure this setting directly using the following Meltano command:

meltano config dbt-dry-run set project-dir [value]

(profiles-dir)

  • Environment variable: DBT_DRY_RUN_PROFILES-DIR
  • Default Value: ${MELTANO_PROJECT_ROOT}/transform/profiles/bigquery/

Location of the directory hosting your profiles.yml file.


Configure this setting directly using the following Meltano command:

meltano config dbt-dry-run set profiles-dir [value]

(target)

  • Environment variable: DBT_DRY_RUN_TARGET

Target profile in DBT.


Configure this setting directly using the following Meltano command:

meltano config dbt-dry-run set target [value]

Something missing?

This page is generated from a YAML file that you can contribute changes to.

Edit it on GitHub!

Looking for help?

If you're having trouble getting the dbt-dry-run utility to work, look for an existing issue in its repository, file a new issue, or join the Meltano Slack community and ask for help in the
#plugins-general
channel.

Install

meltano add utility dbt-dry-run

Maintenance Status

  • Maintenance Status

Repo

https://github.com/autotraderuk/dbt-dry-run
  • Stars
  • Forks
  • Last Commit Date
  • Open Issues
  • Open PRs
  • Contributors
  • License

EDK Extension Repo

https://github.com/potloc/dbt-dry-run-ext

Maintainer

  • Auto Trader

Meltano Stats

  • Total Executions (Last 3 Months)
  • Projects (Last 3 Months)

Keywords

  • dbtbigquerytestingcontinuous-integrationsmeltano_edk