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] Snapshot custom colum names #518

Open
3 of 6 tasks
danielefrigo opened this issue Jan 14, 2025 · 0 comments
Open
3 of 6 tasks

[Bug] Snapshot custom colum names #518

danielefrigo opened this issue Jan 14, 2025 · 0 comments
Labels
feature:snapshots Issues related to the snapshot materialization pkg:dbt-bigquery Issue affects dbt-bigquery

Comments

@danielefrigo
Copy link

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Which packages are affected?

  • dbt-adapters
  • dbt-tests-adapter
  • dbt-athena
  • dbt-athena-community

Current Behavior

The new snapshot config snapshot_meta_column_names works fine with lower case column names.
If I configure a snapshot with upper case custom column names, the first run works fine and generates the table as expected, while the second brakes with the error:

Snapshot target is missing configured columns (missing "SCD_HK", "START_TS", "END_TS")

I believe the error is here: target relation column are put lowercase, while the config ones are retained in their original case, generating the error.

Expected Behavior

The new snapshot config snapshot_meta_column_names should work with both lower and upper case column names.

Steps To Reproduce

  1. create a new snapshot
  2. add snapshot_meta_column_names = {'dbt_scd_id': "SCD_HK"}
  3. run the snapshot twice

Relevant log output

Environment

- OS: Windows 11
- Python: 3.12
- dbt-adapters: 1.9.0
- dbt-bigquery: 1.9.1

Additional Context

No response

@amychen1776 amychen1776 added pkg:dbt-bigquery Issue affects dbt-bigquery feature:snapshots Issues related to the snapshot materialization labels Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature:snapshots Issues related to the snapshot materialization pkg:dbt-bigquery Issue affects dbt-bigquery
Projects
None yet
Development

No branches or pull requests

2 participants