Data Types

The Simba Google BigQuery JDBC Connector supports many common data formats, converting between BigQuery, SQL, and Java data types.

The following table lists the supported data type mappings.

BigQuery 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 BigQuery documentation: https://cloud.google.com/bigquery/docs/reference/standard-sql/geography_functions.