generating 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
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

generating schema file

Post by getsatish_gk »

Hi all,

How to generate schema file definition from oracle tables?.

for ex: i have table with table field information

ie., table_name field start_lenght end_lenght
t1 col1 1 4
t1 col2 5 10
t2 col1 1 2

i need to pickup this info and generate a ds schema file

can any one help with ideas/clues..

Thanks in adv.
Satish :roll:
Minhajuddin
Participant
Posts: 467
Joined: Tue Mar 20, 2007 6:36 am
Location: Chennai
Contact:

Post by Minhajuddin »

Create a table definition with the columns for which you want to create a schema file(Or import it from oracle). Open the layout tab in the table definition and click on the "parallel" radio button. This will give you the schema of that table definition. You can copy this and put in a text file to create a schema file.
Minhajuddin

<a href="http://feeds.feedburner.com/~r/MyExperi ... ~6/2"><img src="http://feeds.feedburner.com/MyExperienc ... lrow.3.gif" alt="My experiences with this DLROW" border="0"></a>
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

Hi Minhajuddin,

table name, column name and its lenght are stored in oracle table
i need to dynamically generate the schema file.

table_name field start_lenght end_lenght
t1 col1 1 4
t1 col2 5 10
t2 col1 1 2

Any idea?
:(
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

i wrote a VB macro to create a scema file for this type of requirement.
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

cool, :)

Can we do something within ds?

-Satish
keshav0307
Premium Member
Premium Member
Posts: 783
Joined: Mon Jan 16, 2006 10:17 pm
Location: Sydney, Australia

Post by keshav0307 »

yes, you can write similar code in a trasformer(may be in a routine) stage
getsatish_gk
Participant
Posts: 104
Joined: Sat Dec 24, 2005 1:26 am
Location: Bengaluru

Post by getsatish_gk »

ds routines? :cry:
this is painful :x
ameyvaidya
Charter Member
Charter Member
Posts: 166
Joined: Wed Mar 16, 2005 6:52 am
Location: Mumbai, India

Post by ameyvaidya »

Well,

you don't "Have" to write routines... Just proper use of the transformer (Stage variables and the "if... then... else..." statement in the derivations) can get what you want.
Amey Vaidya<i>
I am rarely happier than when spending an entire day programming my computer to perform automatically a task that it would otherwise take me a good ten seconds to do by hand.</i>
<i>- Douglas Adams</i>
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Re: generating schema file

Post by ray.wurlod »

getsatish_gk wrote:Hi all,

How to generate schema file definition from oracle tables?.

for ex: i have table with table field information

ie., table_name field start_lenght end_lenght
t1 col1 1 4
t1 col2 5 10
t2 col1 1 2

i need to pickup this info and generate a ds schema file

can any one help with ideas/clues..

Thanks in adv.
Satish :roll:
Import table definition from Oracle.
Open table definition.
Go to Layout tab and choose Parallel option.
Right click in background area and save as schema file.
Voila!
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
nkln@you
Premium Member
Premium Member
Posts: 271
Joined: Wed Nov 17, 2004 5:15 am
Location: US

Post by nkln@you »

Hi,
you don't "Have" to write routines... Just proper use of the transformer (Stage variables and the "if... then... else..." statement in the derivations) can get what you want.
Could anyone explain the steps involved in above

Hi Keshav
i wrote a VB macro to create a scema file for this type of requirement.
Could you post the VB code here and how to do the same in Transformer
Aim high
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Nothing shown in this thread is a DataStage schema file.

You can save schema files directly from the Table Definition record (in Manager or Designer in versions earlier than 8, in Designer in version 8 or later).
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