Schema 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
naveen.p
Participant
Posts: 55
Joined: Sat Nov 21, 2009 5:19 am
Location: Chennai

Schema File

Post by naveen.p »

Hi,

How to convert a Schema dynamically into a Datastage Parallel Schema File Format.

Thanks
Naveen
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Re: Schema File

Post by jwiles »

naveen.p wrote:Hi,

How to convert a Schema dynamically into a Datastage Parallel Schema File Format.

Thanks
Naveen
What type of schema is it--that is, what created it, what format is it in, etc.? For what purpose? Any example you can show?

The point here: It's impossible to accurately answer the question without enough input information.
- james wiles


All generalizations are false, including this one - Mark Twain.
naveen.p
Participant
Posts: 55
Joined: Sat Nov 21, 2009 5:19 am
Location: Chennai

Post by naveen.p »

Hi

I would like to know if the file is created by

SQL or a Simple Text File which contains the metadata information.

Thanks

Naveen
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

naveen.p wrote:Hi

I would like to know if the file is created by

SQL or a Simple Text File which contains the metadata information.

Thanks

Naveen
An Orchestrate Schema definition is a simple text file, the format of which is documented in the Parallel Job Developer's Guide (Appendix A, I believe).

The DataStage Designer Client provides the ability to import metadata from various sources into Table Definitions, from which you can extract the Orchestrate schema definition. The Parallel Job Tutorial document gives an example of importing metadata.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
naveen.p
Participant
Posts: 55
Joined: Sat Nov 21, 2009 5:19 am
Location: Chennai

Post by naveen.p »

Hi

I would like to know how this can be done dynamically without the help of manual intervention.

Schema file is received which is very often changed and this should be handled in Datastage Job.

Currently i have created a schema file to read the sequential file but in future if there is any change in the metadata then how should it be handled.

Thanks,

Naveen
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post by jwiles »

naveen.p wrote:Hi

I would like to know how this can be done dynamically without the help of manual intervention.

Schema file is received which is very often changed and this should be handled in Datastage Job.

Currently i have created a schema file to read the sequential file but in future if there is any change in the metadata then how should it be handled.

Thanks,

Naveen
Again, I ask: What type of schema file is it that you're receiving? Is it an Orchestrate schema or is it something else?

In your sequential file stage, or in a column import stage, you can specify an Orchestrate schema file (text) to use to read your data. This is how you can dynamically control what schema is used to read the source data.

If the schema you are being sent is NOT an Orchestrate schema file, you will need create an external process (script, Server Basic routine, C/C++ program, datastage job, person, etc.) that will do the conversion to the Orchestrate schema format and save it as a text file for the job to use.

If the source is a delimited-column text file of some sort, perhaps the column names could be passed in the first row of the data and a later transformer/buildop/etc. can be used handle datatype conversions.

Regards,
- james wiles


All generalizations are false, including this one - Mark Twain.
naveen.p
Participant
Posts: 55
Joined: Sat Nov 21, 2009 5:19 am
Location: Chennai

Post by naveen.p »

Hi,

Its not an Orchestrate Schema file.

So we have to convert the using an External Process to Orchestrate Schema File.

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

Post by ray.wurlod »

It's not a difficult routine to write, provided that your script is in some standard form such as ANSI-compliant SQL.
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