Data Types in Avro

Posted August 17, 2022 by Rohith ‐ 1 min read

Avro is used in many data processing frameworks like kafka, spark, etc. It is important to know the data types supported in avro data format.

The following table lists the Avro data types

Avro Data Types

Avro Data TypeCommon equivalent typeRange
ArrayArrayUnlimited number of characters.
BooleanIntegerTRUE (1) or FALSE (0).
BytesBinaryPrecision 4000.
DateDate/TimeJanuary 1, 0001 to December 31, 9999.
DecimalDecimalsupport precision up to 38 digits, the precision is 1 to 38 digits, and the supported scale is 0 to 38.
DoubleDoublePrecision 15.
FixedBinaryup to 100MiB
FloatDoublePrecision up to 15.
IntInteger-2,147,483,648 to 2,147,483,647 Precision 10 and scale 0.
LongBigint-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807. Precision 19 and scale 0.
MapMapUnlimited number of characters.
RecordStructUnlimited number of characters.
StringString1 to 104,857,600 characters.
TimeDate/TimeTime of the day. Precision to microsecond.
TimestampDate/TimeJanuary 1, 0001 00:00:00 to December 31, 9999 23:59:59.997. Precision to microsecond.
Union["primitive_type|complex_type", "null"] or ["null", "primitive_type|complex_type"].Dependent on primitive or complex data type.
avro data-types transformations

Subscribe For More Content