The dbt transformer is a plugin for running SQL-based transformations on data stored in your warehouse.
Getting Started
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the dbt transformer to your
project using
:meltano add
-
Configure the dbt
settings using
:meltano config
meltano add transformer dbt
meltano config dbt set --interactive
Next steps
Follow the remaining steps of the Getting Started guide:
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
Settings for dbt itself can be configured through dbt_project.yml as usual, which can be found at transform/dbt_project.yml in your Meltano project.
The
dbt
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
with the meltano config
list
subcommand:
meltano config dbt 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 Directory (project_dir)
-
Environment variable:
DBT_PROJECT_DIR
-
Default Value:
$MELTANO_PROJECT_ROOT/transform
Configure this setting directly using the following Meltano command:
meltano config dbt set project_dir [value]
Profiles Directory (profiles_dir)
-
Environment variable:
DBT_PROFILES_DIR
-
Default Value:
$MELTANO_PROJECT_ROOT/transform/profile
Configure this setting directly using the following Meltano command:
meltano config dbt set profiles_dir [value]
Target (target)
-
Environment variable:
DBT_TARGET
-
Default Value:
$MELTANO_LOAD__DIALECT
Configure this setting directly using the following Meltano command:
meltano config dbt set target [value]
Source Schema (source_schema)
-
Environment variable:
DBT_SOURCE_SCHEMA
-
Default Value:
$MELTANO_LOAD__TARGET_SCHEMA
Configure this setting directly using the following Meltano command:
meltano config dbt set source_schema [value]
Target Schema (target_schema)
-
Environment variable:
DBT_TARGET_SCHEMA
-
Default Value:
analytics
Configure this setting directly using the following Meltano command:
meltano config dbt set target_schema [value]
Models (models)
-
Environment variable:
DBT_MODELS
-
Default Value:
$MELTANO_TRANSFORM__PACKAGE_NAME $MELTANO_EXTRACTOR_NAMESPACE my_meltano_project
Configure this setting directly using the following Meltano command:
meltano config dbt set models [value]
Commands
The dbt transformer supports the following commands that can be used withmeltano invoke
:build
-
Equivalent to:
build
Will run your models, tests, snapshots and seeds in DAG order.
meltano invoke dbt:build [args...]
clean
-
Equivalent to:
clean
Delete all folders in the clean-targets list (usually the dbt_modules and target directories.)
meltano invoke dbt:clean [args...]
compile
-
Equivalent to:
compile --models $DBT_MODELS
Generates executable SQL from source model, test, and analysis files. Compiled SQL files are written to the target/ directory.
meltano invoke dbt:compile [args...]
debug
-
Equivalent to:
debug
Debug your DBT project and warehouse connection.
meltano invoke dbt:debug [args...]
deps
-
Equivalent to:
deps
Pull the most recent version of the dependencies listed in packages.yml
meltano invoke dbt:deps [args...]
docs-generate
-
Equivalent to:
docs generate
Generate documentation for your project.
meltano invoke dbt:docs-generate [args...]
docs-serve
-
Equivalent to:
docs serve
Serve documentation for your project. Make sure you ran `docs-generate` first.
meltano invoke dbt:docs-serve [args...]
freshness
-
Equivalent to:
source freshness
Check the freshness of your source data.
meltano invoke dbt:freshness [args...]
run
-
Equivalent to:
run --models $DBT_MODELS
Compile SQL and execute against the current target database.
meltano invoke dbt:run [args...]
seed
-
Equivalent to:
seed
Load data from csv files into your data warehouse.
meltano invoke dbt:seed [args...]
snapshot
-
Equivalent to:
snapshot
Execute snapshots defined in your project.
meltano invoke dbt:snapshot [args...]
test
-
Equivalent to:
test
Runs tests on data in deployed models.
meltano invoke dbt:test [args...]
Something missing?
This page is generated from a YAML file that you can contribute changes to.
Edit it on GitHub!Looking for help?
#plugins-general
channel.