dbt-labs / dbt-labs/dbt

[v2 Bug] --jinja-render-mode symbolic: IntrospectiveValue propagates into quote(), causing JinjaError (dbt1501) for macros that use adapter calls followed by identifier quoting

Open
#15,970 2 comments 0 reactions 0 assignees View on GitHub
area:engine engine:v2 type:bug
Dominant language
Rust
Stars
13.8k
Forks
2.6k
Avg merge
21h 31m
Merged PRs (30d)
56

Description

### Is this a new bug in dbt v2.x compared to the latest version of dbt 1.x?

- [x] I believe this is a new bug in dbt v2.x
- [x] I have searched the existing issues and could not find a duplicate

### Current Behavior

When using `--jinja-render-mode symbolic` (introduced in 2.0.0-preview.209), macros that call warehouse-dependent adapter methods (e.g. `adapter.get_columns_in_relation()`, `adapter.get_relation()`) and then pass the result to `quote()` fail with:

`JinjaError (dbt1501): argument 'identifier' to quote() has incompatible type IntrospectiveValue; value is not a string`

The `IntrospectiveValue` hole-punch type is not being propagated transparently through `quote()` — it raises an error instead of returning another hole.

### Expected Behavior

`quote()` should propagate `IntrospectiveValue` transparently (returning another hole/`IntrospectiveValue`), consistent with how symbolic mode handles other tainted values downstream.

### Steps To Reproduce

1. Use a macro that calls an adapter method and passes the result to `quote()`, e.g. `dbt_utils.union_relations()` or any macro calling `adapter.get_columns_in_relation()`
2. Run `dbt lint --jinja-render-mode symbolic`

### Relevant log output

```shell

```

### Environment

```markdown
- OS: dbt Studio
- CPU: (x86 or ARM)
- dbt distribution and version: dbt-fusion 2.0.0-preview.209
```

### Which database adapter are you using?

snowflake

### Is this a discrepancy vs. dbt 1.x?

- [ ] Yes — this works in dbt 1.x but not in dbt v2.x

### Additional Context

Image

Image

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.