Code generation from datastage to SQL
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 56
- Joined: Fri Sep 21, 2007 9:10 am
- Location: Bangalore
Code generation from datastage to SQL
Hi All,
I have a very challenging question, it may be bold but it will be very helpful & effective solution if its possible/available;
My question is:-
1) Is it possible to convert datastage code of the entire job to SQL code in script? I doubt there's no such convertor tool as of now
2) Also, Is it possible to convert mapping specifications/requirements sheet in to SQL script? Here, may be we have to design the mapping sheet first in such a way that it can be convertible automatically to SQL script.
Please share your ideas on this, let me know if any tools can be made use of?
We require this, as our ETL process is performing bad compared to ELT. We are going to convert ETL jobs to SQL scripts to do transformations.
Thanks in advance,
Yusuf
I have a very challenging question, it may be bold but it will be very helpful & effective solution if its possible/available;
My question is:-
1) Is it possible to convert datastage code of the entire job to SQL code in script? I doubt there's no such convertor tool as of now
2) Also, Is it possible to convert mapping specifications/requirements sheet in to SQL script? Here, may be we have to design the mapping sheet first in such a way that it can be convertible automatically to SQL script.
Please share your ideas on this, let me know if any tools can be made use of?
We require this, as our ETL process is performing bad compared to ELT. We are going to convert ETL jobs to SQL scripts to do transformations.
Thanks in advance,
Yusuf
Re: Code generation from datastage to SQL
Or maybe you have badly designed ETL jobs?yousuff1710 wrote:We require this, as our ETL process is performing bad compared to ELT. We are going to convert ETL jobs to SQL scripts to do transformations.
If your jobs are just a straightforward lookup to a table in the same DB and schema then it is quite possible that SQL would be faster.
But if you were doing anything more complex than that (ie multiple transformations, conditional changes to data etc) a well designed ETL job should be quicker.
Of course each scenario is different, and a judgement call needs to be made each time. There are many factors which can make an ETL job 'slow' when compare to a purpose built SQL process, (eg network speeds, o/s storage, memory availability, data volumes etc)
But to answer your question - not that I am aware of. There are methodologies out there which do similar to what you suggest, but they rely on the requirement for the SQL design being known before development begins. (ie they are purpose built in SQL).
-
- Participant
- Posts: 56
- Joined: Fri Sep 21, 2007 9:10 am
- Location: Bangalore
I'm going to agree with Shane's first question if you feel the need to use SQL to 'do transformations'. Has your company considered bringing in someone to review your job designs and ETL methodologies? Seems like it might be a prudent investment before spending time and money on an alternate plan when you already have an investment in a tool more than capable of doing the job.
Your issue could also be aggravated but running a very old version of the product that upgrading could help with in you really are running an 8x release. And of course hardware and topology play a part here.
I'm not aware of any such methodologies.
Your issue could also be aggravated but running a very old version of the product that upgrading could help with in you really are running an 8x release. And of course hardware and topology play a part here.
I'm not aware of any such methodologies.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Just to be clear, when I mentioned methodologies - I was referring to using SQL to do transformations in conjunction with ETL tools (eg use Datastage to load all your data into canonical models in the same db as your mapping tables, then create view which performs those mappings to use as the inputs into subsequent load DS jobs). I was not referring to a methodology to convert DS jobs to SQL.
-
- Participant
- Posts: 56
- Joined: Fri Sep 21, 2007 9:10 am
- Location: Bangalore
I would second Craig's suggestion.chulett wrote:Has your company considered bringing in someone to review your job designs and ETL methodologies? Seems like it might be a prudent investment before spending time and money on an alternate plan when you already have an investment in a tool more than capable of doing the job.
Choose a job you love, and you will never have to work a day in your life. - Confucius
I wrote something like this for BellSouth. They were converting from DataStage to Oracle stored procedures. I wrote it in BASIC. I doubt if it would work now even if I had the code. That was version 6 of server.
I would imagine you could do something similar by exporting your jobs to XML. Then you need to parse your XML. I would name the cursor the same name as the link then formulas in the transforms would work. Any calls to DataStage functions would have to be hand coded. They could not run the code generated but they could read it and understand it enough to take it and write the new Oracle from reading it. Saved lots of time. The jobs back then were not complex and had just a few stages.
So every source stage becomes a cursor with a loop around it. I lookup was a lookup cursor. The transforms were done by just setting variables equal to the derivations. The variables were created from the target table. So you have figure out data types from what is in the XML. I created a lookup. So a 1 got translated into char and a 2 into a varchar as examples.
Good luck. Not a simple task. I would optimize yur jobs before I would do this.
I would imagine you could do something similar by exporting your jobs to XML. Then you need to parse your XML. I would name the cursor the same name as the link then formulas in the transforms would work. Any calls to DataStage functions would have to be hand coded. They could not run the code generated but they could read it and understand it enough to take it and write the new Oracle from reading it. Saved lots of time. The jobs back then were not complex and had just a few stages.
So every source stage becomes a cursor with a loop around it. I lookup was a lookup cursor. The transforms were done by just setting variables equal to the derivations. The variables were created from the target table. So you have figure out data types from what is in the XML. I created a lookup. So a 1 got translated into char and a 2 into a varchar as examples.
Good luck. Not a simple task. I would optimize yur jobs before I would do this.
Mamu Kim