dbt support
DataSpell supports dbt® Core — an open-source data modeling tool, that allows users to transform, test, and deploy data in their data warehouses using SQL.
Enable the Database Tools and SQL plugin
This functionality relies on the Database Tools and SQL plugin, which is bundled and enabled in DataSpell by default. If the relevant features aren't available, make sure that you didn't disable the plugin.
Press Ctrl+Alt+S to open the IDE settings and then select
.Open the Installed tab, find the Database Tools and SQL plugin, and select the checkbox next to the plugin name.
dbt support in DataSpell includes:
Effortless project creation: you can create your dbt® project using a predefined template.
Easy run, build, and debug: execute, build, or debug your project with Run/debug configurations in just a few clicks.
Quick access to dbt actions: run, test and preview models directly from an SQL file using the Gutter icons.
Intelligent code completion: DataSpell offers smart code completion for SQL and YML files.
Get familiar with the user interface
Run/debug configurations
To run a dbt command, select the dbt configuration from the list of run/debug configurations in the main toolbar and click Run.
You can create your own dbt configuration.
Do one of the following:
Go to
.In the main toolbar, select Edit Configurations from the list of run/debug configurations.
Press Alt+Insert or click Add New Configuration.
Select dbt.
Specify configuration name and select command from the dbt command list.
Specify additional arguments.
Select Module.
Set environment variables, if necessary. For example, you might use environment variables to manage different database connections for development, testing, and production environments.
If you want to execute any task before the dbt command, click Add in the Before launch field and select a task.
Click OK to save the configuration.
Gutter icons
Gutter icons are located in the editor on the left. You can use them to execute dbt commands:
Open an SQL file with your model.
Click Run with dbt icon in the gutter. The list of the Gutter icons appears.
Click the icon to run a dbt command.
Gutter icon | dbt command |
---|---|
dbt run --select model.sql | |
dbt test --select model.sql | |
dbt show --select model.sql |