Updated on 2026-08-13 GMT+08:00

Mapping Between MongoDB and DWS 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. For the MongoDB source, the system parses the first document in the target collection to infer the field structure type of the source and determine the field type of the destination DWS.

Field Type Mapping Rules

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

Table 1 Field types supported by a job that migrates data from MongoDB to DWS

Type

MongoDB Data Type

DWS Data Type

Description

String

STRING

TEXT

-

Numeric

BOOLEAN

BOOLEAN

-

INT

BIGINT

-

LONG

BIGINT

-

DOUBLE

FLOAT8

-

DECIMAL128

DECIMAL(38,10)

The default value is DECIMAL(38,10).

Binary

BINARY

BYTEA

-

Time and date

DATE

TIMESTAMP(6)

The default value is TIMESTAMP(6).

TIMESTAMP

TIMESTAMP(6)

The default value is TIMESTAMP(6).

Other

OBJECTID

CHAR(24)

The data transmission result of this field is a 24-bit ObjectId. Its default mapping format in DWS is CHAR(24).

NULL

CHAR(1)

MongoDB has a Null type, which has no content. CHAR(1) is used as the mapping type placeholder.

ARRAY

TEXT

-

DOCUMENT

TEXT

Other MongoDB data types (Object, MaxKey, MinKey, Code, BSONREGEXP, and UUID) are displayed as the DOCUMENT type during table creation and mapping. Its default mapping format in DWS is TEXT.