Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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
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.
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.