dbt Project

Description

This metadata type registers a dbt Core project in your Hop project: where it lives on disk, how its profiles are resolved, which target it uses by default and which dbt executable runs it.

It is referenced by name from the dbt workflow action, in the same way a relational database connection is: define it once, use it from as many actions as you like, and change the location or the runtime in one place.

Every field supports variables, so the same metadata object can point at a different checkout or a different dbt installation per environment.

Options

Option Description

Name

The name of this dbt project. This is the name the dbt actions refer to.

Project directory

The directory holding dbt_project.yml. dbt runs with this as its working directory and receives it as --project-dir.

Profiles directory

The directory holding profiles.yml, passed to dbt as --profiles-dir. Left empty, dbt looks in its own default location (~/.dbt).

Default target

The dbt target used when a dbt action does not name one of its own.

dbt executable

The dbt command to run, as a name on the PATH or an absolute path. Defaults to dbt. Point it at a virtual environment (/opt/dbt-venv/bin/dbt) or at a wrapper script when dbt runs in a container.

dbt-ol executable

The command used instead of dbt executable when a dbt action has Emit OpenLineage enabled. Defaults to dbt-ol, the wrapper from the openlineage-dbt package.

Test

The Test button runs dbt debug against the project with the settings above, and shows dbt’s output. It checks the same things dbt checks on the command line: that the executable can be started, that dbt_project.yml and profiles.yml are found and parse, and that the warehouse connection for the target works.

Credentials are configured on the dbt action rather than here, so a profile that reads its password from env_var() will report a connection failure in this test while running correctly from a workflow.