title: Storing & reading custom metadata in parquet files using Spark / Scala
body: <p>I know parquet files store meta data, but is it possible to add <strong>custom</strong> metadata to a parquet file, using Scala (preferably) using Spark?</p>
  
  <p>The idea is that I store many similar structured parquet files in a Hadoop storage, but each has a  uniquely named source (String field, also present as column in the parquet file), however, I'd like to access this information without creating the overhead of actually reading the parquet and possibly even removing this redundant column from the parquet.</p>
  
  <p>I really don't want to put this info in a filename, so my best option is now just to read the first line of each parquet and use the source column as String field.</p>
  
  <p>It works, but I was just wondering if there is a better way.</p>