hi All,
i have one scenario like if

source--->transformer-->2 target sequential files

the 1 st target sequential file is loads the data from
source
and 2nd target sequntial file contain the 1st target total
record count,and file name of 1 st target seq file and
timestamp seperated by delimeter

for example if source have 10 record the 1st target seq
file hav 10 records
and
2nd target seq file example
10|xyz.txt|20101110 00:00:00

could you please help me out how can i implement in
datastage job.

Answers were Sorted based on User's Feedback



hi All, i have one scenario like if source--->transformer-->2 target sequential files ..

Answer / bharath

Hi,
in derivation for seq2 give as follows,
for file name give job parameter as file name and datatype is char..
for timestamp give Current CurrentTimestamp()
for count rows it is not not possible by using transformer
it can be achieved by adding another stage
that is aggregation stage..

Is This Answer Correct ?    8 Yes 2 No

hi All, i have one scenario like if source--->transformer-->2 target sequential files ..

Answer / ankita, cgi

Hi,
I have tried to get this output, i got the idea upto some
extent,
Could you please Elaborate your solution? how to get this
exact output, i.e., (10|xyz.txt|20101110 00:00:00), except
count.

Thanks in Advance.

Is This Answer Correct ?    0 Yes 0 No

hi All, i have one scenario like if source--->transformer-->2 target sequential files ..

Answer / kirill lychagin

I managed to make such job in IIS 8.5, but i think it can be reproduced in all 8.* versions/

Main question is how to get rows count in transformer. In general it can't be done. But we have sequential file stage as target.

So my solution:
1) name of 1st target file is job parameter.
2) on link to 2nd target file we add to columns:
FNAME=#FIRSTTARGETFILE# - name of 1st target file
ROW_NUM=@INROWNUM - number of input row
3) on input link to 2snd sequntial file set Collector Type=Ordered and set ROW_NUM as sort key column
4) Then in 2nd Sequntial File Stage at tab Properties add "Filter" in Options category and write there "head -n 1"

Profit!

SO the idea is to get column num in transformer and apply unix style filter (mks on Windows) on output to Seq File.

Is This Answer Correct ?    0 Yes 0 No

hi All, i have one scenario like if source--->transformer-->2 target sequential files ..

Answer / akila

Pass the name of the file in a parameter, say p1.If your
count of rows flowing through the transformer is not huge,
the run the transformer in sequential stage and pass
@INROWNUM:'|':p1:'|':DSJobStartTimeStamp as a value of a
field. Add a tail stage in between the transformer and the
2nd file. In the tail stage, input 1 as the count of
records.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Data Stage Interview Questions

Can you explain tagbatch restructure operator?

0 Answers  


what is difference between migration project and integration project? can anyone explain with the example Thanks in advance

2 Answers   Satyam,


what is mapping lookup

1 Answers  


What is ibm datastage flow designer?

0 Answers  


How many nodes supported by a one cpu in parallel jobs?

3 Answers   IBM,


how to find out number of records imported into source file?

1 Answers  


how to find no.of records in sequntial file itself?

4 Answers  


disign the complex job in u r project?(they are aksing only complex job design and then data flow...)

0 Answers  


1)What is ur project architecture ? 2)how to move project from developement to uat? 3)What is the difference between datastage 6,7.1 and datasttage 7.5? 4).How to do error handling in datastage? 5)3.Whta is unit testing, system testing and integration testing? 6)What is the Exact difference between BASIC Transformer and NORMAL Transformer?When we will go for BASIC Or NORMAL Transformer 7)why we use third party tools in datastage? 8)What is the purpose of Debugging stages? In real time Where we will use?

6 Answers   CTS, HCL, IBM, Wipro,


Give an idea of system variables.

0 Answers  


tab1 tab2 1,a 1,d 2,b 3,c perfoms outerjoin what is the o/p? write sql query for outerjoin?

3 Answers   Infotech,


In my project source data comes from MAINFRAME in files.so,This time data is coming as a binary file...I know for binary data we use Complex flat file stage..I have used it also..but on 'view data' data is not coming correctly..as it in MAINFRAME.give me some ideas..

2 Answers  


Categories