Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 task done
mostafa-k-m opened this issue Aug 12, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mostafa-k-m
Copy link

mostafa-k-m commented Aug 12, 2024

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:

  • CMD+P > dbt Power User: Run dbt Model: works as expected
  • CMD+P > dbt Power User: compiled dbt preview: doesn't defer to production models as expected
  • CMD+P > dbt Power User: Execute DBT SQL: doesn't defer to production models as expected

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?

  • Yes I am willing to submit a PR!
@mostafa-k-m mostafa-k-m added the bug Something isn't working label Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant