Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
How to generate 20 digit random SimCardNumber(int) in Talend Open Studio?
Thanks,
Dhara
Hello,
This component tRowGenerator can create an input flow in a Job for testing purposes, in particular for boundary test sets.
Please refer to this online component reference:https://help.talend.com/reader/BM9JUGjCyUoc77mebzVshw/TifKX_CgJCoB3aoxG3QqGQ
Best regards
Sabrina
Hello @dhara3010
Is this component Ok with you?
Feel free to post your issue here.
Best regards
Sabrina
Hi,
I used this component but didn't got the expected result as I needed. I used explicitly appended a number 9 to make it 10 digit number.
Thanks,
Dhara
Hello,
Could you please elaborate your case with an example with expected output values?
Best regards
Sabrina
Hi,
The maximum value of integer data type in java is 2,147,483,647. So you cannot directly create the sim number as integer type. But I have generated the random 20 digit sim number in string data type.
For this, in the sequence, I have created four columns of integer data type with values ranging from 10000 to 99999. In the tmap, I converted them to string and concatenated the values. Hope it will help to resolve your query. The component screen shots are as below.
The expression used is as below.
Integer.toString(row1.sim_number_part1)+Integer.toString(row1.sim_number_part2) + Integer.toString(row1.sim_number_part3) +
Integer.toString(row1.sim_number_part4)
If the answer has helped you, could you please mark the topic as resolved? Kudos are also welcome.
Warm Regards,
Nikhil Thampi