dbt-labs / dbt-labs/dbt

[BUG] SELECT WITH is not supported for BQ

Open
#14,277 0 comments 3 reactions 0 assignees View on GitHub
area:static-analysis engine:v2 status:needs-repro status:triage type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

**Describe the bug**
dbt Fusion is not interpretting SELECT WITH expressions correctly
https://docs.cloud.google.com/bigquery/docs/reference/standard-sql/operators#with_expression

**What version of dbt Fusion is this bug in? (find out by running `dbt --version`)**
Fusion version: 2.0.0-preview.120
Invocation id: acc18fa7-45f4-4f58-be05-4b8512d402c1

**Is this a discrepancy between the dbt Fusion Engine and dbt Core? Check one.**
- [X] YES
- [ ] NO

**To Reproduce**
Sample model containing below SQL
SELECT WITH (a AS 1, b AS 2, a + b) AS c

**Expected behavior**
Model compiles, builds and can be previewed without issue

Image

**Screenshots**
dbt compile, dbt build and preview gives the error [
](dbt0101: extraneous input 'WITH' expecting one of 'ABORT', 'ABSENT', 'ADD', 'ADMIN', 'AFTER', 'ALL', 'ALTER')

Image

**Operating System and CPU Type (please complete the following information):**
* Mac/Windows/Linux?
* X86 or ARM?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.