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

Draft: fix/vbo pivot table duplicate pk #328

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tssmits
Copy link

@tssmits tssmits commented Nov 3, 2021

This PR is a possible solution to a possible problem that I had placed in the gitter chatroom:

wanneer ik het adres-tabel-plus.sql script uitvoer, krijg ik soms de melding

psql:/nlx/bagv2/etl/sql/adres/adres-tabel-plus.sql:840: ERROR:  could not create unique index "pk_vbo_gbd_pivot_vbo"
DETAIL:  Key (vbo_id)=(0935010000094923) is duplicated.

als ik in het script kijk op die regel staat er

-- maak PK aan. Indien foutmelding dan hiervoor corrigeren
ALTER TABLE verblijfsobjectgebruiksdoelactueelbestaand_PIVOT
  ADD CONSTRAINT  PK_VBO_GBD_PIVOT_VBO  PRIMARY KEY (VBO_ID);
COMMIT;

wat zou ik in dit geval moeten corrigeren?

@wardpieters
Copy link

Thanks, works great!

@justb4
Copy link
Contributor

justb4 commented Feb 21, 2022

@tssmits bedankt, ik kan dit niet zo snel beoordelen. Heb @PeeWeeOSM gevraagd, hij is oorspronkelijke auteur adres-tabel-plus.sql script. Is dit voor de foutmelding op kleine BAG data/test sets?

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.

3 participants