Monday, 18 August 2014

Talend Reject Records

talend Reject Records Capturing


The following post will explain how to capture the reject records from input flow. Lets see capturing reject records from tFileInputDelmited component.


Step 1: Create file with following content

id;CustomerName;RegisterTime
1;Griffith Paving and Sealcoatin;2001-01-17 06:26:40.000
2;Bill's Dive Shop;2002-06-07 09:40:00.000
3;Bill's Dive Shop;2002-06-07 09:40:00.000
3;Childress Child Day Care;1990-04-01 21:00:00.000
4;Facelift Kitchen and Bath;1972-04-23 18:00:00.000
5;Terrinni & Son Auto and Truck;1982-04-19 10:26:40.000
6;Kermit the Pet Shop;2006-05-27 17:00:00.000
7;Tub's Furniture Store;1970-03-27 23:08:16.000
8;Toggle & Myerson Ltd;2005-08-02 01:26:40.000
9;Childress Child Day Care;1994-05-03 11:13:20.000
10;Elle Hypnosis and Therapy Cent;1975-06-10 20:20:00.000
11;Lennox Air Pollution Control;1983-02-26 17:08:16.000
12;Keyth Contracting and Repair;2001-09-10 11:01:36.000
13;Park District Of America;2005-10-02 00:34:56.000
14;Nirabi Auto Service;1997-02-18 21:06:40.000
15;Darcy Frame and Matting Servic;2001-01-07 20:40:00.000
16;Glenwood Credit Union;2003-12-03 19:08:16.000
17;Gourmet the Frog;1983-01-31 22:26:40.000
18;Acturial Enterprises Ltd.;2004-05-31 15:00:00.000
19;Salt & Pepper Catering Service;2006-01-24 10:53:20.000




Step 2: Create Metadata for the above file

Configure metadata like following


Step 3: Create job using this metadata

Create job like following
To create job Right Click on Job Designs and choose Create Job


Step 4: Design job using with metadata

  1. Drag and drop configured metadata "customer" to job select "tFileInputDelimited"
  2. Drag two tLogRow components from panel to job
  3. Connect the tLogRow components with main connection and reject connection 
Design job like following




Step 5: Execute the job

Execute job using with "F6" or "Run" button.
After execution of job you will get 20 records in main flow and 0 records for rejection flow because you don't have reject as per records

Step 6: Change the records in file against the schema

Change some records against to the schema like following

id;CustomerName;RegisterTime
ab;Bill's Dive Shop;2002-06-07 09:40:00.000
4;Childress Child Day Care;07-09-20007 09:40:00


Step 6: Execute job again



Execute job using with "F6" or "Run" button.
After execution of job you will get 18 records in main flow and 2 records for rejection flow.

No comments:

Post a Comment