Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: add ethnographic file codes extract

...

  • "remarks" field has only a few entries, which can be updated manually after data migration, per Michael (12/15/11)
  • TODO: change titleLanguage from static term list to vocabulary-controlled list
  • TODO: update options for titleType field

Ethnographic File Codes extract

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjUserFields

FieldValue

pahmaEthnographicFileCode

 

sql query

Code Block
sql
sql

SELECT
 u.objectID,
 u.fieldValue pahmaEthnographicFileCode
FROM
 ObjUserFields u
WHERE
 u.FieldTypeID = 17
;

notes

  • TODO: transform field values into those expected in controlled list options

Associated Dates extract

this data cannot be imported until v2.1

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjDates

EventType

assocDateType

 

ObjDates

DateText

assocDate_dateDisplayDate

 

ObjDates

DateBegSearch

assocDate_dateEarliestSingleYear

 

ObjDates

DateEndSearch

assocDate_dateLatestYear

 

ObjDates

DayBegSearch

assocDate_dateEarliestSingleDay

 

ObjDates

DayEndSearch

assocDate_dateLatestDay

 

ObjDates

MonthBegSearch

assocDate_dateEarliestSingleMonth

 

ObjDates

MonthEndSearch

assocDate_dateLatestMonth

 

ObjDates

Remarks

assocDateNote

 

sql query

view: cs_associateddates

Code Block
sql
sql
SELECT
  objectID,
  lower(eventType) assocDateType,
  dateText assocDate_dateDisplayDate,
  (CASE WHEN dateBegSearch != '0' THEN dateBegSearch END) assocDate_dateEarliestSingleYear,
  (CASE WHEN dateEndSearch != '0' THEN dateEndSearch END) assocDate_dateLatestYear,
  dayBegSearch assocDate_dateEarliestSingleDay,
  dayEndSearch assocDate_dateLatestDay,
  monthBegSearch assocDate_dateEarliestSingleMonth,
  monthEndSearch assocDate_dateLatestMonth,
  remarks assocDateNote
FROM
  ObjDates
WHERE
  lower(eventType) not in ('', 'accessioned', 'date collected', 'secondary collection date', 'tertiary collection date', 'date made')
  AND (dateText is not null OR dateBegSearch != 0)
;

notes

  • DONE: populate controlled list options for assocDateType field
  • TODO: wait until assocDate field is changed into a structured date (in v2.1; see CSPACE-4775)

...

this data cannot be imported until v2.1

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

 

ObjDates

Remarks

fieldCollectionNote

 

Objects

Dated

fieldCollectionDate_dateDisplayDate

 

Objects

DateBegin

fieldCollectionDate_dateEarliestSingleYear

 

Objects

DateEnd

fieldCollectionDate_dateLatestYear

 

sql query

view: cs_fieldcollectiondates

Code Block
sql
sql
SELECT
  objectID,
  dateText fieldCollectionDate_dateDisplayDate,
  (CASE WHEN dateBegSearch != '0' THEN dateBegSearch END) fieldCollectionDate_dateEarliestSingleYear,
  (CASE WHEN dateEndSearch != '0' THEN dateEndSearch END) fieldCollectionDate_dateLatestYear,
  dayBegSearch fieldCollectionDate_dateEarliestSingleDay,
  dayEndSearch fieldCollectionDate_dateLatestDay,
  monthBegSearch fieldCollectionDate_dateEarliestSingleMonth,
  monthEndSearch fieldCollectionDate_dateLatestMonth,
  remarks fieldCollectionNote
FROM
  ObjDates
WHERE
  lower(eventType) in ('date collected', 'secondary collection date', 'tertiary collection date')
UNION
SELECT
  objectID,
  dated fieldCollectionDate_dateDisplayDate,
  (CASE WHEN DateBegin != '0' THEN DateBegin END) fieldCollectionDate_dateEarliestSingleYear,
  (CASE WHEN DateEnd != '0' THEN DateEnd END) fieldCollectionDate_dateLatestYear,
  null fieldCollectionDate_dateEarliestSingleDay,
  null fieldCollectionDate_dateLatestDay,
  null fieldCollectionDate_dateEarliestSingleMonth,
  null fieldCollectionDate_dateLatestMonth,
  null fieldCollectionNote
