title: While writing a dataset using Spark, how to modify camel cased column names to lower case with underscores?
body: <p>I am using Structured Streaming in Spark 2.3.0 to write a dataset to S3. My streaming query looks like this:</p>
  
  <pre><code>StreamingQuery query = ds.writeStream().format("parquet").outputMode(OutputMode.Append())
                                         .option("checkpointLocation", "s3://my-checkpoint-location/" )
                                         .option("path", "s3://my-output-data-location")
                                         .partitionBy("my-partition-column-name")
                                         .start();
  </code></pre>
  
  <p>The above code works perfectly. The column names of my dataset are: <code>firstName</code> and <code>lastName</code>. I want my output data / parquet file to have column names <code>first_name</code> and <code>last_name</code> instead. Is there an easy way to do this by adding another option? If not, what is the easiest way to do this if the column names are not known at the time I run this code snippet?</p>