Querying Avro Files

Drill supports files in the Avro format. Starting from Drill 1.18, the Avro format supports the Schema provisioning feature.

Preparing example data

To follow along with this example, download sample data file to your /tmp directory.

Selecting data from Avro files

We can query all data from the map_string_to_long.avro file:

select * from dfs.tmp.`map_string_to_long.avro`

The query returns the following results:

|-----------------|
|      mapf       |
|-----------------|
| {"ki":1,"ka":2} |
|-----------------|