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
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