How to seperate two diff datatypes and load it into two files?

I have a source file1 consist of two datatypes
file1:
no(integer)
1
2
3
&
dept(char)
cs
it
ie
and i want to seperate these two datatypes and load it into target files
file2 & file3.
how can i do this in datastage and by using which stage?

Questions by premox5   answers by premox5

Showing Answers 1 - 9 of 9 Answers

Lubna Khan

  • Jan 27th, 2014
 

In Transformer stage there is one function IsInteger and IsChar , We can identify If IsInteger (column name) then file1 else file2

I think this Question is to confuse the Job Aspirant by using Datatypes and all...
Its very simple... File1-->2 Columns. 1.NO(Integer) 2.DEPT(Char). Target1: NO(Integer), Target2: DEPT(Char).

Take a Copy stage and Draw 2 output links.
In One Output, Map only 1Column i.e NO(Integer)
In 2nd Output, Map Only 1Column i.e DEPT(Char).

Simple mapping and there is no need to use "Transformer Stage".

Correct me if I was wrong...

Cheers...
Dileep J.

lalit

  • Oct 10th, 2017
 

So you can do it with transformer constraints like
allnum(), alpha() like function and separate both datatypes in two different outputs

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions