humlab-sead / sead_bugs_import

SEAD bugs import
2 stars 0 forks source link

Bugs import error: No type set for period #43

Open roger-mahler opened 4 years ago

roger-mahler commented 4 years ago

These 24 errors are caused by records in "TPeriods" having "YearsType" equal to NULL.

The latest BugsCEP database on SEADSERV bugsdata_20200219 gives the erroneous(?) records:

select *
from "TPeriods"
where "YearsType" is null

Currently, the Bugs import tries to assign an age if and only if"YearsType" is "Calendar", "C14" or "Radiometric" as indicated by the following code snippet;

        if(period.getYearsType() != null ){
            switch (period.getYearsType()){
                case "Calendar":
                case "calendar":
                case "Calender":
                case "calender": return new CalendarAgeUpdater(original, period);
                case "C14":
                case "c14":
                case "Radiometric":
                case "radiometric": return new C14AgeUpdater(original, period);
            }
        }
        return new UndeterminedAgeUpdater(original, period);
roger-mahler commented 4 years ago

Affected BugsCEP PeriodCodes:

PeriodCODE Period Name
ERom Early Roman
InterG Interglacial
MIS-02 Oxygen Isotope Stage 2
MIS-03 Oxygen Isotope Stage 3
MIS-04 Oxygen Isotope Stage 4
MIS-05 Oxygen Isotope Stage 5
MIS-05b Oxygen Isotope Stage 5b
MIS-05c Oxygen Isotope Stage 5c
MIS-05d Oxygen Isotope Stage 5d
MIS-06 Oxygen Isotope Stage 6
MIS-08 Oxygen Isotope Stage 8
MIS-10 Oxygen Isotope Stage 10
MIS-14 Oxygen Isotope Stage 14
MIS-14/15 Oxygen Isotope Stage 14/15
MIS-15 Oxygen Isotope Stage 15
MIS-16 Oxygen Isotope Stage 16
MIS-17 Oxygen Isotope Stage 17
MIS-18 Oxygen Isotope Stage 18
MIS-19 Oxygen Isotope Stage 19
MIS-20 Oxygen Isotope Stage 20
MIS-21 Oxygen Isotope Stage 21
MIS-22 Oxygen Isotope Stage 22
MIS-23 Oxygen Isotope Stage 23
Mking Middle Kingdom
visead commented 4 years ago

This is an old error which we may have fixed with an update to lookup data. Will check tomorrow

Get Outlook for Androidhttps://aka.ms/ghei36


From: Roger Mähler notifications@github.com Sent: Thursday, March 19, 2020 3:26:19 PM To: humlab-sead/sead_bugs_import sead_bugs_import@noreply.github.com Cc: Philip Buckland philip.buckland@umu.se; Assign assign@noreply.github.com Subject: Re: [humlab-sead/sead_bugs_import] Bugs import error: No type set for period (#43)

PeriodCODE Period Name ERom Early Roman InterG Interglacial MIS-02 Oxygen Isotope Stage 2 MIS-03 Oxygen Isotope Stage 3 MIS-04 Oxygen Isotope Stage 4 MIS-05 Oxygen Isotope Stage 5 MIS-05b Oxygen Isotope Stage 5b MIS-05c Oxygen Isotope Stage 5c MIS-05d Oxygen Isotope Stage 5d MIS-06 Oxygen Isotope Stage 6 MIS-08 Oxygen Isotope Stage 8 MIS-10 Oxygen Isotope Stage 10 MIS-14 Oxygen Isotope Stage 14 MIS-14/15 Oxygen Isotope Stage 14/15 MIS-15 Oxygen Isotope Stage 15 MIS-16 Oxygen Isotope Stage 16 MIS-17 Oxygen Isotope Stage 17 MIS-18 Oxygen Isotope Stage 18 MIS-19 Oxygen Isotope Stage 19 MIS-20 Oxygen Isotope Stage 20 MIS-21 Oxygen Isotope Stage 21 MIS-22 Oxygen Isotope Stage 22 MIS-23 Oxygen Isotope Stage 23 Mking Middle Kingdom

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHubhttps://github.com/humlab-sead/sead_bugs_import/issues/43#issuecomment-601208805, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIST26QHSI66BABKC7SHFUTRIITQXANCNFSM4LPJZRCA.

roger-mahler commented 4 years ago

Same as #33.

visead commented 4 years ago

Set type as follows, where 'underfined' is a new type

PeriodCODE Period Name type
ERom Early Roman calendar
InterG Interglacial undefined
MIS-02 Oxygen Isotope Stage 2 undefined
MIS-03 Oxygen Isotope Stage 3 undefined
MIS-04 Oxygen Isotope Stage 4 undefined
MIS-05 Oxygen Isotope Stage 5 undefined
MIS-05b Oxygen Isotope Stage 5b undefined
MIS-05c Oxygen Isotope Stage 5c undefined
MIS-05d Oxygen Isotope Stage 5d undefined
MIS-06 Oxygen Isotope Stage 6 undefined
MIS-08 Oxygen Isotope Stage 8 undefined
MIS-10 Oxygen Isotope Stage 10 undefined
MIS-14 Oxygen Isotope Stage 14 undefined
MIS-14/15 Oxygen Isotope Stage 14/15 undefined
MIS-15 Oxygen Isotope Stage 15 undefined
MIS-16 Oxygen Isotope Stage 16 undefined
MIS-17 Oxygen Isotope Stage 17 undefined
MIS-18 Oxygen Isotope Stage 18 undefined
MIS-19 Oxygen Isotope Stage 19 undefined
MIS-20 Oxygen Isotope Stage 20 undefined
MIS-21 Oxygen Isotope Stage 21 undefined
MIS-22 Oxygen Isotope Stage 22 undefined
MIS-23 Oxygen Isotope Stage 23 undefined
Mking Middle Kingdom calendar
visead commented 4 years ago

I have updated table TPeriods in BugsCEP so that all periods have a Years type which is one of four alternatives: C14, Calendar, undefined, Radiometric. For simplicity, all Radiometric Years types have been changed to Calendar, as the nature of the evidence varies.

This will be reflected in the June BugsCEP udpate.