title: How to save spark dataset in encrypted format?
body: <p>I am saving my spark dataset as parquet file in my local machine. I would like to know if there are any ways I could encrypt the data using some encryption algorithm. The code I am using to save my data as parquet file looks something like this.</p>
  <p><code>dataset.write().mode(&quot;overwrite&quot;).parquet(parquetFile);</code></p>
  <p>I saw a <a href="https://stackoverflow.com/questions/46113160/how-to-write-a-spark-rdd-to-s3-using-server-side-encryption">similar question</a> but my query is different as I am writing to my local disk.</p>