FROM
  Objects
WHERE
  dated is not null OR dateBegin != '0' OR dateEnd != '0'
;

notes

  • differences in eventType ('date collected', 'secondary collection date', 'tertiary collection date') are not important and do not need to be migrated, per Michael (12/15/11)
  • TODO: wait until fieldCollectionDate field is changed into a structured date (in v2.1; see CSPACE-4775)
  • TODO: change fieldCollectionDate field into a repeating field

Production Date extract

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjDates

DateText

objectProductionDate_dateDisplayDate

 

ObjDates

DateBegSearch

objectProductionDate_dateEarliestSingleYear

 

ObjDates

DateEndSearch

objectProductionDate_dateLatestYear

 

ObjDates

DayBegSearch

objectProductionDate_dateEarliestSingleDay

 

ObjDates

DayEndSearch

objectProductionDate_dateLatestDay

 

ObjDates

MonthBegSearch

objectProductionDate_dateEarliestSingleMonth

 

ObjDates

MonthEndSearch

objectProductionDate_dateLatestMonth

 

ObjDates

Remarks

objectProductionNote

 

sql query

view: cs_productiondates

Code Block
sql
sql
SELECT
  objectID,
  dateText objectProductionDate_dateDisplayDate,
  (CASE WHEN dateBegSearch != '0' THEN dateBegSearch END) objectProductionDate_dateEarliestSingleYear,
  (CASE WHEN dateEndSearch != '0' THEN dateEndSearch END) objectProductionDate_dateLatestYear,
  dayBegSearch objectProductionDate_dateEarliestSingleDay,
  dayEndSearch objectProductionDate_dateLatestDay,
  monthBegSearch objectProductionDate_dateEarliestSingleMonth,
  monthEndSearch objectProductionDate_dateLatestMonth,
  remarks objectProductionNote
FROM
  ObjDates
WHERE
  lower(eventType) = 'date made'
;

notes

Bibliographic References extract

field mapping

TMS table name

TMS field name

CSpace field name

notes

Objects

Bibliography

referenceNote

 

Objects

PubReferences

referenceNote

 

sql query

view: cs_bibliographicreferences

...

Annotations extract

under construction

field mapping

TMS table name

TMS field name

CSpace field name

notes

Objects

Edition

annotationNote

 

Objects

CuratorialRemarks

annotationNote

 

Components

PrepComments

annotationNote

 

TextEntries

?

?

TBD

sql query

view: cs_annotations

Code Block
sql
sql
SELECT
 objectid,
 edition annotationNote,
 'TMS Edition field' annotationType
FROM
 Objects
WHERE
 edition is not null
UNION ALL
SELECT
 objectid,
 curatorialRemarks annotationNote,
 'TMS Curatorial remarks' annotationType
FROM
 Objects
WHERE
 curatorialRemarks is not null
;

notes

  • some annotationType field values set by query above
  • TODO: include data from TextEntries table in this query

...

to be imported into the Groups Procedure schema

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjectPackages

ObjectPackageID

shortIdentifier

 

ObjectPackages

name

title

 

ObjectPackages

notes

scopeNote

 

ObjectPackages

owner

owner

FK to Users; reference to Person Authority

sql query

view: cs_groups

Code Block
sql
sql
SELECT
 objectPackageID groupID,
 name title,
 notes scopeNote,
 (CASE WHEN u.MTB_ConstituentID = -1 THEN NULL ELSE u.MTB_ConstituentID END) owner
FROM
 ObjectPackages p
 LEFT OUTER JOIN Users u ON p.owner = u.login
;

notes

  • "global" field does not need to be imported, per Michael (1/12/12)

Object-Group Relationship extract

field mapping

TMS table name

TMS field name

CSpace field name

notes

ObjPkgList

ObjectID

objectID

 

ObjPkgList

ObjectPackageID

groupID

 

sql query

view: cs_objectgrouprelationships

Code Block
sql
sql
SELECT
 objectID,
 objectPackageID groupID
FROM
 objPkgList
;

notes