Project

General

Profile

« Previous | Next » 

Revision 6403

mappings/VegCore-VegBIEN.csv: Set the source_id col_default to the datasource name using the new _setDefault() built-in function and _env()

View differences:

test.xml.ref
1 1
Put template:
2 2
<VegBIEN>
3
    <_simplifyPath id="-1">
4
        <next>parent_id</next>
3
    <_setDefault id="-1">
4
        <col>source_id</col>
5
        <value><source><shortname>TEAM</shortname></source></value>
5 6
        <path>
6
            <location>
7
                <authorlocationcode>$Name</authorlocationcode>
8
                <locationevent>
9
                    <project_id><project><projectname>$Site Name</projectname></project></project_id>
10
                    <obsenddate><_dateRangeEnd><value>$CollectionDate</value></_dateRangeEnd></obsenddate>
11
                    <obsstartdate><_dateRangeStart><value>$CollectionDate</value></_dateRangeStart></obsstartdate>
12
                </locationevent>
13
                <locationplace>
14
                    <place_id>
15
                        <place>
16
                            <coordinates_id>
17
                                <coordinates>
18
                                    <latitude_deg>
19
                                        <_nullIf>
20
                                            <null>0</null>
21
                                            <type>float</type>
22
                                            <value>$Latitude</value>
23
                                        </_nullIf>
24
                                    </latitude_deg>
25
                                    <longitude_deg>
26
                                        <_nullIf>
27
                                            <null>0</null>
28
                                            <type>float</type>
29
                                            <value>$Longitude</value>
30
                                        </_nullIf>
31
                                    </longitude_deg>
32
                                </coordinates>
33
                            </coordinates_id>
34
                            <matched_place_id>
7
            <_simplifyPath>
8
                <next>parent_id</next>
9
                <path>
10
                    <location>
11
                        <authorlocationcode>$Name</authorlocationcode>
12
                        <locationevent>
13
                            <project_id><project><projectname>$Site Name</projectname></project></project_id>
14
                            <obsenddate><_dateRangeEnd><value>$CollectionDate</value></_dateRangeEnd></obsenddate>
15
                            <obsstartdate><_dateRangeStart><value>$CollectionDate</value></_dateRangeStart></obsstartdate>
16
                        </locationevent>
17
                        <locationplace>
18
                            <place_id>
35 19
                                <place>
36
                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
37 20
                                    <coordinates_id>
38 21
                                        <coordinates>
39
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
40 22
                                            <latitude_deg>
41 23
                                                <_nullIf>
42 24
                                                    <null>0</null>
......
53 35
                                            </longitude_deg>
54 36
                                        </coordinates>
55 37
                                    </coordinates_id>
38
                                    <matched_place_id>
39
                                        <place>
40
                                            <source_id><source><shortname>geoscrub</shortname></source></source_id>
41
                                            <coordinates_id>
42
                                                <coordinates>
43
                                                    <source_id><source><shortname>geoscrub</shortname></source></source_id>
44
                                                    <latitude_deg>
45
                                                        <_nullIf>
46
                                                            <null>0</null>
47
                                                            <type>float</type>
48
                                                            <value>$Latitude</value>
49
                                                        </_nullIf>
50
                                                    </latitude_deg>
51
                                                    <longitude_deg>
52
                                                        <_nullIf>
53
                                                            <null>0</null>
54
                                                            <type>float</type>
55
                                                            <value>$Longitude</value>
56
                                                        </_nullIf>
57
                                                    </longitude_deg>
58
                                                </coordinates>
59
                                            </coordinates_id>
60
                                        </place>
61
                                    </matched_place_id>
56 62
                                </place>
57
                            </matched_place_id>
58
                        </place>
59
                    </place_id>
60
                </locationplace>
61
            </location>
63
                            </place_id>
64
                        </locationplace>
65
                    </location>
66
                </path>
67
            </_simplifyPath>
62 68
        </path>
63
    </_simplifyPath>
69
    </_setDefault>
64 70
</VegBIEN>
65 71
Inserted 17 new rows into database

Also available in: Unified diff