Page 1 of 1

Handling run time meta data

Posted: Wed May 19, 2010 11:39 pm
by dineshrk
Hi,

We have a requirement like to have a generic job that handles taking data from a source ( here it is sql db) at run time. Here my question is whether is there any possibility to define metadata at run time, i mean to have a single job which can be used to extract data from different tables having different meta data.
if so please guide me in detail.
Regards,
Dinesh

Re: Handling run time meta data

Posted: Thu May 20, 2010 1:03 am
by kiran259
Use RCP in the Input DB stage , parameterize the query and pass it at runtime(you may use parameter set)
But the good way is to create separate jobs for better maintainence.

Re: Handling run time meta data

Posted: Thu May 20, 2010 1:35 am
by dineshrk
Hi,

if i am wrong please excuse, i understand that we can parameterize the query, but how do we go for metadata parameterization.
what i mean here is, as metadata is unique for each table and how do we download the metadata dynamically at run time.

Regards,
Dinesh

Posted: Thu May 20, 2010 2:27 am
by ShaneMuir
As Kiran points out you use RCP. By selecting this datastage will automatically read in all the columns from the input stage/table/query.

As to what it selects will depend on your settings, query and the type of input stage. EG if you have a define statement saying select * from table with RCP turned on, it will extract all fields from that table. You may then have to surface different fields to assign them as key values (and you may have to find ways to parameterise the key values if they are different between tables).

I suggest you investigate and try using RCP and return if you have any further questions

Posted: Thu May 20, 2010 3:38 am
by dineshrk
thank you, now i have an idea to proceed further.

i will get back to you for any issues, once again thanks a lot....

Posted: Thu May 20, 2010 7:27 am
by ray.wurlod
With RCP you can use SELECT * FROM #schema#.#tablename#
You get all rows and all columns of course.