Can Build Stage read a file?

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
Nagin
Charter Member
Charter Member
Posts: 89
Joined: Thu Jan 26, 2006 12:37 pm

Can Build Stage read a file?

Post by Nagin »

I have a job sequence which has an execute command stage looking for a specific file pattern, and when the file is found another job is invoked to load the file into the database after applying transformations.

So far, files have been coming in from two different sources with same metadata. Now, as the requirement changed one of the source files metadata slightly changed. Now, its bringing in couple of columns more than earlier. But file name pattern is same as earlier.

So, what I am trying to do is, read the file on the server and depending on how many columns it has or depending on the kind of data it has i want to direct it to different stages.

Now, if i chose Build stage rather than doing this through a shell script, would I be able to read the file in to the Build Stage with out specifying the metadata?

I appreciate your thoughts/input on this.

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

Post by ray.wurlod »

Yes, but you could do that with regular stage types as well. For example you could read the file with each line being a single VarChar column, and parse it within the job, possibly with an appropriate Column Import stage, possibly with a Transformer stage.

Or, particularly if there are not too many different formats, you could create copies of the job and have one for each fully-defined metadata format. That's the way I'd prefer to go.
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