Page 1 of 1

how to validate data

Posted: Tue Mar 22, 2011 4:19 am
by tanaya.deshpande@tieto.co
Hi

My source columns are varchar ,decimal and Numeric
how can I validate them in transformer...

Posted: Tue Mar 22, 2011 4:28 am
by abhilashnair
What exactly is your requirement? What is the stage you are using to read the data ? What is the target? Please provide more details

Posted: Tue Mar 22, 2011 4:31 am
by tanaya.deshpande@tieto.co
My source is a .csv file which I am reading from sequential stage
I guess I will need to validate them in transformer stage..
my target is a DB2 stage

Posted: Tue Mar 22, 2011 4:40 am
by abhilashnair
Are the column data types of the target DB2 in sync with your source data? If yes, you can just import the metadata and do a straight move. If there are any not null fields in your target, you may need to handle nulls in transformer before loading the DB2.

Posted: Tue Mar 22, 2011 5:41 am
by tanaya.deshpande@tieto.co
actualy this is the requirement ..I need to show that the data coming from source file is valid..

Posted: Tue Mar 22, 2011 5:52 am
by samyamkrishna
Do you know what is the valid data or is there any requirement saying what exactly is valid data. Based on what the requirement is you have to do the validation.

So what exactly is Valid data for you?

Posted: Tue Mar 22, 2011 6:51 am
by chulett
Make use of the IsValid() function. That and ask yourself - what does an invalid varchar look like?

Posted: Tue Mar 22, 2011 3:45 pm
by ray.wurlod
Business rules!! You need to become aware of the business rules that you have to enforce (for example a person's name may not contain a numeric character) and then implement these using DataStage logic. There is no "one size fits all" solution.