Skip to content

[BUG] [LSP] Preview CTE with ephemeral model raises 'show' error #176

@jtcohen6

Description

@jtcohen6

Describe the bug
A clear and concise description of what the bug is.

What version of dbt Fusion is this bug in? (find out by running dbt --version)

2.0.0-beta.15

Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.

  • YES
  • NO

To Reproduce
Please submit one of the following

-- models/model_a.sql
{{ config(materialized = 'ephemeral') }}
select 1 as id
-- models/model_b.sql
# Preview CTE
with model_a as (
    select * from {{ ref('model_a') }}
)
select * from model_a

Try "Preview CTE" in model_b: Query error: Finished 'show' with 1 error in 12s 712ms 639us
Try previewing all of model_b: Works returning one row (id: 1)

Expected behavior

"Preview CTE" should be able to preview CTEs that select from / depend on ephemeral models

Screenshots

Image

Operating System and CPU Type (please complete the following information):

  • Mac

Metadata

Metadata

Assignees

Labels

ConformancebugSomething isn't workinghas-reproHas a reproducible examplevscePertains to the VS Code Extension / Language Server

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions