Page 1 of 1

Metadata from sql

Posted: Tue Sep 05, 2017 2:00 pm
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.

Posted: Tue Sep 05, 2017 3:27 pm
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?

Posted: Fri Sep 22, 2017 3:37 am
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.

Posted: Fri Sep 22, 2017 12:51 pm
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.