Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Merge 'when not matched' not wrapping values sources with quotes #247

Open
1 task done
alanspires opened this issue Nov 30, 2024 · 1 comment
Open
1 task done
Labels
bug Something isn't working

Comments

@alanspires
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In dremio I have the support key 'dremio.store.file.file-field-enabled' enabled which appends a column named '$file' to queries. This column lets me see the file source the data is coming from when querying object storage. After updating this package to 1.8.0 I now get an error when running incremental updates related to a special character within a column name

 ERROR: Encountered "( DBT_INTERNAL_SOURCE.$file" at line 25, column 9.

Expected Behavior

Quotes around the column names.

Steps To Reproduce

No response

Environment

- OS:Ubuntu 22.04
- dbt-dremio:1.8.0
- dbt-core: 1.8.7
- Dremio Cloud: N/A

Relevant log output

merge into "unified"."test" as DBT_INTERNAL_DEST
        using "unified"."test__dbt_tmp" as DBT_INTERNAL_SOURCE
        on (
                DBT_INTERNAL_SOURCE.id = DBT_INTERNAL_DEST.id
            )

    
    when matched then update set
        "$file" = DBT_INTERNAL_SOURCE."$file","author" = DBT_INTERNAL_SOURCE."author","content" = DBT_INTERNAL_SOURCE."content","created_at" = DBT_INTERNAL_SOURCE."created_at","id" = DBT_INTERNAL_SOURCE."id"
    

    when not matched then insert
        ("$file", "author", "content", "created_at", "id")
    values
        (DBT_INTERNAL_SOURCE.$file,DBT_INTERNAL_SOURCE.author,DBT_INTERNAL_SOURCE.content,DBT_INTERNAL_SOURCE.created_at,DBT_INTERNAL_SOURCE.id)
@alanspires alanspires added the bug Something isn't working label Nov 30, 2024
@bcmeireles
Copy link
Contributor

Can you share the logs obtained when running in debug mode, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants