DRDataRaft/ docs
GitHub ↗

dr_dbt_project()

Store paths and CLI settings without running dbt or opening a database. dbt remains responsible for SQL models, dependencies, tests and incremental strategies. Use dr_dbt_build() or dataraft.core::dr_run() to execute the project.

Usage

dr_dbt_project(
  path = "dbt",
  profiles_dir = NULL,
  target = NULL,
  executable = "dbt",
  lake = NULL,
  sources = NULL
)

Arguments

path
Character scalar giving the directory with dbt_project.yml. The directory is checked when executing, not when constructing the object.


profiles_dir
Character scalar pointing to a directory containing profiles.yml, or NULL to use dbt's own profile discovery.


target
Optional character scalar naming a target in the dbt profile.


executable
Character scalar giving a dbt executable name or path. It is passed to processx::run() without a shell.


lake
Optional connection-free dataraft.lake::dr_lake_config() for local DuckDB or DuckLake. At execution, dataraft writes a private profile for this catalog. Omit profiles_dir when using lake. SQL and handwritten project files stay unchanged. Close any caller-owned connections before running dbt.


sources
Optional named list of successful published lake results. They become the inputs source group. Use dr_dbt_sources() to add groups from other physical schemas. Definitions retain exact release IDs; registry resolution and YAML generation happen only at execution.

Value

A serializable dbt_project specification. It contains no database connection or resolved environment credentials.

Examples

project <- dr_dbt_project("analytics", profiles_dir = "analytics")
project

See also

dr_dbt_init(), dr_dbt_status(), dr_dbt_model()
Documentation source snapshot · View source at 3a9d744 ↗
Code examples are documented source examples; they are not executed in this website build.

Search documentation

Search functions, packages and guides.