NOTE: The |
When a Hive data type is imported, its JDBC data type is remapped according to the following table.
Tip: Data precision may be lost during conversion. You may want to generate min and max values and compute significant digits for values in your Hive tables and then compute the same in the |
Source Data Type | Supported? | Notes | ||
---|---|---|---|---|
array | Y | Array | ||
bigint | Y | Integer |
| |
binary | Y | String | ||
boolean | Y | Bool | ||
char | Y | String | ||
date | Y | Datetime | ||
decimal | Y | Decimal | ||
double | Y | Decimal | ||
float | Y | Decimal |
| |
int | Y | Integer | ||
map | Y | Object | ||
smallint | Y | Integer | ||
string | Y | String | ||
struct | Y | Object | ||
timestamp | Y | Datetime | ||
tinyint | Y | Integer | ||
uniontype | N | |||
varchar | Y | String |
Notes:
Hive Data Type | Notes | ||
---|---|---|---|
String | string | ||
Integer | bigint |
| |
Decimal | double | ||
Bool | boolean | ||
Datetime | Timestamp/string (see Notes on Datetime columns below) | Target data type is based on the underlying data. Time zone information is retained. | |
Object | string | ||
Array | string |
If you are publishing to a pre-existing table, the following data type conversions apply:
In any table cell, a Y
indicates that the append operation for that data type mapping is supported.
NOTE: You cannot append to Hive map and array column types from |
String | Integer | Datetime | Bool | Decimal | Map | Array | Out of Range error | |
---|---|---|---|---|---|---|---|---|
CHAR | Y | Y | Y | Y | Y | Y | Y | |
VARCHAR | Y | Y | Y | Y | Y | Y | Y | |
STRING | Y | Y | Y | Y | Y | Y | Y | |
INT | Y | NULL | ||||||
BIGINT | Y | n/a | ||||||
TINYINT | NULL | |||||||
SMALLINT | NULL | |||||||
DECIMAL | Y | Y | NULL | |||||
DOUBLE | Y | Y | n/a | |||||
FLOAT | Y | NULL | ||||||
TIMESTAMP | Y | |||||||
BOOLEAN | Y |
Columns in new tables created for output of Datetime
columns are written with the Hive timestamp
data type. These columns can be appended.
Datetime
values to one table as String type and to another table as Timestamp type. This type of job should be split into multiple types. The table schemas may require modification.The above issue may appear as the following error when executing the job:
Unable to publish due to datetime data type conflict in column XXXX |