Data Types
The Product supports many common data formats, converting between Database, JDBC, and Java data types.
The following table lists the supported data type mappings.
| Database Type | JDBC Type | Java Type |
|---|---|---|
ARRAY |
ARRAY or VARCHAR (See UseArraySupport) |
java.sql.Array of strings or string |
BIGINT |
BIGINT |
long |
BINARY |
VARBINARY | byte[] |
BOOLEAN |
BOOLEAN |
boolean |
CHAR |
CHAR |
string |
DATE |
DATE |
java.sql.Date |
DECIMAL (p, s) |
DECIMAL |
java.math.BigDecimal |
DOUBLE |
DOUBLE |
double |
FLOAT |
REAL |
float |
|
INTEGER Note: Although Database reports integer data as type INT, the connector reports integer data as type INTEGER to ensure compatibility with standard BI tools. For more information, see Integer Support. |
INTEGER |
int |
MAP |
VARCHAR |
String |
SMALLINT |
SMALLINT |
short |
| STRING | VARCHAR |
String |
| STRUCT | VARCHAR |
String |
| TIMESTAMP | TIMESTAMP |
java.sql.Timestamp |
TINYINT |
TINYINT |
byte |
| VARCHAR | VARCHAR |
String |
Integer Support
Database combines two different implementations of the integer data type:
- In Data Definition Language (DDL) queries, Database uses the INT data type from Apache Hive.
- In all other queries, Database uses the INTEGER data type from Presto.
To support the CAST queries that are used in many BI tools, the connector reports integer data as type INTEGER even though Database reports the data as type INT.
Be aware that, when executing DDL queries, you must specify integer data using INT as the data type.
Note:
Database supports some but not all DDL statements. For a list of the supported DDL statements, see "SQL and HiveQL Reference" in the Amazon Athena API Reference: http://docs.aws.amazon.com/athena/latest/ug/language-reference.html.
- Features
- Installing and Using the Product
- Configuring the Product on page 1
- Driver Configuration Options