Skip to content

Repopulate denormalized interpretation fields in taxonobservation #418

@regetz

Description

@regetz

In the taxonobservation table, the denormalized interpreted concept fields don't always seem to be fully populated.

For example, taxon observation 68159 has null int_origplantcode and int_currplantcode, but the concepts themselves seem to have plantusage records of classsystem 'Code'. See SQL queries and results below.

SELECT * FROM taxonobservation WHERE taxonobservation_id = 68159;
/*
-[ RECORD 1 ]--------------+----------------------------------------------------------
taxonobservation_id        | 68159
observation_id             | 3062
authorplantname            | Achnatherum hymenoides (Roemer & J.A. Schultes) Barkworth
reference_id               | 33
taxoninferencearea         |
accessioncode              | VB.TO.68159.ACHNATHERUMHYME
emb_taxonobservation       | 0
int_origplantconcept_id    | 7259
int_origplantscifull       | Achnatherum hymenoides (Roemer & J.A. Schultes) Barkworth
int_origplantscinamenoauth | Achnatherum hymenoides
int_origplantcommon        | Indian ricegrass
int_origplantcode          |
int_currplantconcept_id    | 7259
int_currplantscifull       | Achnatherum hymenoides (Roemer & J.A. Schultes) Barkworth
int_currplantscinamenoauth | Achnatherum hymenoides
int_currplantcommon        | Indian ricegrass
int_currplantcode          |
maxcover                   | 0.
*/
SELECT * FROM plantusage WHERE plantconcept_id = 7259 AND classsystem = 'Code';
/*
-[ RECORD 1 ]---+-----------------------
plantusage_id   | 23703
plantname_id    | 24087
plantconcept_id | 7259
usagestart      | 2002-08-20 00:00:00-07
usagestop       | 2011-08-24 00:00:00-07
plantnamestatus | Standard
plantname       | ACHY
classsystem     | Code
acceptedsynonym |
party_id        | 511
plantstatus_id  | 7258
*/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    Status

    No status

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions