cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Snap for h2 database

ashlam
New Contributor

Hi,

I have created a custom snap to connect to h2 database and its working except Ultra.So I added lineage code like below.

	      Map<String, Object> data = new LinkedHashMap<>();
		data.put("Value", result);
		Document seed = documentUtility.newDocument(data);
	         Document newDocumentWithLineage = documentUtility.newDocument(seed,originalDocument);
		outputViews.write(seed,originalDocument);

It is giving output in ultra but the problem is,it is iterating for 5 times as its not getting ackowledge message from JMS que.Attaching the stack trace.Please advice me on this issue.

Thanks and Regards,
Ashlam

log.txt (19.8 KB)

2 REPLIES 2

tstack
Former Employee

Can you try removing this line:

Document newDocumentWithLineage = documentUtility.newDocument(seed,originalDocument);

When you write to the output view with the original document, as in the following line, it should take care of establishing the lineage:

outputViews.write(seed,originalDocument);

ashlam
New Contributor

Hi TIm,

Thanks for your response and the solution you gave worked.

Thanks & Regards,
Ashlam