One Star

generate credit card using trowgenerater

Hi ,
I want to generate customer sample data using tRowGenerater.
How to generate credit card number with 16 digits using tRowGenerater ?
Five Stars

Re: generate credit card using trowgenerater

The approach that I usually take it to create a Talend 'Routine' for data generation and add the methods that you need.
Use tRowGenerator to generate the number of rows that you need, and map your fields using tMap.
Here's a method (and helper methods) for phone numbers. You could do something similar for Credit Card numbers.
static java.util.Random random = new java.util.Random();
public static int getRandom(int max) { return random.nextInt(max + 1); }
public static int getRandom(int min, int max) {
return random.nextInt(max) + min;
public static String makePhoneNumber() {
return String.format("0%d %d", getRandom(1231, 1881), getRandom(123456, 654321));
Alternatively, you may find that there is an open source Java package that generates this type of data.

Re: generate credit card using trowgenerater

This can be done using tDataMasking which was released in Talend 6.0, as part of Enterprise Data Quality components.