All Products
Search
Document Center

MaxCompute:Table and data type mapping

Last Updated:Mar 27, 2026

This topic describes the mapping of table types and data types between MaxCompute and various data sources.

BigQuery and MaxCompute data type mapping

BigQuery type

MaxCompute type

ARRAY

ARRAY

BOOLEAN

BOOLEAN

BYTES

BINARY

DATE

DATE

DATETIME

TIMESTAMP_NTZ

Geography

STRING

INTERVAL

STRING

JSON

JSON

INT64

BIGINT

NUMERIC

DECIMAL(38, 9)

BIGNUMERIC

DECIMAL(x, y)

Note

The x and y parameters are configurable. The default is DECIMAL(38, 18).

FLOAT64

DOUBLE

RANGE

STRING

STRING

STRING

STRUCT

STRUCT

TIME

BIGINT

TIMESTAMP

TIMESTAMP

Hive and MaxCompute data type mapping

Regular columns

Hive type

MaxCompute type

BOOLEAN

BOOLEAN

TINYINT

TINYINT

SMALLINT

SMALLINT

INT

INT

BIGINT

BIGINT

FLOAT

FLOAT

DOUBLE

DOUBLE

DECIMAL

DECIMAL

STRING

STRING

VARCHAR

VARCHAR

CHAR

STRING

BINARY

BINARY

TIMESTAMP

TIMESTAMP

DATE

DATE

DATE

DATETIME

ARRAY

ARRAY

MAP

MAP

STRUCT

STRUCT

UNION

UNION

Note

The Hive 3 TIMESTAMP_NTZ type is not currently supported.

Partition key columns

  • The following types retain their original type: STRING, VARCHAR, CHAR, TINYINT, SMALLINT, INT, and BIGINT.

  • MaxCompute converts all other types to STRING.

Databricks and MaxCompute table type mapping

Databricks table type

MaxCompute table type

delta table with primary key

pk delta table

delta table without primary key

append delta table

non-delta table

append delta table

Databricks and MaxCompute data type mapping

Databricks type

MaxCompute type

BIGINT

BIGINT

BINARY

BINARY

BOOLEAN

BOOLEAN

DATE

DATE

DOUBLE

DOUBLE

FLOAT

FLOAT

INT

INT

SMALLINT

SMALLINT

STRING

STRING

TIMESTAMP

TIMESTAMP

TIMESTAMP_NTZ

TIMESTAMP_NTZ

TINYINT

TINYINT

TIMESTAMP

TIMESTAMP

ARRAY <elementType>

ARRAY <elementType>

STRUCT < fieldName [:] fieldType [not null] [collate collationName] [comment str]... >

STRUCT < fieldName [:] fieldType]... >

MAP<keyType, valueType>

MAP<keyType, valueType>

INTERVAL

Not supported

VOID

Not supported

VARIANT

Not supported

OBJECT

Not supported

Snowflake and MaxCompute data type mapping

Snowflake type

MaxCompute type

NUMBER(P,S) (S > 30)

STRING

NUMBER(P,S) (30 >= S > 0)

BIGINT

NUMBER(P,S) (S = 0)

  • BIGINT

  • Defaults to BIGINT. You can specify the parameter snowflake.treat.decimal.as.long=false to use DECIMAL(P, 0).

DOUBLE

DOUBLE

DECFLOAT

STRING

STRING

STRING

BINARY

BINARY

BOOLEAN

BOOLEAN

DATE

DATE

TIME

A STRING in HH:MM:SS.SSSSSSSSS format

TIMESTAMP_LTZ

TIMESTAMP

TIMESTAMP_NTZ

TIMESTAMP_NTZ

TIMESTAMP_TZ

TIMESTAMP_NTZ

VARIANT

JSON

ARRAY

JSON

OBJECT

JSON

ARRAY(elementType)

ARRAY<elementType>

OBJECT(fieldName fieldType, ...)

STRUCT<fieldName: fieldType, ...>

MAP(keyType, valueType)

MAP<keyType, valueType>

GEOGRAPHY

STRING

GEOMETRY

STRING

FILE

Not supported

VECTOR

Not supported

Note

MaxCompute does not support nesting JSON types within complex types. When a structured type, such as ARRAY(elementType), OBJECT(fieldName fieldType, ...) or MAP(keyType, valueType), contains a semi-structured type like VARIANT, OBJECT, or ARRAY, MaxCompute converts the nested semi-structured type to STRING. For example, MaxCompute converts OBJECT(o OBJECT) to STRUCT<o: STRING>.