One Star

Can't Work tMemorizeRows

Talend Integration Studio 4.2.2.r63143
I am trying to use the tMemorizeRows component but can't get it to work.
I put the tmemorizerows component on the main row from my input. The main row for tMemorizeRows links to my tmap.
I've set tMemorizeRows to memorise one variable called dmu and 1 row.
I want to be able to use the memorized variable in an expression for a variable in the tmap. But I can't seem to call the memorized variable.
I have tried the following
*********************
When I hit ctrl-space only ((String)globalMap.get("tMemorizeRows_1_ERROR_MESSAGE")) and ((Integer)globalMap.get("tMemorizeRows_1_NB_LINE_ROWS")) appear as options.
I don't see an option to use the variable that tMemorize should have remembered.
The variable name is dmu and it is a string. I also tried:
dmu_tMemorizeRows_1 to retrieve the value of the field dmu in the previous row as advised in the bug track describing the creation of the component.
Though the tmap is in the same subjob I also tried the usage below but no joy:

((Integer[])globalMap.get("tMemorizeRows_1_dmu"))
and tried:
((String[])globalMap.get("tMemorizeRows_1_dmu"))

I get an array out of bounds error here.
Should I be geting an option to choose my variable when I click ctrl-space in the expression editor in tmap? Or if I need to type it in manually, what syntax should I use? Or is there some problem with my job setup?
Thanks,
John.


In a different subjob, the value can be retrieve with : globalMap.get(_).
example : ((Integer[])globalMap.get("tMemorizeRows_1_ID")).
2 REPLIES
One Star

Re: Can't Work tMemorizeRows

Oh actually dmu_tMemorizeRows_1 works fine. I just needed to set number of rows to 2 for it to hold current and previous rows in memory!
Seven Stars

Re: Can't Work tMemorizeRows

Hi ,
The array out of bound error occurs when the row count in tmemorizerows is set to 1 or 0 ,Please check whether the row count to memorize rows is set to 2 
Thanks and Regards,
s.kasthuri rengan