[InterMine Dev] Shouldn't unique keys be enforced during data source load into production database? (They're not.)
shokin at ncgr.org
Tue Apr 12 21:16:34 BST 2016
On 04/12/2016 01:59 PM, Joe Carlson wrote:
> So, if you want 2 QTLs to be the same based on the secondaryIdentifer and organism, specify this whenever you're loading
> secondaryIdentifier and organism information.
I did. And it wasn't enforced. That's my point. I'm using the same key defs for all of my data loaders. In fact, I'm using a single
source-wide properties file for all of my sources, legfed_keys.properties. But, just to be sure, I copied the relevant key
definitions to file-cmap_keys.properties as well. Same result.
The data loader for which those two QTL objects are defined to be identical in the keys file loaded those two QTL objects into the
production database without error. I see no way to get the loader to throw an error on duplicate objects. I've defined a key so that
it should have done so. And I've seen this many times, which is what caused a lot of confusion on my part until I realized what was
It's not the end of the world, but it sure seems like a bug to me! I can write my loaders to throw exceptions if duplicate records
come up (I always load everything into maps before storing them), but I was hoping that DATASOURCE_keys.properties would handle that
during items->production loading.
More information about the dev