AltimateAI / vscode-dbt-power-user

This extension makes vscode seamlessly work with dbt™: Auto-complete, preview, column lineage, AI docs generation, health checks, cost estimation etc
https://www.altimate.ai
MIT License
452 stars 86 forks source link

dbt.deferConfigPerProject doesn't work correctly with the "Execute DBT SQL" or "Compiled DBT Preview" #1365

Open mostafa-k-m opened 1 month ago

mostafa-k-m commented 1 month ago

Expected behavior

After adding dbt.deferConfigPerProject config, My models should defer to upstream tables when I use the DBT Power User Ad hoc query, compiled preview or preview query results

Actual behavior

Defer only works correctly when Build DBT model is used.

Defer Does not work with Ad hoc queries, compiled preview or preview query results

Steps To Reproduce

follow the steps in this guide https://docs.myaltimate.com/test/defertoprod/

use the local mode under local path, you should choose the path containing the manifest file pointing to production tables.

your vscode settings should look like this:

    "dbt.deferConfigPerProject": {

        "<dbt project name>": {
            "deferToProduction": true,
            "manifestPathForDeferral": "<local path to target/live>",
            "manifestPathType": "local",
            "favorState": true
        }
    }

then:

Log output/Screenshots

No response

Operating System

macOS 14.5 23F79 arm64

dbt version

1.8.0

dbt Adapter

databricks=1.8.3

dbt Power User version

v0.43.6

Are you willing to submit PR?