Revision 10941
Added by Aaron Marcuse-Kubitza about 11 years ago
inputs/VegBank/stemlocation_/postprocess.sql | ||
---|---|---|
3 | 3 |
SELECT create_if_not_exists($$ALTER TABLE $$||:table_str||$$ ADD PRIMARY KEY ("stemlocation_id")$$); -- runtime: 0.1 s ("Time: 74.164 ms") @starscream |
4 | 4 |
|
5 | 5 |
|
6 |
SELECT mk_derived_col((:table_str, 'individualID'), $$stemlocation_id$$) ; -- runtime: ~0 ("Time: 1.562 ms") @starscream |
|
7 |
|
|
6 | 8 |
SELECT mk_derived_col((:table_str, 'aggregateOrganismObservationID'), |
7 | 9 |
$$_join("taxonimportance_id"::text, "stemcount_id"::text)$$) |
8 | 10 |
; -- runtime: 0.5 s ("Time: 441.059 ms") @starscream |
inputs/VegBank/stemlocation_/map.csv | ||
---|---|---|
9 | 9 |
stemtaxonarea,*stemtaxonarea,, |
10 | 10 |
emb_stemcount,*emb_stemcount,, |
11 | 11 |
stemlocation_id,stemID,, |
12 |
stemlocation_id,individualID,, |
|
13 | 12 |
stemcode,UNUSED#stemcode,, |
14 | 13 |
stemxposition,UNUSED#stemxposition,,"""The X-coordinate of the stem position in m"" (stemXPosition definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemlocation&entity=dba_tabledescription&where=where_tablename>)" |
15 | 14 |
stemyposition,UNUSED#stemyposition,,"""The Y-coordinate of the stem position, as above"" (stemYPosition definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemlocation&entity=dba_tabledescription&where=where_tablename>)" |
16 | 15 |
stemhealth,*stemhealth,,this *is* populated |
17 | 16 |
emb_stemlocation,*emb_stemlocation,, |
18 | 17 |
aggregateOrganismObservationID,aggregateOrganismObservationID,, |
18 |
individualID,individualID,, |
inputs/VegBank/stemlocation_/VegBIEN.csv | ||
---|---|---|
1 | 1 |
VegBank,VegBIEN:/_setDefault:[source_id/source/shortname/_env:[name=source]]/path/_simplifyPath:[next=parent_id]/path,Comments |
2 |
stemlocation_id,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
|
|
2 |
individualID,"/location/iscultivated/_or/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
|
|
3 | 3 |
stemcount,/location/locationevent/taxonoccurrence/aggregateoccurrence/count, |
4 |
stemlocation_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode/_first/2,
|
|
4 |
individualID,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/sourceaccessioncode/_first/2,
|
|
5 | 5 |
stemdiameter,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/diameterbreastheight_m/_cm_to_m/value,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)" |
6 | 6 |
stemheight,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/height_m,"""The measured height of the stem in meters"" (stemHeight definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)" |
7 | 7 |
stemlocation_id,/location/locationevent/taxonoccurrence/aggregateoccurrence/plantobservation/stemobservation/sourceaccessioncode, |
8 | 8 |
aggregateOrganismObservationID,/location/locationevent/taxonoccurrence/aggregateoccurrence/sourceaccessioncode, |
9 |
individualID,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/1/_if[@name=""if individual""]/cond/_exists", |
|
9 | 10 |
stemlocation_id,"/location/locationevent/taxonoccurrence/authortaxoncode/_if[@name=""if in plot""]/then/_first/1/_if[@name=""if individual""]/cond/_exists", |
10 |
stemlocation_id,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
|
|
11 |
individualID,"/location/locationevent/taxonoccurrence/iscultivated/_alt/1/_if[@name=""if TaxonOccurrence""]/cond/_exists",
|
|
11 | 12 |
aggregateOrganismObservationID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/cond/_exists", |
12 |
stemlocation_id,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else/_first/2",
|
|
13 |
individualID,"/location/locationevent/taxonoccurrence/sourceaccessioncode/_first/2/_if[@name=""if organism in AggregateOccurrence""]/else/_first/2",
|
|
13 | 14 |
emb_stemcount,,** No join mapping for *emb_stemcount ** |
14 | 15 |
emb_stemlocation,,** No join mapping for *emb_stemlocation ** |
15 | 16 |
stemcode,,** No non-empty join mapping for UNUSED#stemcode ** |
inputs/VegBank/stemlocation_/test.xml.ref | ||
---|---|---|
12 | 12 |
<aggregateoccurrence> |
13 | 13 |
<count>$stemcount</count> |
14 | 14 |
<plantobservation> |
15 |
<sourceaccessioncode>$stemlocation_id</sourceaccessioncode>
|
|
15 |
<sourceaccessioncode>$individualID</sourceaccessioncode>
|
|
16 | 16 |
<stemobservation> |
17 | 17 |
<diameterbreastheight_m><_cm_to_m><value>$stemdiameter</value></_cm_to_m></diameterbreastheight_m> |
18 | 18 |
<height_m>$stemheight</height_m> |
inputs/VegBank/stemlocation_/new_terms.csv | ||
---|---|---|
2 | 2 |
taxonimportance_id,aggregateOrganismObservationID__taxon_presence,, |
3 | 3 |
stemdiameter,diameterBreastHeight_cm,,"""The diameter of the stem in centimeters"" (stemDiameter definition at <http://vegbank.org/vegbank/views/dba_tabledescription_detail.jsp?view=detail&wparam=stemcount&entity=dba_tabledescription&where=where_tablename>)" |
4 | 4 |
stemlocation_id,stemID,, |
5 |
stemlocation_id,individualID,, |
Also available in: Unified diff
inputs/VegBank/stemlocation_/: translated one-to-many mappings 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