This feature requires
-c,--compression <arg> sets the compression codec
- Supported compression can be seen at
Database Type to AVRO Type Mapping¶
|Database Type||AVRO Type|
|TINYINT SMALLINT INTEGER||INTEGER|
|BINARY VARBINARY LONGVARBINARY BLOB||BYTES|
|DECIMAL NUMERIC REAL CHAR VARCHAR CLOB||STRING|
DECIMAL is converted to string to preserve the precision.
Array is in general treated as array of string types. The primary reason is that there is no way to get the array element type in JDBC.
- For PostgreSQL, because such information can be easily guessed, it is supported for some well known types.
Struct is exported as array of string types.
- For Teradata, PERIOD data types, which are transmitted as Struct types, are converted into formats that matches their BTEQ output formats.
- For PostgreSQL, the driver reports Struct type even though the data is actually string. Jaqy had a specific workaround for this inconsistency.
For types not listed in the above table, they are stored as STRING. AVRO exporter relies on the toString() function of the object retrieved by the JDBC driver to obtain the output. There is no guarantee such String representations can be used for import.
.export avro myfile.avro SELECT * FROM MyTable ORDER BY a;