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_meta_column_names causing compilation error on second run #11202

Open
graciegoheen opened this issue Jan 9, 2025 · 1 comment
Labels
backport 1.0.latest Tag for PR to be backported to the 1.0.latest branch bug Something isn't working

Comments

@graciegoheen
Copy link
Contributor

graciegoheen commented Jan 9, 2025

Hi @graciegoheen not sure whether i understand it correctly. I have created a snapshot from scratch with adjusted columns using a dictionary:

    snapshot_meta_column_names = {
        "dbt_valid_from": "from_date",
        "dbt_valid_to": "to_date",
        "dbt_scd_id": "scd_key",
        "dbt_updated_at": "dbt_updated_at",
        "dbt_is_deleted": "active_flag"
    }

Snapshot has been created with that adjusted dbt column names.

image

Issue is if i am trying to run snapshot second time. Query is not even sent to databrick cluster- it fails during compilation (Compilation Error in snapshot snapshot__animals_scd2_1 (snapshots/snapshot__animals_scd2_1.sql)

image

Can you advice me how to avoid that?
Thank you

Originally posted by @czasoprzestrzenny in #10185 (comment)

@graciegoheen graciegoheen added bug Something isn't working backport 1.0.latest Tag for PR to be backported to the 1.0.latest branch labels Jan 9, 2025
@peterallenwebb
Copy link
Contributor

@graciegoheen It looks like the databricks adapter has a customized snapshot implementation that needs to be updated to support custom meta-column names.

At a minimum, this line needs to be updated to pass the desired meta column name dictionary. Other supporting changes will probably also be needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.0.latest Tag for PR to be backported to the 1.0.latest branch bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants