Generate Metadata from File, then load second file?

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
wwalker
Premium Member
Premium Member
Posts: 40
Joined: Thu Mar 30, 2006 6:30 am
Location: Near Geneva, Switzerland
Contact:

Generate Metadata from File, then load second file?

Post by wwalker »

Hi guys

Just got a requirement to do the following:

Receive two files, one with the target metadata and another containing the data

- Create the table based on the supplied metadata in the first file and then insert the data in the second file.

This will need to be a generic solution, as there are planned to be many such interfaces and we would like to avoid designing one job per interface. The idea would be to have a single job to do this...

Is there a way to do this dynamically in DS Server?

Thanks in advance

Wade
Wade Walker
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Before job script to create and in job loader to load.
Need more information to answer.
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

Before job script to create and in job loader to load.
Need more information to answer.
Mike
Premium Member
Premium Member
Posts: 1021
Joined: Sun Mar 03, 2002 6:01 pm
Location: Tampa, FL

Post by Mike »

Not really the DataStage "way"... but I'm sure some kind of utility job could be cobbled together. You might have to treat the contents of each file as a single varchar column and parse out what you need.

In the long run, I think you will be much better off with a job per interface.

The utility approach will be brittle and a constant source of destabilization for your application.

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

Post by ray.wurlod »

I agree with Mike.

It may be easier to do in parallel jobs, by converting the metadata into a schema file, but it would still be brittle - what happens when you need to refer to some dynamically-created column name in an expression?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
wwalker
Premium Member
Premium Member
Posts: 40
Joined: Thu Mar 30, 2006 6:30 am
Location: Near Geneva, Switzerland
Contact:

Post by wwalker »

I also agree with Mike, and was also my concern. However, my client has decided to do this with another technology, so therefore, this is resolved on the DS side

Thanks

Wade
Wade Walker
Post Reply