Importing ODBC table defs

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
rdy
Participant
Posts: 38
Joined: Wed Nov 05, 2003 2:40 pm

Importing ODBC table defs

Post by rdy »

When I import an ODBC table definition, then load the column definitions into an ODBC stage, I have a problem. The "derivation" for each column includes the database name, table owner, and table name.

e.g.
Instead of having "customer_name" in the derivation, it has "dev_db.dbo.customer_tbl.customer_name".

This causes problems when I promote this job to another environment, because "dev_db" is now named "prod_db" (for example). So during my development, I have to manually edit the derivation for every database column and remove the database name so that it will work in all environments.

Is there a way to prevent this behavior?
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I'm assuming this will work as it does for the OCI stages...

Don't "Load" the metadata from inside the stage. Instead, make sure Table Definitions are showing in your Repository Browser and then drag the metadata to the link on your ODBC Stage. Doing it this way will leave the Derivation column alone.
-craig

"You can never have too many knives" -- Logan Nine Fingers
KeithM
Participant
Posts: 61
Joined: Thu Apr 22, 2004 11:34 am
Contact:

Post by KeithM »

The way that I have gotten around this problem is after I import the table definitions, I edit the table definition by removing the database name and owner from the Table/File Name field. Then when I import the columns into an ODBC stage the derivation field is just the TableName.ColumnName. It is still a little extra work but it is easier than changing every derivation for each column.
lpadrta
Premium Member
Premium Member
Posts: 38
Joined: Thu Nov 07, 2002 7:39 am
Location: Jacksonville, FL

Post by lpadrta »

Does this technique have any impact on the ability of MetaStage to detect the table meta data to construct "lineage" meta data?

Thanks,
Lynda
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Mine? Hmm... I don't really know. Be great if someone with the ability to check could do so and let us know!
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply