Project

General

Profile

« Previous | Next » 

Revision 10298

inputs/Madidi/IndividualObservation/map.csv: translated 1:many mappings ( FieldFamilyFullName->{family,originalFamily} ) to derived columns (in postprocess.sql) to work with new-style import, which must have a 1:1 relationship between input and output columns

View differences:

inputs/Madidi/IndividualObservation/postprocess.sql
1
SELECT util.search_path_append('util');
2

  
3
SELECT mk_derived_col((:table_str, 'FieldFamilyFullName#originalFamily'), $$"FieldFamilyFullName"$$);
inputs/Madidi/IndividualObservation/map.csv
28 28
RepresentativeSpecimenSeniorCollector,*RepresentativeSpecimenSeniorCollector,,
29 29
RepresentativeCollectionNumber,*RepresentativeCollectionNumber,,
30 30
RepresentativeSpecimenCollectorAbbreviation,*RepresentativeSpecimenCollectorAbbreviation,,
31
FieldFamilyFullName,originalFamily,,
32 31
FieldFamilyFullName,family,,
33 32
FieldFamilyHTML,OMIT#FieldFamilyHTML,,"Omitted because includes *family* author, which TNRS can’t handle"
34 33
FieldNameFullName,originalTaxonName,,
......
180 179
Decomposition,UNUSED#Decomposition,,
181 180
MultipleFalls,UNUSED#MultipleFalls,,
182 181
TreeMortalityNotes,UNUSED#TreeMortalityNotes,,
182
FieldFamilyFullName#originalFamily,originalFamily,,
inputs/Madidi/IndividualObservation/VegBIEN.csv
58 58
CurrentDetRank,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/verbatimrank,
59 59
CurrentDetQualifier,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/taxonfit,
60 60
FieldNameAuthors,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/author,
61
FieldFamilyFullName,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/family,
61
FieldFamilyFullName#originalFamily,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/family,
62 62
MorphoSpeciesName,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/morphoname,
63 63
FieldNameFullName,/location/locationevent/taxonoccurrence/taxondetermination[isoriginal=true]/*_id/taxonverbatim/taxonname,
64 64
SpecimenID,"/location/locationevent/taxonoccurrence/voucher/*_id/specimenreplicate/catalognumber_dwc/_if[@name=""if indirect voucher""]/then",
inputs/Madidi/IndividualObservation/test.xml.ref
136 136
                                    <taxonverbatim_id>
137 137
                                        <taxonverbatim>
138 138
                                            <author>$FieldNameAuthors</author>
139
                                            <family>$FieldFamilyFullName</family>
139
                                            <family>$FieldFamilyFullName#originalFamily</family>
140 140
                                            <morphoname>$MorphoSpeciesName</morphoname>
141 141
                                            <taxonname>$FieldNameFullName</taxonname>
142 142
                                        </taxonverbatim>
inputs/Madidi/IndividualObservation/new_terms.csv
12 12
CurrentDetRank,taxonRank,,
13 13
CurrentDetFamily,OMIT#CurrentDetFamily,,"Omitted because includes *family* author, which TNRS can’t handle"
14 14
CurrentDetQualifier,identificationQualifier,,
15
FieldFamilyFullName,originalFamily,,
16 15
FieldFamilyFullName,family,,
17 16
FieldFamilyHTML,OMIT#FieldFamilyHTML,,"Omitted because includes *family* author, which TNRS can’t handle"
18 17
FieldNameFullName,originalTaxonName,,
......
23 22
TotalHeight,height_m,,
24 23
HabitName,growthForm,,
25 24
TreeNotes,occurrenceRemarks,,
25
FieldFamilyFullName#originalFamily,originalFamily,,

Also available in: Unified diff