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

Model properties not displayed in preview #1370

Closed egononega closed 1 week ago

egononega commented 1 month ago

Expected behavior

Preview should be the same as the compiled model test.sql when trying to display {{ model.meta }}

target\compiled\meta_tags\models\test.sql {'project': 'YES', 'project_model': 'YES', 'schema': 'YES', 'model': 'YES'}

Actual behavior

some properties are ignored by the preview. The result of the preview is:

models\test.sql (preview) {'project': 'YES', 'model': 'YES'}

Steps To Reproduce

schema.yml

models:
  - name: test
    description: "A TEST dbt model"
    meta:
      schema: "YES"

Model test.sql

{{
    config( 
    { "meta": { "model": "YES" }} 
  )
}}

{{ model.meta }}

{{ model.description }}

dbt_project.yml

models:
  meta_tags:
    +meta:
      project: "YES"
    test:
      +meta:
        project_model: "YES"

model.discription is also missing from the preview, and displayed in the compiled query.

Log output/Screenshots

No response

Operating System

windows 11

dbt version

1.8.4

dbt Adapter

snowflake

dbt Power User version

v0.44.0

Are you willing to submit PR?

mdesmet commented 1 week ago

Can you retest this with the latest version and reopen if not working as expected?