What is Apache Parquet?
Apache Parquet is a binary file format made for reading and storing tables of data. It groups values by column. An analytics tool can read the columns it needs without reading all the other fields in every row.
How does Parquet store data?
A Parquet file splits a table into batches called row groups. Inside each group, it stores each column in its own chunk. The file also includes details about the columns and where to find them. Software uses that information to find the right data.
When similar values are stored together, the file can often compress them well. This matters when a table contains many rows or wide records. For a tiny file like the sample below, the extra file information might take more space than the JSON itself.
Example contacts as rows and columns
Each contact below is one JSON row. In the Parquet file, the id values are stored together, and so are the name values. The positions keep the pairs in order, so 42 still belongs to Avery when you read the file back.
[
{"id": 42, "name": "Avery"},
{"id": 51, "name": "Ellis"}
]id 42 51
name Avery EllisWhen is Parquet useful?
Choose Parquet when you expect to run queries, reports or summaries on lots of records. A report that counts contacts by a single field can read that field without loading all the names or other details. Tools such as Apache Spark can work with Parquet directly.
Use JSON when you need a small file that people can read in a text editor or when an API expects JSON. If you only need to check a few values from a Parquet file, converting a small copy to JSON can make inspection easier.
How do I convert it?
In Parquet to JSON, open the .parquet file and select Convert to JSON. You get a JSON array with one object per row. The converted JSON shows the values in a form you can inspect or pass to another tool.
In JSON to Parquet, paste a list of records and select Convert to Parquet. The tool uses the values to work out each column’s type. Start with the same fields on each record and use a consistent type for each field.
What carries over to JSON?
The JSON result shows the rows. Details used to store the Parquet file, such as its compression and row groups, stay in the original file. Some values change how they are written. For example, the reader can show a UTC timestamp as text so you can see the date and time.
If you convert that JSON back, the writer works out column types from the values it sees. Keep the original file if you need the same column types or storage details later.
What should I check if conversion fails?
For JSON input, check for an empty list or a field that swaps types, such as id being a number in one record and text in another. A column containing only null values also gives the exporter too little information to pick a type.
For Parquet input, the browser has limits on file size, row count and how much data the file expands into. If a file is too large, export a smaller set of rows or fewer columns from the source system. Some Parquet types also have no direct JSON type. Check the result before using it to build a replacement for the original file.