Data type mappings from InfoSphere DataStage to Java

The connector maps the InfoSphere DataStage data types to Java data types when used as a stage in DataStage jobs to read records from the Hive data source and provide them on the output link, or to read records from the input link and write them to the Hive data source.

The connector maps the DataStage data types to Java data types under the following scenarios:
  • When the connector reads records from the Hive data source, the connector retrieves the field values from the Hive driver as Java data types. To determine the Java data type to use for the value that it retrieves from the driver, the connector checks the DataStage data type of the corresponding column on the link.
  • When the connector writes records to the Hive data source, the connector provides the field values to the Hive driver as Java type values. To determine the Java data type to use for the value that it provides to the driver, the connector checks the DataStage data type of the corresponding column on the link
The following table shows the mapping rules between InfoSphere DataStage data types and Java data types:
Table 1. InfoSphere DataStage data types and their corresponding Java data types
InfoSphere DataStage data types Java data types
BigInt Long
BigInt (Unsigned) java.lang.String
Binary byte[]
Bit Boolean
Char java.lang.String
Char (Unicode) Java.lang.String
Date java.sql.Date
Decimal java.math.BigDecimal
Double double
Float float
Integer int
Integer (Unsigned) long
LongNVarChar java.sql.NClob, java.sql.Clob, java.lang.String
LongVarBinary java.sql.Blob, byte[]
LongVarChar, LongVarChar (Unicode) java.sql.NClob, java.sql.Clob, java.lang.String
NChar java.lang.String
Numeric java.math.BigDecimal
NVarChar java.lang.String
Real float
SmallInt short
SmallInt (Unsigned) int
Time, Time (Microseconds) java.sql.Time
Timestamp, Timestamp (Microseconds) java.sql.Timestamp
TinyInt byte
TinyInt (Unsigned) short
VarBinary byte[]
VarChar, VarChar (Unicode) java.lang.String
Unknown java.lang.String