Skip to content

dbt Tools Documentation

This document lists all available dbt tools and their usage.

Tools

Tool Name Description Parameters
get_projects Returns detailed information about all available dbt projects. This must be called first to get the projectRoot parameter needed for all other tools. None
get_columns_of_model Returns the column names and data types for a specified dbt model. Use this to understand a model's schema before querying it. - projectRoot (string): The root directory path of the dbt project
- modelName (string): The name of the dbt model
get_columns_of_source Returns the column names and data types for a specified dbt source. Use this to understand a source's schema before querying it. - projectRoot (string): The root directory path of the dbt project
- sourceName (string): The name of the dbt source
- tableName (string): The name of the table in the source
get_column_values Returns the distinct values for a specified column in a model or source. Use this to understand the data distribution and possible values in a column. - projectRoot (string): The root directory path of the dbt project
- model (string): The model or source name
- column (string): The column name
execute_sql Executes SQL queries against the database, returning processed results immediately. Use this to test queries and retrieve data from the database. - projectRoot (string): The root directory path of the dbt project
- query (string): The SQL query to execute
- modelName (string): The model name (for context)
compile_model Converts a dbt model's Jinja SQL into raw SQL. Use this to inspect the generated SQL before executing it. - projectRoot (string): The root directory path of the dbt project
- modelName (string): The name of the dbt model
compile_query Compile query, this will only convert the Jinja SQL to SQL, not determine if the SQL actually works. - projectRoot (string): The root directory path of the dbt project
- query (string): The Jinja SQL query
- originalModelName (string, optional): The original model name
run_model Executes a dbt model in the database. Use + for plusOperatorLeft to include parent models, and + for plusOperatorRight to include child models in the run. - projectRoot (string): The root directory path of the dbt project
- plusOperatorLeft (enum: "", "+"): Include parent models
- modelName (string): The model name
- plusOperatorRight (enum: "", "+"): Include child models
build_model Builds a dbt model in the database. Use + for plusOperatorLeft to include parent models, and + for plusOperatorRight to include child models in the build. - projectRoot (string): The root directory path of the dbt project
- plusOperatorLeft (enum: "", "+"): Include parent models
- modelName (string): The model name
- plusOperatorRight (enum: "", "+"): Include child models
build_project Builds the dbt project, this will run seeds, models and all related tests. - projectRoot (string): The root directory path of the dbt project
run_test Run an individual test based on the test name in the dbt manifest. - projectRoot (string): The root directory path of the dbt project
- testName (string): The name of the test
run_model_test Run model tests, use this tool to run the existing tests defined for the dbt model. - projectRoot (string): The root directory path of the dbt project
- modelName (string): The name of the dbt model
add_dbt_packages Add dbt package(s) to the project, the dbt package string should be in the form of packageName@version. - projectRoot (string): The root directory path of the dbt project
- packages (string[]): Array of package strings
install_deps Install dbt package dependencies based on the dbt project's packages.yml file. - projectRoot (string): The root directory path of the dbt project
get_children_models Returns the list of models that depend on the specified model (its children). Use this to understand a model's downstream impact and lineage. - projectRoot (string): The root directory path of the dbt project
- table (string): The model name
get_parent_models Returns the list of models that the specified model depends on (its parents). Use this to understand a model's upstream dependencies and lineage. - projectRoot (string): The root directory path of the dbt project
- table (string): The model name

Configuration

To use these tools, you must have a valid dbt project open in your IDE and have the Power Users for dbt Extension installed in your IDE.

For more on the Power User for dbt extension please see our documentation page here

dbt_power_users_ide