Data types

更新时间:
复制 MD 格式

This topic describes the data types that FeatureStore supports and the data type mappings between FeatureStore and various data sources.

Basic data types

FeatureStore supports the following basic data types.

Data type

Description

INT32

A 32-bit signed integer.

INT64

A 64-bit signed integer.

FLOAT

A 32-bit binary floating-point number.

DOUBLE

A 64-bit binary floating-point number.

STRING

A string.

BOOLEAN

A Boolean type.

Valid values: True and False.

TIMESTAMP

A timestamp type.

Note

If you use the FeatureStore Flink connector to write data, the unit is milliseconds.

Complex data types

Complex data types are supported only when the online store is FeatureDB. FeatureStore supports the following complex data types.

Data type

Description

ARRAY

FeatureStore currently supports the following one-dimensional arrays:

  • ARRAY<INT32>

  • ARRAY<INT64>

  • ARRAY<FLOAT>

  • ARRAY<DOUBLE>

  • ARRAY<STRING>

ARRAY<ARRAY>

FeatureStore currently supports the following two-dimensional arrays:

  • ARRAY<ARRAY<FLOAT>>

MAP

FeatureStore currently supports the following map types:

  • MAP<INT32,INT32>

  • MAP<INT32,INT64>

  • MAP<INT32,FLOAT>

  • MAP<INT32,DOUBLE>

  • MAP<INT32,STRING>

  • MAP<INT64,INT32>

  • MAP<INT64,INT64>

  • MAP<INT64,FLOAT>

  • MAP<INT64,DOUBLE>

  • MAP<INT64,STRING>

  • MAP<STRING,INT32>

  • MAP<STRING,INT64>

  • MAP<STRING,FLOAT>

  • MAP<STRING,DOUBLE>

  • MAP<STRING,STRING>

Data type mapping with MaxCompute

The following table shows the data type mappings between FeatureStore and MaxCompute.

FeatureStore data type

MaxCompute data type

INT32

INT

INT64

BIGINT

FLOAT

FLOAT

DOUBLE

DOUBLE

STRING

STRING

BOOLEAN

BOOLEAN

TIMESTAMP

DATETIME

ARRAY

ARRAY

ARRAY<ARRAY>

ARRAY<ARRAY>

MAP

MAP

Data type mapping with Hologres

The following table shows the data type mappings between FeatureStore and Hologres.

FeatureStore data type

Hologres data type

INT32

INTEGER

INT64

BIGINT

FLOAT

REAL

DOUBLE

DOUBLE PRECISION

STRING

TEXT

BOOLEAN

BOOLEAN

TIMESTAMP

TIMESTAMP WITH TIME ZONE

Data type mapping with TableStore

The following table shows the data type mappings between FeatureStore and TableStore.

FeatureStore data type

TableStore data type

INT32

INTEGER

INT64

INTEGER

FLOAT

DOUBLE

DOUBLE

DOUBLE

STRING

STRING

BOOLEAN

BOOLEAN

TIMESTAMP

STRING

Note

Format: yyyy-MM-dd HH:mm:ss