Install¶
Install CTE Diff for dbt and Snowflake from either store:
- VS Code Marketplace, for VS Code.
- Open VSX, for Cursor, VSCodium and other editors built on VS Code.
Or from VS Code's Quick Open (Cmd+P or Ctrl+P):
Requirements¶
- dbt Fusion, or dbt-core 1.5 or later. Both have
dbt show --inline, which runs every query. dbt needs a working profile. - Snowflake or DuckDB, for comparisons. A comparison uses each one's JSON functions. Previews work on any warehouse dbt supports.
- A trusted workspace. dbt runs the project's macros, so the extension stays off in Restricted Mode.
Finding dbt and the project¶
The extension looks for dbt in the project's .venv, then ~/.local/bin, then Homebrew, then PATH. It runs in the dbt project that holds the open file, or else the one in the workspace. Set cteDiff.dbtPath and cteDiff.projectDir to choose them yourself.
If the project has a .env file, its variables are loaded before dbt runs, so profiles that read env_var() work. Variables already set in the environment take precedence.
Next: use it.