Data Types
The Product supports many common data formats, converting between Database, SQL, and Java data types.
The following table lists the supported data type mappings.
| Database Type | SQL Type | Java Type |
|---|---|---|
| ARRAY | SQL_VARCHAR | STRING |
|
BIGNUMERIC For BIGNUMERIC data, the connector always returns 77 for the precision and 38 for the scale. |
SQL_NUMERIC |
BIGDECIMAL |
BOOL |
SQL_BOOLEAN |
BOOLEAN |
BYTES |
SQL_VARBINARY |
BYTE[ ] |
DATE |
SQL_DATE |
DATE |
DATETIME |
SQL_TIMESTAMP |
STRING |
FLOAT64 |
SQL_DOUBLE |
DOUBLE |
|
GEOGRAPHY (See note below) |
SQL_VARCHAR |
STRING |
INT64 |
SQL_BIGINT |
BIGINTEGER |
| INTERVAL | SQL_VARCHAR | STRING |
| JSON | SQL_VARCHAR | STRING |
|
NUMERIC For NUMERIC data, the connector always returns 38 for the precision and 9 for the scale. |
SQL_NUMERIC |
BIGDECIMAL |
| RANGE | SQL_VARCHAR | STRING |
STRING |
SQL_VARCHAR |
STRING |
| STRUCT | SQL_VARCHAR | STRING |
TIME |
SQL_TIME |
TIME |
TIMESTAMP |
SQL_TIMESTAMP |
TIMESTAMP |
Note:
GEOGRAPHY data cannot be used for a GEOGRAPHY column parameter. To insert or filter on GEOGRAPHY data, you must use the generating function described in "Geography Functions in Standard SQL" in the Google Database documentation: https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions.
- SQL Connector
- Nested and Repeated Records
- Features
- Installing and Using the Product
- Configuring the Product on page 1
- Driver Configuration Options on page 1