The dbt-osmosis utility is a tool to supercharge dbt development primarily by providing automated YAML management
Getting Started
Prerequisites
If you haven't already, follow the initial steps of the Getting Started guide:
Installation and configuration
-
Add the dbt-osmosis utility to your
project using
:meltano add
-
Configure the dbt-osmosis
settings using
:meltano config
meltano add utility dbt-osmosis
meltano config dbt-osmosis set --interactive
Next steps
Add
dbt-<adapter>
to your pip_url, ie:pip_url: dbt-osmosis dbt-bigquery
Override the namespace to mirror your dbt adapter, ie:
namespace: dbt_bigquery
Mirror the configuration set in your
dbt-<adapter>
plugin. A simple copy-paste of theconfig:
block should be sufficient.Ensure you additionally add
adapter: ...
to your dbt-osmosis config for the built in commands to work. ie for Bigquery,adapter: bigquery
Because of the modified
pip_url
, you should copy the commands from the hub to your local plugin definition for convenience https://github.com/meltano/hub/blob/main/_data/meltano/utilities/dbt-osmosis/z3z1ma.yml
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-osmosis
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-osmosis 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.
(adapter)
-
Environment variable:
DBT_OSMOSIS_ADAPTER
This should be set to the adapter you have installed as meltano will install
dbt and its profile directory into transform/<adapter>
directory. We use this
config option to resolve dbt profile directory.
Configure this setting directly using the following Meltano command:
meltano config dbt-osmosis set adapter [value]
Commands
The dbt-osmosis utility supports the following commands that can be used withmeltano invoke
:document
-
Equivalent to:
yaml document --project-dir ${MELTANO_PROJECT_ROOT}/transform --profiles-dir ${MELTANO_PROJECT_ROOT}/transform/profiles/${ADAPTER}
Inherit documentation from parent models to child models cascadingly
meltano invoke dbt-osmosis:document [args...]
organize
-
Equivalent to:
yaml organize --project-dir ${MELTANO_PROJECT_ROOT}/transform --profiles-dir ${MELTANO_PROJECT_ROOT}/transform/profiles/${ADAPTER}
Organizes all dbt schema yaml files based on declarative rules in the dbt_project.yml, create yaml files as needed
meltano invoke dbt-osmosis:organize [args...]
refactor
-
Equivalent to:
yaml refactor --project-dir ${MELTANO_PROJECT_ROOT}/transform --profiles-dir ${MELTANO_PROJECT_ROOT}/transform/profiles/${ADAPTER}
Organizes all dbt schema yaml files AND cascadingly inherits documentation from parent models to child models, create yaml files as needed
meltano invoke dbt-osmosis:refactor [args...]
workbench
-
Equivalent to:
workbench --project-dir ${MELTANO_PROJECT_ROOT}/transform --profiles-dir ${MELTANO_PROJECT_ROOT}/transform/profiles/${ADAPTER}
Start an interactive dbt workbench. Copy and paste model code into the workbench or author a model from scratch. The workbench allows you to write dbt with instant compile-as-you-type functionality. Spin it up or tear it down as needed.
meltano invoke dbt-osmosis:workbench [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.