Metadata from sql

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
taslimanka
Participant
Posts: 2
Joined: Sun Jun 25, 2017 6:49 am

Metadata from sql

Post by taslimanka »

Hi all,

I'm a DS newie so excuse my questions. In fact I'm using 2 oracle DB instances.One for input and the other for target table. I just want to query on the first DB and then write the result on the second one. But it seems that with my query (which return about 35 columns) I have to type in all of the columns (with their type). I dont want to write the target table's schema by typing in all the input columns in the OCI stage. Is there any way for DS to fill in from my sql query the list of input columns?
Thanx in advance.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

You should be importing the metadata for your source and target, then loading them into the stage, that way you don't have to manually type them in. And then yes, the source stage can automatically generate the SQL at runtime from the metadata. I have no DataStage access and it's been way too long but the 'action' to accomplish that should be fairly obvious. I'm sure someone here should be able to help with the specifics if you can't find it.

Can you verify, please, that we are actually talking about a Server job?
-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 »

CompactBI offer a bridge that will analyze SQL and convert into metadata in the Information Server metadata repository.

But importing the table definitions (or view definitions) from Oracle using the Oracle Connector and the Connector Import Wizard is a purer approach.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
UCDI
Premium Member
Premium Member
Posts: 383
Joined: Mon Mar 21, 2016 2:00 pm

Post by UCDI »

while the correct thing to do is import the metadata, this will help you for intermediate jobs where the metadata isnt in any database.

you can write a dataset from where-ever in your job and import a table def from that by going import, table defs, orchastrate and choose the dataset file. Save the table def and drop it on the link you need.

You can do this from a source or target system also but again, those should be imported correctly so this would just let you get around it for a quick fix until you can learn the correct process or get an admin to do it for you (where I am we can't do this, its governed by someone outside the developers). Just make a job with select * from / get 1 row, drop to dataset and pull the metadata off that.
Post Reply