How to open .AVRO files on Linux

To open .AVRO files on Linux, use Apache Spark and read the file using the Avro data source (Spark supports Avro as a format).

Step-by-step instructions

  1. Use Apache Spark and read the file using the Avro data source (Spark supports Avro as a format).
  2. For a lightweight local option, use DuckDB with the Avro extension and query the file via DuckDB’s Avro reader.
  3. In Hadoop/Hive environments, define Avro-backed tables using Hive’s AvroSerDe / AvroContainerInputFormat to work with .avro container files.

Common issues

The file won’t open in a spreadsheet or “normal” viewer

Avro is a binary serialization/container format designed for programmatic reading, not manual inspection like CSV/JSON.

  1. Open it with a tool that understands Avro (for example, Apache Spark’s Avro data source or DuckDB with the Avro extension).
  2. If you need a human-readable form, load it in Spark or DuckDB and then export/query to a more viewable format (e.g., display query results).

Schema or field mismatch when reading

Avro relies on schemas; if a reader expects different fields/types than what the file’s embedded schema provides, you can see missing fields, type errors, or unexpected nulls.

  1. Confirm the file is an Avro object container file (it should embed its schema in the header per the Avro specification).
  2. In your tool (Spark/Hive/DuckDB), read using the schema stored in the file first; only apply an external/expected schema after verifying compatibility.

Spark can’t read/write Avro due to missing support

In Spark, Avro support is provided via its Avro data source; if your environment is missing the required component/configuration, reads can fail.

  1. Verify you are using Spark’s Avro data source as documented (format="avro" / org.apache.spark.sql.avro).
  2. Check that your Spark distribution/environment includes Avro support as described in the Spark Avro data source guide.

DuckDB can’t read the file because the Avro extension isn’t enabled

DuckDB reads Avro via its Avro extension; if it’s not installed/loaded, Avro functions won’t be available.

  1. Install and load DuckDB’s Avro extension as described in DuckDB’s Avro extension documentation.
  2. Use DuckDB’s Avro reader (e.g., the documented read_avro approach) to query the .avro file.

Security note

Avro files are typically binary container files; treat .avro from untrusted sources as potentially risky for parser vulnerabilities in the software reading them (Spark/Hive/DuckDB or any Avro library).

Back to .AVRO extension page