Project

General

Profile

Actions

Bug #965

closed

some VegBank plots are missing the plot name

Added by Aaron Marcuse-Kubitza about 10 years ago. Updated about 10 years ago.

Status:
Resolved
Priority:
High
Start date:
10/17/2014
Due date:
% Done:

100%

Estimated time:

Description

problem

this applies to 358 location rows:

SELECT * FROM location
WHERE
    source_id = (SELECT source_by_shortname('VegBank'))
AND authorlocationcode IS NULL

these location rows are not present in the input data:

SELECT * FROM "VegBank".plot
WHERE "locationID" IN
(
SELECT sourceaccessioncode::integer FROM location
WHERE
    source_id = (SELECT source_by_shortname('VegBank'))
AND authorlocationcode IS NULL
)
; -- 0 rows

this is most likely due to a missing foreign key at the time the embargoed plots are cascadingly deleted

verify this:

SELECT * FROM "VegBank".observation_ WHERE "locationID" = 80872; -- 1 row
SELECT * FROM "VegBank".observation WHERE plot_id = 80872; -- 0 rows
SELECT * FROM "VegBank".plot WHERE "locationID" = 80872; -- 0 rows
SELECT * FROM "VegBank".plot_ WHERE "locationID" = 80872; -- 0 rows

this is in fact a dangling row, but it occurs only in observation_, so the bug is in the creation of observation_ from observation

try remaking it:

rm=1 inputs/VegBank/observation_/run

the dangling rows are now gone, so the problem is solved:

SELECT * FROM "VegBank".observation_
WHERE "locationID" IN
(
SELECT sourceaccessioncode::integer FROM location
WHERE
    source_id = (SELECT source_by_shortname('VegBank'))
AND authorlocationcode IS NULL
)
; -- 0 rows

refresh VegBank to propagate the fix to the normalized DB:

inputs/VegBank/taxon_observation.\*\*/run
make inputs/VegBank/reimport_scrub by_col=1 &
Actions #1

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
Actions #2

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • % Done changed from 0 to 30
Actions #3

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
Actions #4

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
Actions #5

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
Actions #6

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
  • % Done changed from 30 to 90
Actions #7

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
  • Status changed from New to Resolved
  • % Done changed from 90 to 100
Actions #8

Updated by Aaron Marcuse-Kubitza about 10 years ago

  • Description updated (diff)
Actions

Also available in: Atom PDF