Need to load the file name(source) to the table

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
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Need to load the file name(source) to the table

Post by tsktsk123 »

we have a requirement to load the file name which we use as the source to the table. can anyone help me on this? Do we need to use DS routines for this or is there any other way to do this? appreciate any help on this.

regards,
senthil
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Welcome aboard.

The Sequential File stage has a "File Name Column" property which captures the file name into the named column.

It also has a "Row Number Column" property, which is sometimes useful.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
tsktsk123
Participant
Posts: 32
Joined: Thu Dec 25, 2003 11:59 am

Post by tsktsk123 »

Hi,

Thanks for the quick response, it works well. But only issue it gives the entire path not only the filename, please let me know is there a direct way to get only the file name. We can use the fuctions to extract the file name alone, just want to check if there is any direct way of doing it using the sequential file stage(fileNameColumn) function itself.

regards,
senthil kumar
ray.wurlod wrote:Welcome aboard.

The Sequential File stage has a "File Name Column" property which captures the file name into the named column.

It also has a "Row Number Column" property, which is sometimes use ...
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

There is not.

I take it your intention is to use Field() and Count() functions?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply