DBT Command - ghdrako/doc_snipets GitHub Wiki

12 11 * * * cd ~/path/to/dbt-folder && ~/path/to/.venv/bin/dbt run
Command Descrittion
dbt run This command is used to run a specific model or set of models. It is useful when you want to build and deploy only a specific set of models, rather than all of the models in your dbt project.
dbt build used to build and deploy your data transformation models. When you run the build command, dbt will execute the SQL code in your models and load the results into your target database. This command runs models, tests, snapshots, and seeds with a single command.
dbt deps This command is used to pull the specified version of the packages stored in your packages.yml file.
dbt test used to run tests on your models and data to ensure that they are accurate and reliable. Tests are defined in SQL files that are placed in the test folder within your dbt project. When you run the test command, dbt will execute the tests and report the results.
dbt run-operation This command is used to run a macro.
dbt snapshot This command is used to take a snapshot of your source data. Snapshot data is used by dbt to track changes to your source data over time and ensure that your models are based on accurate and up-to-date data.
dbt seed This command is used to load seed data into your target database. Seed data is a set of reference data that is loaded into your database before your models are built. It is typically used to populate lookup tables or provide reference data for analytics.
dbt show This command allows you to preview results of a model, test, analysis, or SQL query directly from the terminal window.
dbt source freshness This command is used to evaluate whether your source tables are stale or not based on configurations in your sources.yml file.

dbt Core Commands

The following are the list of commands that are only supported by dbt Core:

Command Descrittion
dbt clean This command is used to clean up the target folder and dbt_project directory. It is useful when you want to start fresh with
a new build.
dbt debug This is used to test the database connection and return information that can be used for debugging.
dbt init This command initializes a new dbt project when working in dbt Core.
dbt list This command is used to list resources defined in your project.
dbt parse This command is used to parse and validate the contents of your project. If you have syntax errors, the command will fail.
dbt docs generate This command is used to generate documentation for your dbt project. It creates a set of HTML files that contain information about your models, including their structure, dependencies, and source data.
dbt docs serve This command is used to serve your documentation locally and open the documentation site using your default browser.