0
Fixed

Duplicate Key: Add key to log message

Ross Currie 13 years ago updated by anonymous 8 years ago 3

Currently, when importing on a connector, Identity Broker will generate a duplicate key error when it encounters multiple records that have the same key. This is problematic in itself, but is exacerbated because IdB apparently drops the whole page (~1000 records) when this occurs.

The error presented is something like this:
System.ArgumentException: An item with the same key has already been added.

Given that the impact of having a single duplicate record is quite high (1000 records not imported!), it's important to find these duplicate records in the end source and to either eradicate them, or select a more appropriate key value. To this end, I request an improvement for IdB to display the duplicate key in the error message when the error is thrown. Eg,

System.ArgumentException: An item with the same key (12345) has already been added.

Or perhaps even go so far as to include the attribute(s) used in the key:

System.ArgumentException: An item with the same key (entityID:12345) has already been added.
or (in the case of multiple attribute keys
System.ArgumentException: An item with the same key - (entityID,12345):(locationID,123) - has already been added.

Resolved.

Matthew, can you please confirm this at an appropriate stage?

Thanks.

Tony, you have done most of the work around the connector side. Can you please confirm this has been resolved with your latest test set up with the CSV connector?

A connector with two 'false' boolean keys correctly failed with 'The key False has been duplicated.'