generate credit card using trowgenerater

Four Stars

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 ?
Regards,
R.Bharath
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.
Employee

Re: generate credit card using trowgenerater

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

What’s New for Talend Spring ’19

Join us live for a sneak peek!

Sign up now

Agile Data lakes & Analytics

Accelerate your data lake projects with an agile approach

Watch

Definitive Guide to Data Quality

Create systems and workflow to manage clean data ingestion and data transformation.

Download

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch