concourse icon indicating copy to clipboard operation
concourse copied to clipboard

Use findOrInsert method to allow importers to handle resolve criteria

Open jtnelson opened this issue 10 years ago • 7 comments

The Import framework allows people to specify a resolve key to find existing records where data should be placed. Now that the findOrInsert method exists, extend the Import framework to take advantage by supporting resolve criteria.

jtnelson avatar Nov 09 '15 00:11 jtnelson

@jtnelson Hi! I would like to work on this ticket. Could you please guide me on this?

iamutkarshtiwari avatar Jun 05 '16 15:06 iamutkarshtiwari

https://github.com/cinchapi/concourse/blob/develop/concourse-import/src/main/java/com/cinchapi/concourse/importer/DelimitedLineImporter.java

  1. In the importFile and importString methods change the key parameter to resolveCriteria
  2. In the importFile and importString methods, add some logic to call findOrInsert instead of insert if the resolveCriteria variable is not null

jtnelson avatar Jun 05 '16 16:06 jtnelson

@jtnelson The prototype of findOrInsert takes two parameters -

  1. Criteria criteria
  2. String json

Shall I change String resolveKey to Criteria resolveCriteria in importFile and importString methods' definitions?

iamutkarshtiwari avatar Jun 05 '16 20:06 iamutkarshtiwari

keep the param as a string...there is a findOrInsert method that takes a String criteria/ccl

jtnelson avatar Jun 05 '16 20:06 jtnelson

I am getting this error while building - https://gist.github.com/iamutkarshtiwari/087cde4d0712213367e37ca7421fd73a

iamutkarshtiwari avatar Jun 05 '16 21:06 iamutkarshtiwari

oh my bad! i guided you wrong here, i'll ping you offline about a different approach for this one

jtnelson avatar Jun 05 '16 21:06 jtnelson

@jtnelson Any updates with this issue?

iamutkarshtiwari avatar Jun 07 '16 16:06 iamutkarshtiwari