Working with dbt Core in Visual Studio Code using the Fivetran dbt Wizard extension accelerates your first-time environment setup with dbt Core, and optimizes your continual development of transformation pipelines. This extension is designed primarily for BigQuery destinations, but support for other warehouses is in development.
Note: Turning on Auto Save is strongly recommended. This feature enables near real-time query preview, auto-completion, and error highlighting with dbt Wizard.
Note: error highlighting, auto-completion of columns, tables, and function signature help are only available for BigQuery.
There are two ways to display a compiled query preview.
- Click the Preview icon in the top right corner of your tab
Right click > dbt Wizard > Show preview
Both methods open the compiled query in a new tab.
If a hardcoded table name can be converted to a dbt ref, the extension can convert that SQL for you automatically, by clicking on the lightbulb icon to the left of the line.
Hover over misspelled column and table names to see suggested fixes. SQL syntax errors are also highlighted for your review.
Hover over SQL functions to see their definitions and required parameters.
If you press Cmd
and hover over a macro, model, or source name, a preview of the declaration will appear.
You can jump to the definition with Cmd+Click
or open the definition to the side with Cmd+Alt+Click
.
The extension works on MacOS, Linux, and Windows (for Windows, see the additional steps in the Windows Support article). It supports the default locations for profiles.yml
and dbt_project.yml
files.
Prior to using the extension, you need to perform the following steps in the VS Code Terminal:
- Install your dbt Core adapter and dbt-rpc.
python3 -m pip install dbt-bigquery dbt-rpc
Note:dbt-rpc
is compatible with Python versions less than 3.10
- Test that dbt-rpc works
dbt-rpc --version
- Create your dbt profile and add your credentials.
touch ~/.dbt/profiles.yml
- See dbt Labs’ BigQuery profile documentation for more guidance on how to populate this file.
- Open your dbt project in a new VS Code window.
- Check that the extension is operating by right-clicking in any .sql model file, and selecting
dbt Wizard > Show query preview
.
If you have found any bug, have an idea or suggestion on how to improve extension, please file an issue and provide the details here: Issues