id = "dbt" name = "dbt Core" homepage = "https://www.getdbt.com" description = "dbt enables data analysts and engineers to transform their data using the same practices that software engineers use to build applications." icon = "theSVG:dbt" executables = ["dbt"] [dotfiles] # https://docs.getdbt.com/docs/core/connect-data-platform/connection-profiles # — "profiles.yml lives in the ~/.dbt/ directory by default", one file shared # by every project on the machine ($DBT_PROFILES_DIR overrides it). paths = ["~/.dbt/profiles.yml"] # ~/.dbt/.user.yml is the anonymous id dbt sends with usage stats. It # identifies this installation, not the user's configuration: # https://docs.getdbt.com/reference/global-configs/usage-stats exclude = ["~/.dbt/.user.yml"] # profiles.yml is not a whole-file secret: targets, schemas, warehouses, # thread counts and the target selection are exactly what a second machine # needs. The credentials are lifted out below. secret = [] # Read at the start of each invocation; the process exits with the run. side_effect = false # The warehouse credentials, taken from the adapter setup pages: password # (Postgres, Redshift, Snowflake), private_key and private_key_passphrase # (Snowflake key-pair auth) and token (Databricks, Snowflake SSO). # https://docs.getdbt.com/docs/core/connect-data-platform/snowflake-setup [[dotfiles.secret_paths]] file = "~/.dbt/profiles.yml" match = { key_path = ["*.outputs.*.password", "*.outputs.*.private_key", "*.outputs.*.private_key_passphrase", "*.outputs.*.token"] } # BigQuery's service-account keyfile is an absolute path to a JSON key sitting # on this disk — the setup page's own example is a path under # /Users/youruser/Downloads. The file it points at does not travel, so the # line pointing at it must not either — but where this machine keeps its # service-account key is something the user has to put back after a rebuild, # so it is kept: backup. # https://docs.getdbt.com/docs/core/connect-data-platform/bigquery-setup [[dotfiles.machine_lines]] file = "~/.dbt/profiles.yml" match = { key_path = ["*.outputs.*.keyfile"] } scope = "backup" [commands] format = 1 label = "dbt commands" description = "Run, test and build a dbt project. Other subcommands (init, docs, seed, snapshot...) are left out." quality = "ai-draft" base = "fig:dbt" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/dbt.ts" license = "MIT" [[commands.subcommand]] path = ["run"] label = "Run models" description = "Runs the models in the project." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/dbt.ts" license = "MIT" [[commands.subcommand.field]] id = "profiles_dir" label = "Profiles directory" type = "path" option = ["--profiles-dir"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "profile" label = "Profile" type = "string" option = ["--profile"] sources = ["fig"] [[commands.subcommand.field]] id = "target" label = "Target" type = "string" option = ["--target"] suggestions = [{ value = "dev", label = "dev" }, { value = "prod", label = "prod" }] sources = ["fig"] [[commands.subcommand.field]] id = "select" label = "Select" description = "Selection expression, e.g. tag:nightly or my_model+." type = "string" option = ["--select", "-s"] sources = ["fig"] [[commands.subcommand.field]] id = "exclude" label = "Exclude" type = "string" option = ["--exclude"] sources = ["fig"] [[commands.subcommand.field]] id = "threads" label = "Threads" type = "integer" option = ["--threads"] sources = ["fig"] [[commands.subcommand.field]] id = "vars" label = "Variables" description = "YAML string overriding dbt_project.yml variables." type = "string" option = ["--vars"] sources = ["fig"] [[commands.subcommand.field]] id = "fail_fast" label = "Stop at first failure" type = "boolean" option = ["--fail-fast", "-x"] sources = ["fig"] [[commands.subcommand.field]] id = "full_refresh" label = "Full refresh incrementals" type = "boolean" option = ["--full-refresh"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.task]] id = "run" label = "Run selected models" fields = ["select", "exclude", "target"] required = [] [[commands.subcommand.task]] id = "ff" label = "Fail fast" set = { fail_fast = [true] } fields = ["select", "fail_fast"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target", "select", "exclude", "fail_fast", "full_refresh"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["profiles_dir", "profile", "vars", "threads"] [[commands.subcommand]] path = ["test"] label = "Run tests" description = "Executes tests defined in the project." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/dbt.ts" license = "MIT" [[commands.subcommand.field]] id = "profiles_dir" label = "Profiles directory" type = "path" option = ["--profiles-dir"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "profile" label = "Profile" type = "string" option = ["--profile"] sources = ["fig"] [[commands.subcommand.field]] id = "select" label = "Select" description = "Selection expression, e.g. tag:nightly or my_model+." type = "string" option = ["--select", "-s"] sources = ["fig"] [[commands.subcommand.field]] id = "exclude" label = "Exclude" type = "string" option = ["--exclude"] sources = ["fig"] [[commands.subcommand.field]] id = "fail_fast" label = "Stop at first failure" type = "boolean" option = ["--fail-fast", "-x"] sources = ["fig"] [[commands.subcommand.task]] id = "test" label = "Test selected models" fields = ["select", "exclude"] required = [] [[commands.subcommand.task]] id = "ff" label = "Fail fast" set = { fail_fast = [true] } fields = ["select", "fail_fast"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["select", "exclude", "fail_fast"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["profiles_dir", "profile"] [[commands.subcommand]] path = ["build"] label = "Build everything" description = "Runs models, tests, snapshots and seeds in DAG order." [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/dbt.ts" license = "MIT" [[commands.subcommand.field]] id = "profiles_dir" label = "Profiles directory" type = "path" option = ["--profiles-dir"] path = { kind = "directory", role = "input" } sources = ["fig"] [[commands.subcommand.field]] id = "profile" label = "Profile" type = "string" option = ["--profile"] sources = ["fig"] [[commands.subcommand.field]] id = "target" label = "Target" type = "string" option = ["--target"] suggestions = [{ value = "dev", label = "dev" }, { value = "prod", label = "prod" }] sources = ["fig"] [[commands.subcommand.field]] id = "select" label = "Select" description = "Selection expression, e.g. tag:nightly or my_model+." type = "string" option = ["--select", "-s"] sources = ["fig"] [[commands.subcommand.field]] id = "exclude" label = "Exclude" type = "string" option = ["--exclude"] sources = ["fig"] [[commands.subcommand.field]] id = "threads" label = "Threads" type = "integer" option = ["--threads"] sources = ["fig"] [[commands.subcommand.field]] id = "vars" label = "Variables" description = "YAML string overriding dbt_project.yml variables." type = "string" option = ["--vars"] sources = ["fig"] [[commands.subcommand.field]] id = "fail_fast" label = "Stop at first failure" type = "boolean" option = ["--fail-fast", "-x"] sources = ["fig"] [[commands.subcommand.field]] id = "full_refresh" label = "Full refresh incrementals" type = "boolean" option = ["--full-refresh"] effect = "overwrite" sources = ["fig"] [[commands.subcommand.task]] id = "build" label = "Build selected nodes" fields = ["select", "exclude", "target"] required = [] [[commands.subcommand.task]] id = "ff" label = "Fail fast" set = { fail_fast = [true] } fields = ["select", "fail_fast"] required = [] [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["target", "select", "exclude", "fail_fast", "full_refresh"] [[commands.subcommand.group]] id = "advanced" label = "Advanced" fields = ["profiles_dir", "profile", "vars", "threads"]