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

support multiple unique key (composite primary key) #18

Closed
imfaridz opened this issue Oct 7, 2022 · 3 comments · Fixed by #19
Closed

support multiple unique key (composite primary key) #18

imfaridz opened this issue Oct 7, 2022 · 3 comments · Fixed by #19

Comments

@imfaridz
Copy link

imfaridz commented Oct 7, 2022

Hi,

I encounter this issue when execute dbt-dry-run to a table that has multiple unique key or composite primary key:

nodes -> model.dbt_re_data_test.table_name -> config -> unique_key
  str type expected (type=type_error.str)

need support to be able to include list type for multiple column unique_key

@ghost
Copy link

ghost commented Oct 10, 2022

Hey @imfaridz,

Thanks for raising an issue. Looks like support for this was added in dbt-core 1.1 in this PR

Setting unique_key as a list is only supported for incremental tables so this issue will be fairly easy to fix as only the snapshot_runner
uses unique_key when validating the model config.

I will raise a PR to update our pydantic model schema

@ghost ghost closed this as completed in #19 Oct 10, 2022
ghost pushed a commit that referenced this issue Oct 10, 2022
@ghost
Copy link

ghost commented Oct 10, 2022

Will do a patch release for this sometime this week now the PR is merged

@imfaridz
Copy link
Author

thanks for the support @connor-charles !

This issue was closed.
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 a pull request may close this issue.

1 participant