Data type mapping from Oracle to DataStage

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
deepticr
Participant
Posts: 32
Joined: Wed Mar 19, 2008 7:01 am
Location: Bangalore, India

Data type mapping from Oracle to DataStage

Post by deepticr »

Hi,

We are using Oracle database as the source/target DB in our extraction process.

I have a particular column - ColA of datatype VARCHAR2(40 CHAR). The NLS setting of the database is UTF8.

When I use the ODBC Table Definitions to import the metadata, this column translates to NVARCHAR(160). But, when I use the Orchestrate Schema Definitions the column is read as VARCHAR(40).

Which of the above datatypes is the correct translation? Currently, we are using the development database which doesn't have multibyte data. So, either way my job runs fine.

But, when we migrate code to higher environments we might run into the risk of encountering multi byte data. So, which of the above two options is capable of handling multi byte data?

I also went through the IBM documentation on this which states VARCHAR2(n CHAR) multibyte = VARCHAR(n) in Datastage.

http://publib.boulder.ibm.com/infocente ... oracc.html

- Deepti
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

They are both correct. When you import via ODBC Connector, the ODBC driver converts to what is right for ODBC. When you import directly (or via the orchdbutil facility) you get the data type that the OCI reports. As a general rule oversizing VARCHAR data types is less likely to cause problems than undersizing them.
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