Project

General

Profile

« Previous | Next » 

Revision 3207

VegBIEN: Fixing import issue related to duplicate entries in tables with children, where when a new table entry duplicates an existing entry, the 1:1 tables of that table and those tables' children are not merged, causing them to become orphaned. It is described in detail at <https://projects.nceas.ucsb.edu/nceas/projects/bien/wiki/Import_issues#Merging-duplicates-with-children&gt;, including the rationale for this solution. Note that this is not a bug in column-based import, it applies to row-based import as well. This commit fixes the issue for locationevent->location in plots data, by also mapping locationevent's unique keys to location.sourceaccessioncode and setting location.datasource_id.

View differences:

VegBIEN.plots.csv
37 37
soil_Na,"/soilobs/sodium/_units:[default=""%"",to=]/value",
38 38
soil_texture,"/soilobs/texture/_units:[default=""%"",to=]/value",
39 39
Temp,/temperature,
40
SiteCode,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/authorlocationcode,Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
41
PlotID,:[datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/sourceaccessioncode,"Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
40
SiteCode,":[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{authorlocationcode,*_id/location/sourceaccessioncode/_merge/2/_alt/2}",Brad: plotCode is as-assigned by data provider; guranteed to be unique only within dataset (=project)
41
PlotID,":[./{.,*_id/location}/datasource_id/party/organizationname/_alt/2=$/_ignore/inLabel]/{sourceaccessioncode,*_id/location/sourceaccessioncode/_merge/2/_alt/1}","Brad: This is artificial internal database ID; a unique identifier within SALVIAS DB to each plot, within the table plotMetadata."
42 42
AccessCode,,** No input mapping for AccessCode ** 
43 43
ElevSource,,** No input mapping for ElevSource ** 
44 44
Habitat,,** No input mapping for Habitat ** 

Also available in: Unified diff