Project

General

Profile

« Previous | Next » 

Revision 7621

inputs/NY/Ecatalog_all/create.sql: Add table column which scopes the key field. Add primary key to allow sorting by it. inputs/NY/Ecatalog_all/map.csv: Documented that UniqueNYInternalRecordNumber is sometimes duplicated.

View differences:

inputs/NY/Ecatalog_all/create.sql
1
SELECT * FROM "Ecatalog_LatLong"
1
SELECT 'Ecatalog_LatLong' AS "table", * FROM "Ecatalog_LatLong"
2 2
UNION ALL
3
SELECT * FROM "Ecatalog"
3
SELECT 'Ecatalog' AS "table", * FROM "Ecatalog"
4
;
5

  
6
-- key is unique only within each Ecatalog* table.
7
-- UniqueNYInternalRecordNumber is sometimes duplicated.
8
ALTER TABLE :table ADD PRIMARY KEY ("table", "key");
inputs/NY/Ecatalog_all/header.csv
1
key,DateLastModified,InstitutionCode,CollectionCode,CatalogNumber,ScientificName,BasisOfRecord,Kingdom,Phylum,Class,Order,Family,Genus,Species,Subspecies,ScientificNameAuthor,IdentifiedBy,YearIdentified,MonthIdentified,DayIdentified,TypeStatus,CollectorNumber,FieldNumber,Collector,YearCollected,MonthCollected,DayCollected,JulianDay,TimeOfDay,ContinentOcean,Country,StateProvince,County,Locality,Longitude,Latitude,CoordinatePrecision,BoundingBox,MinimumElevation,MaximumElevation,MinimumDepth,MaximumDepth,Sex,PreparationType,IndividualCount,PreviousCatalogNumber,RelationshipType,RelatedCatalogItem,Notes,Habitat,PlantFungDescription,Substrate,Vegetation,UniqueNYInternalRecordNumber
1
table,key,DateLastModified,InstitutionCode,CollectionCode,CatalogNumber,ScientificName,BasisOfRecord,Kingdom,Phylum,Class,Order,Family,Genus,Species,Subspecies,ScientificNameAuthor,IdentifiedBy,YearIdentified,MonthIdentified,DayIdentified,TypeStatus,CollectorNumber,FieldNumber,Collector,YearCollected,MonthCollected,DayCollected,JulianDay,TimeOfDay,ContinentOcean,Country,StateProvince,County,Locality,Longitude,Latitude,CoordinatePrecision,BoundingBox,MinimumElevation,MaximumElevation,MinimumDepth,MaximumDepth,Sex,PreparationType,IndividualCount,PreviousCatalogNumber,RelationshipType,RelatedCatalogItem,Notes,Habitat,PlantFungDescription,Substrate,Vegetation,UniqueNYInternalRecordNumber
inputs/NY/Ecatalog_all/map.csv
1 1
NY,VegCore,Filter,Comments
2
key,OMIT,,UniqueNYInternalRecordNumber is a better pkey
2
table,OMIT,,"CatalogNumber, etc. is a better pkey"
3
key,OMIT,,"CatalogNumber, etc. is a better pkey"
3 4
DateLastModified,modified,,
4 5
InstitutionCode,custodialInstitutions,,
5 6
CollectionCode,collection,,
......
52 53
PlantFungDescription,organismNotes,"/_join/2/_label[label=""plant fungus""]/value",
53 54
Substrate,locality,"/_join/2/_label[label=""substrate""]/value",
54 55
Vegetation,locality,"/_join/3/_label[label=""vegetation""]/value",
55
UniqueNYInternalRecordNumber,OMIT,,"Globally unique when provided, but omitted to avoid confusion since this is an internal-only ID"
56
UniqueNYInternalRecordNumber,OMIT,,Sometimes duplicated. Omitted to avoid confusion since this is an internal-only ID.
inputs/NY/Ecatalog_all/VegBIEN.csv
88 88
RelationshipType,,** No join mapping for relationshipOfResource ** 
89 89
TimeOfDay,,** No join mapping for eventTime ** 
90 90
TypeStatus,,** No join mapping for typeStatus ** 
91
UniqueNYInternalRecordNumber,,"** No non-empty join mapping for OMIT ** Globally unique when provided, but omitted to avoid confusion since this is an internal-only ID"
92
key,,** No non-empty join mapping for OMIT ** UniqueNYInternalRecordNumber is a better pkey
91
UniqueNYInternalRecordNumber,,** No non-empty join mapping for OMIT ** Sometimes duplicated. Omitted to avoid confusion since this is an internal-only ID.
92
key,,"** No non-empty join mapping for OMIT ** CatalogNumber, etc. is a better pkey"
93
table,,"** No non-empty join mapping for OMIT ** CatalogNumber, etc. is a better pkey"
inputs/NY/Ecatalog_all/test.xml.ref
351 351
        </path>
352 352
    </_setDefault>
353 353
</VegBIEN>
354
Inserted 44 new rows into database
354
Inserted 43 new rows into database
inputs/NY/Ecatalog_all/new_terms.csv
1
key,OMIT,,UniqueNYInternalRecordNumber is a better pkey
1
table,OMIT,,"CatalogNumber, etc. is a better pkey"
2
key,OMIT,,"CatalogNumber, etc. is a better pkey"
2 3
CoordinatePrecision,coordinateUncertaintyInMeters,,"Usage inconsistent with DwC definition, which only allows degrees. Assuming units based on the range and precision of values."
3 4
PlantFungDescription,organismNotes,"/_join/2/_label[label=""plant fungus""]/value",
4 5
Substrate,locality,"/_join/2/_label[label=""substrate""]/value",
5 6
Vegetation,locality,"/_join/3/_label[label=""vegetation""]/value",
6
UniqueNYInternalRecordNumber,OMIT,,"Globally unique when provided, but omitted to avoid confusion since this is an internal-only ID"
7
UniqueNYInternalRecordNumber,OMIT,,Sometimes duplicated. Omitted to avoid confusion since this is an internal-only ID.

Also available in: Unified diff