Project

General

Profile

« Previous | Next » 

Revision 10624

inputs/TEX/Specimen2/: translated new multi-column filters to postprocessing derived columns, using the steps at http://wiki.vegpath.org/Adding_new-style_import_to_a_datasource#Translating-filters-to-postprocessing-derived-columns

View differences:

inputs/TEX/Specimen2/postprocess.sql
5 5
$$_alt("EXACT DATE", "GENERAL DATE")$$)
6 6
; -- runtime: 0.3 s ("Time: 283.170 ms") @starscream
7 7

  
8

  
8 9
SELECT mk_derived_col((:table_str, 'recordedBy__primary'),
9 10
$$_join_words("COLLECTOR 1 FIRST NAME", "COLLECTOR 1 LAST NAME")$$)
10 11
; -- runtime: 0.2 s ("Time: 154.234 ms") @starscream
......
28 29
SELECT mk_derived_col((:table_str, 'recordedBy'),
29 30
$$_join("recordedBy__primary", "recordedBy__additional__1", "recordedBy__additional__2", "recordedBy__additional__3", "recordedBy__additional__4")$$)
30 31
; -- runtime: 0.1 s ("Time: 141.355 ms") @starscream
32

  
33

  
34
SELECT mk_derived_col((:table_str, 'identifiedBy'),
35
$$_join_words("DETERMINER FIRST NAME", "DETERMINER LAST NAME")$$)
36
; -- runtime: 0.3 s ("Time: 267.310 ms") @starscream
inputs/TEX/Specimen2/map.csv
39 39
UTM,*UTM,,
40 40
ORIGIN,establishmentMeans,,
41 41
PHENOLOGY,reproductiveCondition,,
42
DETERMINER FIRST NAME,identifiedBy,/_join_words/1,
43
DETERMINER LAST NAME,identifiedBy,/_join_words/2,
42
DETERMINER FIRST NAME,identifiedBy__first,,
43
DETERMINER LAST NAME,identifiedBy__last,,
44 44
DET DATE,dateIdentified,,
45 45
DETERMINER INSTITUTION,*DETERMINER INSTITUTION,,
46 46
DET NOTES,identificationRemarks,,
......
51 51
recordedBy__additional__3,recordedBy__additional__3,,
52 52
recordedBy__additional__4,recordedBy__additional__4,,
53 53
recordedBy,recordedBy,,
54
identifiedBy,identifiedBy,,
inputs/TEX/Specimen2/VegBIEN.csv
16 16
COLLECTOR NUMBER,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
17 17
ORIGIN,"/location/locationevent/taxonoccurrence/iscultivated/_alt/2/_map:[cultivated=t,wild=f,*=]/value",
18 18
ORIGIN,"/location/locationevent/taxonoccurrence/isnative/_map:[native=t,exotic=f,*=]/value",
19
DETERMINER FIRST NAME,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname/_join_words/1,
20
DETERMINER LAST NAME,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname/_join_words/2,
19
identifiedBy,/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/party/fullname,
21 20
VARIETY,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=variety]/taxonepithet",
22 21
SUBSPECIES,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=subspecies]/taxonepithet",
23 22
SPECIES,"/location/locationevent/taxonoccurrence/taxondetermination[!isoriginal]/*_id/taxonverbatim/*_id/taxonlabel/parent_id/taxonlabel/parent_id/_forEach:[in:[cultivar,forma,variety,subspecies,],do=""taxonlabel[rank=_val]/parent_id""]/taxonlabel[rank=species]/taxonepithet",
......
62 61
COLLECTOR 5 LAST NAME,,** No join mapping for recordedBy__additional__4__last ** 
63 62
DATABASED BY,,** No join mapping for *DATABASED BY ** 
64 63
DET NOTES,,** No join mapping for identificationRemarks ** 
64
DETERMINER FIRST NAME,,** No join mapping for identifiedBy__first ** 
65 65
DETERMINER INSTITUTION,,** No join mapping for *DETERMINER INSTITUTION ** 
66
DETERMINER LAST NAME,,** No join mapping for identifiedBy__last ** 
66 67
END DATE,,** No non-empty join mapping for UNUSED#END DATE ** 
67 68
EXACT DATE,,** No join mapping for dateCollected__scrubbed ** 
68 69
GENERAL DATE,,** No join mapping for dateCollected__verbatim ** 
inputs/TEX/Specimen2/test.xml.ref
56 56
                                    </_map>
57 57
                                </isnative>
58 58
                                <taxondetermination>
59
                                    <party_id>
60
                                        <party>
61
                                            <fullname>
62
                                                <_join_words>
63
                                                    <1>$DETERMINER FIRST NAME</1>
64
                                                    <2>$DETERMINER LAST NAME</2>
65
                                                </_join_words>
66
                                            </fullname>
67
                                        </party>
68
                                    </party_id>
59
                                    <party_id><party><fullname>$identifiedBy</fullname></party></party_id>
69 60
                                    <taxonverbatim_id>
70 61
                                        <taxonverbatim>
71 62
                                            <taxonlabel_id>
inputs/TEX/Specimen2/new_terms.csv
16 16
COLLECTOR 5 LAST NAME,recordedBy__additional__4__last,,
17 17
MISC NOTES,locationRemarks,,
18 18
ORIGIN,establishmentMeans,,
19
DETERMINER FIRST NAME,identifiedBy,/_join_words/1,
20
DETERMINER LAST NAME,identifiedBy,/_join_words/2,
19
DETERMINER FIRST NAME,identifiedBy__first,,
20
DETERMINER LAST NAME,identifiedBy__last,,
21 21
DET DATE,dateIdentified,,
22 22
DET NOTES,identificationRemarks,,
inputs/TEX/Specimen2/unmapped_terms.csv
18 18
*LATLONG DATUM
19 19
*DATABASED BY
20 20
*UTM
21
identifiedBy__first
22
identifiedBy__last
21 23
*DETERMINER INSTITUTION
22 24
identificationRemarks
23 25
recordedBy__primary

Also available in: Unified diff