title: sparksql: How to save hdfs files to different folder according to field name
body: <p>When I use <code>sparksql</code>, I want to save the file to a different folder according to the name of the field, because there are more than <code>200</code> fields enumerated. How can I save it gracefully? At present, the way I use it is inefficient.
  As shown in the figure.
  <img src="https://i.stack.imgur.com/p9Akq.png" alt="enter image description here" /></p>