Can i define metadata of file columns at run time.

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
anshumangupta1206
Participant
Posts: 42
Joined: Tue Jan 24, 2006 9:11 am

Can i define metadata of file columns at run time.

Post by anshumangupta1206 »

Hi All,

I don't know whether this is possible or not , but i want to define the columns metadata at run time. My exact requirement is, i have a meta data stored in one sequential file as a data , i want this metadata should applied to other sequential file (or any other) at run time i.e the structure of new file will be decided at run time.

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

Post by ray.wurlod »

Not possible out of the box. DataStage is driven by metadata. The metadata must be in place first.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
anshumangupta1206
Participant
Posts: 42
Joined: Tue Jan 24, 2006 9:11 am

Post by anshumangupta1206 »

Hi ray,
Thanks for the guidance :D .

:idea: I am thinking if I define one column with the arbitary length say 100, read all columns data into this and picks up data from the start and end length for a particular field if required. I know for many stages processing we have to define all columns seprately, but I just want a guidance that can we think on this side if at all this is possible.

Thanks,
Ansh
ray.wurlod wrote:Not possible out of the box. DataStage is driven by metadata. The metadata must be in place first. ...
wed
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course it's possible, except that you must have a priori knowledge of the metadata to be able to design it! This doesn't just appear out of thin air!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

"i have a meta data stored in one sequential file as a data"
If this is the case you can make use of scheme file optiong to acheive a job to get metadata from the file.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
anshumangupta1206
Participant
Posts: 42
Joined: Tue Jan 24, 2006 9:11 am

Meta data stored in sequential file.

Post by anshumangupta1206 »

Kumar,
Can u through some more light what is this scheme file option.
kumar_s wrote:"i have a meta data stored in one sequential file as a data"
If this is the case you can make use of scheme file optiong to acheive a job to get metadata from the file.
wed
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

In sequential file, under Options you can find Schema file. You can give the path and name of the file which holds the metadata model for the stage.
A sample structure would be

Code: Select all

record (
name:string[255];
address:nullable string[255];
value1:int32;
value2:int32
date:date)
If you have enabled RPC (Run time column propagation), you can edit the schema file externally and can find the impact in the job without editing it.
You can find the informations under Parallel job developers guide.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ashwin141
Participant
Posts: 95
Joined: Wed Aug 24, 2005 2:26 am
Location: London, UK

Can i define metadata of file columns at run time.

Post by ashwin141 »

Hi Anshuman

Well its possible if you are having rough idea about the source metadata. We did it using a Generic stage and Orchestrate operators. Though its a complex way of doing it. It can be done. But from I will suggest you should avoid this Metadata driven approach.

Regards
Ashwin
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

So now suddenly we are giving PX solutions to Server problems? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Seems that way! :shock:
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
ashwin141
Participant
Posts: 95
Joined: Wed Aug 24, 2005 2:26 am
Location: London, UK

Can i define metadata of file columns at run time.

Post by ashwin141 »

I am sorry about that, didn't see the job type :oops:

My Apologies.

Ashwin
Post Reply