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

Fix/update model insert #13

Merged
merged 3 commits into from
Dec 2, 2024
Merged

Fix/update model insert #13

merged 3 commits into from
Dec 2, 2024

Conversation

sophie-daintta
Copy link
Collaborator

@sophie-daintta sophie-daintta commented Dec 2, 2024

Context

insert_model currently only hashes on the parent model’s hashes and nothing else, so you can’t have two different models that work on the same parents.

It also runs with every to_matchbox call with Results, and currently this means you can only do that once before it errors. Adding upserts functionality will fix.

Changes proposed in this pull request

  • Add name to list_to_value_ordered_hash in insert_model
  • Allows insert_model to upsert when the hash is the same

Guidance to review

  • Check you're happy with the new unit tests

Relevant links

Checklist:

  • My code follows the style guidelines of this project
  • New and existing unit tests pass locally with my changes

Copy link
Collaborator

@wpfl-dbt wpfl-dbt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sophie-daintta sophie-daintta merged commit 8a49e11 into main Dec 2, 2024
5 checks passed
@sophie-daintta sophie-daintta deleted the fix/update-model-insert branch December 2, 2024 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants