oracle DDL vs Teradata DDL

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
iskapalli
Participant
Posts: 76
Joined: Wed Jul 25, 2007 12:36 am

oracle DDL vs Teradata DDL

Post by iskapalli »

HI,

I have a requirment where I need to convert oracle DDL to teradata DDL.

Is it possiblae? if yes can you provide me some tips.
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Hi iskapalli,
By doing what? Read a DDL-file and replace key-words?

It is probably better to analyse data-dictionary-tables on Oracle, use a mapping-table to get the corresponding data-type for Teradata as compared to Oracle and generate your DDL accordingly.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

From what little I've seen of Teradata, you don't want a direct 'port' of your Oracle tables to Teradata tables. While you certainly can, they really should be redesigned to take advantage of the unique aspects of the Teradata architecture. Your Teradata Architect or DBA should be able to provide guidance on that subject.
-craig

"You can never have too many knives" -- Logan Nine Fingers
kduke
Charter Member
Charter Member
Posts: 5227
Joined: Thu May 29, 2003 9:47 am
Location: Dallas, TX
Contact:

Post by kduke »

I seem to do this a lot. I would post examples of both. You should have tools to generate DDL from tables in existence. Next read system tables and put column names and data types and lengths in your our metadata table. Then you can probably write a SQL statement to loop thru all the columns on one table and create column and data type with length when needed. Then all you need is the create table in front of that.

Code: Select all

Select
   'Create Table Whatever ' As DdlStmt
From
   MyMetadataTable
Union All
Select
   ColName || ' ' || DataType || '(' || DataLength || ')' As DdlStmt
From
   MyMetadataTable
Something like that will get you close.
Mamu Kim
Post Reply