Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Store a value in the cache and update it frequently

Hi,

 

When the talent job is run, I want to store a default value (ex: 1) in the cache. I've a table which contains only one row and column. Whenever there is an update in the row (ex:2), this value needs to be updated in the talend job cache. Can you let me know how to implement in Talend?

 

Dev

Labels (2)
3 Replies
nfz11
Creator III
Creator III

You could use the Talend component tHashOutpout to store the data and tHashInput to read it.  See the documentation on these components here:

https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/LTqBBurBnnkWIPVTY769dA

TRF
Champion II
Champion II

But records strored into a tHashOutput component cannot be updated.

As you have a single row to be cached, a simple global variable should be enough for your use case.

nfz11
Creator III
Creator III

OK yeah, as  @TRF  said, if it is just one variable that you want to keep overwriting with the latest value of your column, you can use the globalMap to store it.

 

You can use the tSetGlobalVar component to do this:

https://help.talend.com/reader/wDRBNUuxk629sNcI0dNYaA/xx0nz4uGJnqyc7dKOLN4Wg

 

You can also read or write to the globalMap in a tJavaRow component.