Issue 18867

Nub taxa lacking classification

18867
Reporter: mdoering
Assignee: mdoering
Type: Bug
Summary: Nub taxa lacking classification
Priority: Critical
Status: Open
Created: 2016-12-13 15:31:22.512
Updated: 2017-03-06 09:49:42.785
        
Description: Some 20.000 backbone taxa are lacking a kingdom_fk even though they link to a kingdom via the parent classification. This is both true on prod and uat and included current as well as deleted taxa, so it seems this existed for some time.

Example is Cienkowskia aethiopica Solms which should be a plant:
http://www.gbif.org/species/8438688
http://www.gbif.org/species/8438688/classification


{noformat}
prod_checklistbank2=> select count(*), deleted is not null, rank from name_usage where dataset_key = nubKey() and kingdom_fk is null group by 2,3;
 count | ?column? |    rank
-------+----------+------------
   271 | t        | FORM
   334 | f        | VARIETY
    40 | t        | SUBSPECIES
 13473 | t        | SPECIES
    59 | f        | UNRANKED
   561 | t        | VARIETY
    33 | f        | SUBSPECIES
 10888 | f        | SPECIES
    35 | t        | UNRANKED
    82 | f        | FORM
{noformat}]]>
    


Author: mdoering@gbif.org
Created: 2017-02-20 15:48:27.531
Updated: 2017-02-20 15:48:27.531
        
This is still true for the January 2017 backbone
{noformat}
uat_checklistbank=# select count(*), deleted is not null AS del, rank from name_usage where dataset_key = nubKey() and kingdom_fk is null group by 2,3 order by rank, del;
 count | del |    rank
-------+-----+------------
 25247 | f   | SPECIES
 13786 | t   | SPECIES
  1295 | f   | SUBSPECIES
    39 | t   | SUBSPECIES
   822 | f   | VARIETY
   566 | t   | VARIETY
   146 | f   | FORM
   269 | t   | FORM
   176 | f   | UNRANKED
    40 | t   | UNRANKED
{noformat}