Translate to your Language

Wednesday, December 19, 2012

Datastage Error and reject record Handling simplified

by Unknown  |  in Datastage at  3:07 AM


  The error and reject capturing is one of the best practices that I recommend to all developers, let me explain in a very simple way

Rejects: Rows that fail active or passive business rule give in the job design

Error: Rows which contains bad data, such as values too large for a column or text

Let’s look at an example here

Consider the following source file

Row id
Emp FName
Emp LName
EMP No
EMP Dep
1
John
Beck
2001
A
2
Mike
Morry
2002
A
3
Kevin
Peter
2003
B
4
Steve
Morry
2004
B
5
Jim
Chen
abcd
A

As per the business requirement, only Employee department “A” information’s should be loaded in the target table and Employee Number should number

Reject:
So these two records will be in the reject file as it’s Emp Dep is “B”

Row id
Emp FName
Emp LName
EMP No
EMP Dep
3
Kevin
Peter
2003
B
4
Steve
Morry
2004
B

Error:
This particular record will be in the error file as the Emp No is non-numeric

Row id
Emp FName
Emp LName
EMP No
EMP Dep
5
Jim
Chen
abcd
A


As a best practice, we should load the error record in to a table for further analysis or reporting purpose. Here is one sample layout which contains


Error Id
Error F Name
Error S name
EMP No
Error Dte
10002
Emp No
Input File
 Name
abcd
12/12/2011

1)     A unique error record number
2)     Error Field name
3)     Error Source File or Table(if you are extracting from a raw table) name
4)     Error Field Name
5)     Date when the record processed

Here is how it will look in the Datastage

1 comment:

  1. Can you please explain what is further done with the reject file and error file? Or what are the possible ways we can use them?

    ReplyDelete

© Copyright © 2015Big Data - DW & BI. by