Need to have Input File name as Output

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
monalisa21
Participant
Posts: 12
Joined: Thu Nov 30, 2006 3:14 am
Location: India

Need to have Input File name as Output

Post by monalisa21 »

A job is reading multiple files using File Pattern.
Let my input files are A1.txt,A2.txt,A3.txt,A4.txt,A5.txt.

Input file pattern is A*.txt.

I want to have exact file name corresponding to each record read from that source file.

Output should be

COL1aa,COL2aa,A2.txt (comment:COL1aa,COL2aa read from A2.txt)
COL1bb,COL2bb,A4.txt (comment:COL1bb,COL2bb read from A4.txt)

Please help
Regards,
Monalisa
Aparna_A
Participant
Posts: 21
Joined: Wed Nov 09, 2005 11:16 pm

Post by Aparna_A »

Hi,

Include the option File Name Column available in OPTIONS in sequential file PROPERTIES tab. Then include this column name (default being fileNameColumn) in the Columns Tab.
Aparna
bkumar103
Participant
Posts: 214
Joined: Wed Jul 25, 2007 2:29 am
Location: Chennai

Post by bkumar103 »

Hi Aparna,

I didnt find the option you have mentioned.
I find following option in the option tab of sequential file(If used as output):

cleanup on failure
First line is column name
Reject mode

I find following option in the option tab of sequential file(If used as input):

First line is column name
Keep file partitions
missing file mode
Reject mode
report progress

Could you please tell, exactly where is the option.
Birendra
srinivas.g
Participant
Posts: 251
Joined: Mon Jun 09, 2008 5:52 am

Post by srinivas.g »

when u click the option tab, the right hand side it appears
Srinu Gadipudi
Aparna_A
Participant
Posts: 21
Joined: Wed Nov 09, 2005 11:16 pm

Post by Aparna_A »

Hi,
As Srinivas mentioned, the File Name Column property appears under "Available properties to Add" when you click on Options under Proerties tab.
Aparna
Post Reply