Files
iris-context/commands/runner/dbt.go
VERSE ebde9ba68f refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec
handling core logic so people won't be confused by the core logic inside
the commands folder (cleaner I guess)
- Regen docs
2026-07-05 11:27:30 +07:00

83 lines
5.1 KiB
Go

package runner
import (
"github.com/versenilvis/iris/spec"
)
func init() {
spec.Register(&spec.Spec{
Name: "dbt",
Description: "CLI for dbt - Data Build Tool",
Subcommands: []spec.Subcommand{
{Name: "build", Description: "Run models, test tests, snapshot snapshots, and seed seeds"},
{Name: "directory", Description: "Directory containing profiles.yml"},
{Name: "name", Description: "Name of profile to use when running dbt project"},
{Name: "profile", Description: "Target profile configuration (dev/prod)"},
{Name: "variables", Description: "A short YAML string eg. '{my_variable: my_value}'"},
{Name: "subset", Description: "Select subset of models"},
{Name: "run", Description: "Runs the models in a project"},
{Name: "Target profile", Description: "Target profile configuration (dev/prod)"},
{Name: "debug", Description: "Debugs dbt connections and projects"},
{Name: "init", Description: "Initializes a new dbt project"},
{Name: "adapter", Description: "E.g. big query"},
{Name: "compile", Description: "Compiles (but does not run) the models in a project"},
{Name: "Variable values", Description: "A short YAML string eg. '{my_variable: my_value}'"},
{Name: "Select subset", Description: "Select subset of models"},
{Name: "Exclude subset", Description: "Exclude subset of models"},
{Name: "test", Description: "Executes tests defined in a project"},
{Name: "deps", Description: "Downloads dependencies for a project"},
{Name: "snapshot", Description: "Executes 'snapshot' jobs defined in a project"},
{Name: "profiles directory", Description: "Directory containing profiles.yml"},
{Name: "Profile name", Description: "Name of profile to use when running dbt project"},
{Name: "clean", Description: "Deletes artifacts present in the dbt project"},
{Name: "seed", Description: "Loads CSV files into the database"},
{Name: "docs", Description: "Generates documentation for a project"},
{Name: "generate", Description: "Generate your project's documentation website"},
{Name: "serve", Description: "Serve your documentation on a local webserver (default prot 8000)"},
{Name: "PROFILES_DIR", Description: "Path to profiles directory"},
{Name: "port number", Description: "Default is 8000"},
{Name: "run-operation", Description: "Runs arbitrary maintenance SQL against the database"},
{Name: "MACRO", Description: "Dbt will call this macro with the supplied arguments and then exit"},
{Name: "ARGS", Description: "A short YAML string eg. '{my_variable: my_value}'"},
{Name: "rpc", Description: "Runs an RPC server that clients can submit queries to"},
{Name: "HOST", Description: "Default: 0.0.0.0"},
{Name: "PORT", Description: "Default: 8580"},
{Name: "ls", Description: "Lists resources defined in a dbt project"},
{Name: "parse", Description: "Parse dbt project and write detailed timing information"},
},
Options: []spec.Option{
{Name: "--full-refresh", Description: "Treat incremental models as table models"},
{Name: "-x", Description: "Exit immediately if a single model fails to build"},
{Name: "--profiles-dir", Description: "Set the profiles directory"},
{Name: "--profile", Description: "Use the selected profile"},
{Name: "--target", Description: "Target profile configuration i.e. prod/dev"},
{Name: "--vars", Description: "Variable values to override dbt_project.yml"},
{Name: "--threads", Description: "Number of concurrent database jobs"},
{Name: "-s", Description: "Select subset of models"},
{Name: "--exclude", Description: "Exclude subset of models"},
{Name: "--bypass-cache", Description: "Bypass the cache"},
{Name: "--use-colors", Description: "Default value -- colorize run logs"},
{Name: "--no-use-colors", Description: "Disable log colorizing"},
{Name: "--adapter", Description: "Add an adapter"},
{Name: "--select", Description: "Select subset of models"},
{Name: "--selector", Description: "Defer"},
{Name: "--data", Description: "Run only custom data tests"},
{Name: "--schema", Description: "Run only schema tests"},
{Name: "--no-compile", Description: "Skip re-compilation"},
{Name: "--port", Description: "Choose a port"},
{Name: "-o", Description: "Override the destination for sources.json"},
{Name: "--args", Description: "Supply arguments to the macro"},
{Name: "--host", Description: "Specify the host to listen on"},
{Name: "--resource-type", Description: "Specify selectors that should be excluded from the list of returned nodes"},
{Name: "--version", Description: "Currently installed version"},
{Name: "-r", Description: "Create a new file to record timing info"},
{Name: "-d", Description: "Redirect debug logs to standard out"},
{Name: "--log-format", Description: "Specify how dbt's logs should be formatted"},
{Name: "--no-write-json", Description: "Prevent dbt from writing JSOn artifacts to the 'target/' directory"},
{Name: "-S", Description: "Convert dbt warnings into errors"},
{Name: "--partial-parse", Description: "Configure partial parsing for your project"},
{Name: "--no-partial-parse", Description: "Turn off partial parsing for your project"},
},
})
}