Page 1 of 1

Updating Cloudant documents via Hierarchical Data stage

Posted: Fri Mar 04, 2016 2:00 pm
by rjhankey
I have a job that reads data from DB2, then uses the Hierarchical Data stage to compose JSON and insert those documents via a REST step into Cloudant. That's all working great!

When I want to run the job a second time -- I'm going to be getting quite a few document IDs that Cloudant has already seen, so I need a way to lookup the current rev level of each Cloudant doc ID in order to cause those operations to behave as updates instead of inserts.

I currently have a DB2 stage feeding a transformer, which then relays the data to the Hier Data stage. Can I leverage an additional REST step in the assembly that takes the incoming docID and looks up the rev before passing the JSON to the REST step that handles the Cloudant load? Or, is there a better way to skin this cat?

Thanks!