dbt-labs / dbt-labs/dbt-utils

No option for quoting in equality test?

Open
#985 0 comments 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
Makefile
Stars
1.8k
Forks
632
PR merge metrics
No merged PRs in 30d

Description

### Describe the bug
We are using DBT together with snowflake and for some unit tests we'd like to make use of the equality test to compare results in our tables to expected results. Our column names are usually quoted and in snake_case (lower). However the equality test seems to not have the option to quote column names. Leading to issues in the test where it is trying to look for unquoted column names which are interpreted as capital letters (and thus doesn't work)

### Steps to reproduce
create two tables in snowflake with lower case column names (using quotes) and run the equality test on these two tables. this will lead to column names not being found

### Expected results
I would expect the test to have the option to add quotes to identifiers of columns (as other tests have too)

### Actual results
Error such as: ```
SQL compilation error: error line 43 at position 11
invalid identifier 'USER_NAME
```'

### System information
**The contents of your `packages.yml` file:**

packages:
- package: dbt-labs/dbt_utils
version: 1.3.0

**Which database are you using dbt with?**
- [ ] postgres
- [ ] redshift
- [ ] bigquery
- [x] snowflake
- [ ] other (specify: ____________)

**The output of `dbt --version`:**
latest (1.9)

### Are you interested in contributing the fix?
yes

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.