Help Center/ DataArts Studio/ User Guide/ DataArts Migration (Real-Time Jobs)/ Field Type Mapping/ Mapping Between PostgreSQL and MRS Hudi Field Types
Updated on 2025-08-05 GMT+08:00

Mapping Between PostgreSQL and MRS Hudi Field Types

DataArts Migration converts the source field type to the destination field type based on the default rule, and creates tables and synchronizes data in real time.

Field Type Mapping Rules

The following table lists the field types supported by a job that migrates data from PostgreSQL to Hudi.

Table 1 Field types supported by a job that migrates data from PostgreSQL to Hudi

Type

PostgreSQL Data Type

Hudi Data Type

Description

String

CHAR(M)

STRING

Fixed-length string, filled with spaces

VARCHAR(M)

STRING

Variable-length string with an upper limit of length

TEXT

STRING

Variable-length string with no upper limit of length, similar to VARCHAR without length declaration

Value

BOOLEAN

BOOLEAN

Logical Boolean value (true/false)

SMALLINT

INT

int2

INTEGER

INT

int/int4

BIGINT

BIGINT

int8

DECIMAL(M,D)

DECIMAL(M,D)

Accurate number with precision

NUMERIC(M,D)

DECIMAL(M,D)

Equivalent to NUMERIC

REAL

FLOAT

Single-precision floating point number (4 bytes)

DOUBLE

DOUBLE

Double-precision floating point number (8 bytes). It can also be represented by FLOAT without precision.

Date and time

DATE

DATE

Date (1970-01-01)

TIME(M)

STRING

Time of a day (08:00:00)

TIMESTAMP(M)

TMESTAMP

Date and time without the time zone (1970-01-01 00:00:00)

TIMESTAMP(M) WITH TIME ZONE

TMESTAMP

Date and time with the time zone (1970-01-01 00:00:00). It is TMESTAMPTZ.

Binary

BYTEA

Not supported

Binary data ("byte array")