I'm using an OracleInput into a tmap and the datatype shows that it's a BigDecimal in the tmap when in the OracleInput it's a NUMBER(20,0). This value will need to be matched to a string at some point so I want to convert it to a string. I've tried using intValueExact() to an int and then use CHAR to convert to a string but that doesn't seem to work in this case.
Hi
Your question is not clear, do you want to count the number of matched rows after join or count the number of rows queried from the lookup table? Can you please explain it with more details?
Thanks!
Shong
Hi
Link the tMap output to a tJavaFlex component, and you can define a counter on tJavaFlex, for example:
...tmap--out1--tJavaFlex
on tJavaFlex:
in the begin part, define a counter:
int nb_line=0;
in the main part:
i++;
in the end part, store the counter to a global variable or context variable for used later:
globalMap.put("the_total_number_of_matched_rows", counter);
//or context.counter=counter;
Shong
Hi mclarenlife, There is a work around inside the tMap itself - try using dummy column match_count for your inner join output - inside this put system variable sequence generator.... This way you will get the total count of matched rows after inner join in your tMap. I hope you got an idea for implementation. Vaibhav
Hi,
Use InnerJoin in Tmap input for your input columns and use something similar in new column in output
(Integer)globalMap.put("cnt",(Integer)Numeric.sequence("inner_join_cnt",1,1))
This will create numeric sequence "Inner_join_cnt" and put its value runtime inside "cnt" variable. You can use this variable after onSubJobOk...
I hope you got an idea.
Vaibhav
I'm using an OracleInput into a tmap and the datatype shows that it's a BigDecimal in the tmap when in the OracleInput it's a NUMBER(20,0). This value will need to be matched to a string at some point so I want to convert it to a string. I've tried using intValueExact() to an int and then use CHAR to convert to a string but that doesn't seem to work in this case.