Mapping XDM types to other formats

The sections below describe how each XDM type maps to other common serialization formats:

NOTE
Among the standard XDM types listed in the tables below, the Map type is also included. Maps are used in standard schemas when data is represented as keys that map to certain values, or where keys cannot reasonably be included in a static schema and must be treated as data values.
Many standard XDM components use map types, and you can also define custom map fields if desired. The map type’s inclusion in the tables below is intended to help you determine how to map your existing data to XDM if it is currently stored in any of the formats listed below.

Parquet, Spark SQL, and Java

XDM typeParquetSpark SQLJava
StringType: BYTE_ARRAY
Annotation: UTF8
StringTypejava.lang.String
NumberType: DOUBLELongTypejava.lang.Double
LongType: INT64LongTypejava.lang.Long
IntegerType: INT32
Annotation: INT_32
IntegerTypejava.lang.Integer
ShortType: INT32
Annotation: INT_16
ShortTypejava.lang.Short
ByteType: INT32
Annotation: INT_8
ByteTypejava.lang.Short
DateType: INT32
Annotation: DATE
DateTypejava.util.Date
DateTimeType: INT64
Annotation: TIMESTAMP_MILLIS
TimestampTypejava.util.Date
BooleanType: BOOLEANBooleanTypejava.lang.Boolean
MapMAP-annotated group

(<key-type> must be STRING)
MapType

(keyType must be StringType)
java.util.Map