Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

this data cannot be imported until CSPACE-4775 is done (v2.2)

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjDates

DateText

fieldCollectionDate_dateDisplayDate

 

ObjDates

DateBegSearch

fieldCollectionDate_dateEarliestSingleYear

 

ObjDates

DateEndSearch

fieldCollectionDate_dateLatestYear

 

ObjDates

DayBegSearch

fieldCollectionDate_dateEarliestSingleDay

 

ObjDates

DayEndSearch

fieldCollectionDate_dateLatestDay

 

ObjDates

MonthBegSearch

fieldCollectionDate_dateEarliestSingleMonth

 

ObjDates

MonthEndSearch

fieldCollectionDate_dateLatestMonth

 

Objects

Dated

fieldCollectionDate_dateDisplayDate

 

Objects

DateBegin

fieldCollectionDate_dateEarliestSingleYear

 

Objects

DateEnd

fieldCollectionDate_dateLatestYear

 

ConXrefs

DisplayDate

fieldCollectionDate_dateDisplayDate

 

ConXrefs

DateBegin

fieldCollectionDate_dateEarliestSingleYear

 

ConXrefs

DateEnd

fieldCollectionDate_dateLatestYear

 

...

  • differences in ObjDates.EventType ('date collected', 'secondary collection date', 'tertiary collection date') are not important and do not need to be migrated, per Michael (12/15/11)
  • DONE: add new field pahmaFieldCollectionDate, to change fieldCollectionDate field into a repeating fieldTODO: wait until fieldCollectionDate field is changed into a structured date (see CSPACE-4775)

Field collection place extract

...

TMS table name

TMS field name

CSpace field name

notes

Objects

MTB_PlaceTermID

fieldCollectionPlace

reference to Place Authority

Objects

Provenance

fieldLocVerbatim

 

SiteObjXrefs

SiteID

fieldCollectionPlace

FK to Sites table to get MTB_PlaceTermID1; reference to Place Authority

SiteObjXrefs

Subsite1/Subsite2/Subsite3

fieldLocVerbatim

 

ObjGeography

MTB_PlaceTermID

fieldCollectionPlace

reference to Place Authority

ThesXrefs

TermID

fieldCollectionPlace

reference to Place Authority

sql query

view:  cscs_fieldcollectionplaces fieldcollectionplaces (refreshed 2012-03-12)

Code Block
sql
sql
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
 o.MTB_PlaceTermID fieldCollectionPlace,
 o.provenance fieldLocVerbatim
FROM
 Objects o
WHERE
 o.IsVirtual = 0 AND o.IsTemplate = 0
 AND (o.MTB_PlaceTermID IS NOT NULL OR o.provenance IS NOT NULL)
UNION ALL
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
 s.MTB_PlaceTermID1 fieldCollectionPlace,
 COALESCE(x.subsite1, '') + (CASE WHEN x.subsite1 IS NOT NULL AND x.subsite2 IS NOT NULL THEN ', ' ELSE '' END) + COALESCE(x.subsite2, '') + (CASE WHEN x.subsite3 IS NOT NULL THEN ', ' + x.subsite3 ELSE '' END) fieldLocVerbatim
FROM
 SiteObjXrefs x
 JOIN Objects o ON x.objectID = o.objectID
 JOIN Sites s ON x.siteID = s.siteID
WHERE
 o.IsVirtual = 0 AND o.IsTemplate = 0
 AND s.MTB_PlaceTermID1 IS NOT NULL
UNION ALL
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
 g.MTB_PlaceTermID fieldCollectionPlace,
 NULL fieldLocVerbatim
FROM
 ObjGeography g
 JOIN Objects o ON g.objectID = o.objectID
WHERE
 o.IsVirtual = 0 AND o.IsTemplate = 0
 AND g.MTB_PlaceTermID IS NOT NULL
UNION ALL
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
 x.termID fieldCollectionPlace,
 NULL fieldLocVerbatim
FROM
 ThesXrefs x
 JOIN ThesXrefTypes t ON x.thesXrefTypeID = t.thesXrefTypeID
 JOIN Objects o ON x.ID = o.objectID
WHERE
 x.tableID = 108
 AND x.active = 1
 AND o.IsVirtual = 0 AND o.IsTemplate = 0
 AND x.thesXrefTableID = 346
 AND lower(t.thesXrefType) IN ('archaeological site', 'card header', 'provenience')
;

...

TMS table name

TMS field name

CSpace field name

notes

ConXrefs

constituentID

fieldCollector

reference to Person or Organization

sql query

view: cs_fieldcollectors fieldcollectors (refreshed 2012-03-12)

Code Block
sql
sql
SELECT
 CAST(o.objectID AS VARCHAR) objectID,
 x.constituentID fieldCollector
FROM
 ConXrefs x
 JOIN roles r ON x.roleID = r.roleID
 JOIN objects o ON x.ID = o.objectID
WHERE
 x.tableID = 108
 AND x.active = 1
 AND  o.IsVirtual = 0 AND o.IsTemplate = 0
 AND lower(r.ROLE) IN ('collector', 'secondary collector', 'tertiary collector')
;

...

TMS table name

TMS field name

CSpace field name

notes

ObjDates

Remarks

fieldCollectionNote

pertains to fieldCollectionDate

SiteObjXrefs

Remarks

fieldCollectionNote

pertains to fieldCollectionPlace

ThesXrefs

Remarks

fieldCollectionNote

pertains to fieldCollectionPlace

ConXrefs

Remarks

fieldCollectionNote

pertains to fieldCollector

sql query

view:  cscs_fieldcollectionnotes (refreshed 2012-03-13)

...