Project

General

Profile

« Previous | Next » 

Revision 11812

added inputs/CVS/observationContributor_/, which adds the people collecting the plot

View differences:

inputs/CVS/import_order.txt
8 8
stemCount_
9 9
taxon_observation.**
10 10
^taxon_observation.**.sample
11
observationContributor_
inputs/CVS/observationContributor_/create.sql
1
SELECT *
2
FROM "observationContributor"
3
LEFT JOIN party USING ("PARTY_ID")
inputs/CVS/observationContributor_/header.csv
1
PARTY_ID,OBSERVATIONCONTRIBUTOR_ID,OBSERVATION_ID,ROLE_ID,contributionDate,observationContributor--dba_src_ID,unsure,salutation,givenName,middleName,surName,suffix,entry_userInitials,organizationName,currentName_ID,contactInstructions,email,accessionCode,partyType,dba_src_ID,dba_unsure
inputs/CVS/observationContributor_/postprocess.sql
1
SELECT util.search_path_append('util');
2

  
3

  
4
SELECT mk_derived_col((:table_str, 'event__participant'),
5
$$_join_words(event_participant_name_first::text, event_participant_name_middle::text, event_participant_name_last::text)$$)
6
; -- runtime: 0.3 s ("Time: 358.980 ms") @starscream
inputs/CVS/observationContributor_/run
1
#!/bin/bash -e
2
. "$(dirname "${BASH_SOURCE[0]}")"/../table.run
0 3

  
inputs/CVS/observationContributor_/map.csv
1
CVS,VegCore,Filter,Comments
2
PARTY_ID,*observationContributor_--PARTY_ID,,
3
OBSERVATIONCONTRIBUTOR_ID,*observationContributor_--OBSERVATIONCONTRIBUTOR_ID,,
4
OBSERVATION_ID,eventID,,
5
ROLE_ID,*observationContributor_--ROLE_ID,,
6
contributionDate,*observationContributor_--contributionDate,,
7
observationContributor--dba_src_ID,*observationContributor_--observationContributor--dba_src_ID,,
8
unsure,*observationContributor_--unsure,,
9
salutation,*observationContributor_--salutation,,
10
givenName,event_participant_name_first,,
11
middleName,event_participant_name_middle,,
12
surName,event_participant_name_last,,
13
suffix,*observationContributor_--suffix,,
14
entry_userInitials,*observationContributor_--entry_userInitials,,
15
organizationName,*observationContributor_--organizationName,,
16
currentName_ID,*observationContributor_--currentName_ID,,
17
contactInstructions,*observationContributor_--contactInstructions,,
18
email,*observationContributor_--email,,
19
accessionCode,*observationContributor_--accessionCode,,
20
partyType,*observationContributor_--partyType,,
21
dba_src_ID,*observationContributor_--dba_src_ID,,
22
dba_unsure,*observationContributor_--dba_unsure,,
inputs/CVS/observationContributor_/VegBIEN.csv
1
link ../../../mappings/VegCore-VegBIEN.csv
0 2

  
inputs/CVS/observationContributor_/test.xml.ref
1
<!--put template-->
2
<VegBIEN>
3
    <_setDefault id="-1">
4
        <source_id><source><shortname>CVS.new</shortname></source></source_id>
5
        <path>
6
            <_simplifyPath>
7
                <next>parent_id</next>
8
                <path>
9
                    <location>
10
                        <locationevent>
11
                            <sourceaccessioncode>$eventID</sourceaccessioncode>
12
                            <locationevent fkey="parent_id"><sourceaccessioncode>$eventID</sourceaccessioncode></locationevent>
13
                            <locationeventcontributor><party_id><party><fullname>$event__participant</fullname></party></party_id></locationeventcontributor>
14
                        </locationevent>
15
                    </location>
16
                </path>
17
            </_simplifyPath>
18
        </path>
19
    </_setDefault>
20
</VegBIEN>
21
Inserted 6 new rows into database
inputs/CVS/observationContributor_/new_terms.csv
1
PARTY_ID,*observationContributor_--PARTY_ID,,
2
OBSERVATIONCONTRIBUTOR_ID,*observationContributor_--OBSERVATIONCONTRIBUTOR_ID,,
3
OBSERVATION_ID,eventID,,
4
ROLE_ID,*observationContributor_--ROLE_ID,,
5
contributionDate,*observationContributor_--contributionDate,,
6
unsure,*observationContributor_--unsure,,
7
salutation,*observationContributor_--salutation,,
8
givenName,event_participant_name_first,,
9
middleName,event_participant_name_middle,,
10
surName,event_participant_name_last,,
11
suffix,*observationContributor_--suffix,,
12
entry_userInitials,*observationContributor_--entry_userInitials,,
13
organizationName,*observationContributor_--organizationName,,
14
currentName_ID,*observationContributor_--currentName_ID,,
15
contactInstructions,*observationContributor_--contactInstructions,,
16
email,*observationContributor_--email,,
17
accessionCode,*observationContributor_--accessionCode,,
18
partyType,*observationContributor_--partyType,,
19
dba_src_ID,*observationContributor_--dba_src_ID,,
20
dba_unsure,*observationContributor_--dba_unsure,,
inputs/CVS/observationContributor_/unmapped_terms.csv
1
*observationContributor_--PARTY_ID
2
*observationContributor_--OBSERVATIONCONTRIBUTOR_ID
3
*observationContributor_--ROLE_ID
4
*observationContributor_--contributionDate
5
*observationContributor_--observationContributor--dba_src_ID
6
*observationContributor_--unsure
7
*observationContributor_--salutation
8
event_participant_name_first
9
event_participant_name_middle
10
event_participant_name_last
11
*observationContributor_--suffix
12
*observationContributor_--entry_userInitials
13
*observationContributor_--organizationName
14
*observationContributor_--currentName_ID
15
*observationContributor_--contactInstructions
16
*observationContributor_--email
17
*observationContributor_--accessionCode
18
*observationContributor_--partyType
19
*observationContributor_--dba_src_ID
20
*observationContributor_--dba_unsure

Also available in: Unified diff