Revision 11707
Added by Aaron Marcuse-Kubitza about 11 years ago
test.xml.ref | ||
---|---|---|
19 | 19 |
<height_m>$stemHeight</height_m> |
20 | 20 |
</stemobservation> |
21 | 21 |
</plantobservation> |
22 |
<sourceaccessioncode>$STEMCOUNT_ID</sourceaccessioncode> |
|
22 |
<sourceaccessioncode> |
|
23 |
<_join> |
|
24 |
<1>$taxonImportance_ID</1> |
|
25 |
<2>$STEMCOUNT_ID</2> |
|
26 |
</_join> |
|
27 |
</sourceaccessioncode> |
|
23 | 28 |
</aggregateoccurrence> |
24 | 29 |
<sourceaccessioncode>$taxonObservation_ID</sourceaccessioncode> |
25 | 30 |
</taxonoccurrence> |
Also available in: Unified diff
bugfix: inputs/CVS/stemCount_/map.csv: ensure the aggregateoccurrence.sourceaccessioncode is always populated, because this is a required field when using sourceaccessioncodes. without it, the import will exclude rows which lack a value in this field because it cannot deduplicate on it for these rows, leading to the dropping of large numbers of occurrences. this shows up when comparing provider_count to the input table's row count, and produces the following error in the .errors table:
---
ERROR: duplicate key value violates unique constraint "aggregateoccurrence_taxonoccurrence_1_to_1"
DETAIL: Key (taxonoccurrence_id)=(1504108) already exists.
CONTEXT: SQL function "INSERT INTO aggregateoccurrence#1" statement 1
condition: sourceaccessioncode IS NULL
translated condition: "CVS.stemCount_.STEMCOUNT_ID" IS NULL
---
note that it uses the wrong unique constraint aggregateoccurrence_taxonoccurrence_1_to_1, because `sourceaccessioncode IS NULL` was true for some rows