title: How to read partitioned data in Spark?
body: <p>A lot of examples suggest to read data like <code>spark.read(&quot;path/partition=value/*&quot;)</code> but how to defined a column from path?</p>
  <p>For example, I want to read from <code>path/2019/12/31/*</code> and get columns <code>year</code>, <code>month</code>, <code>day</code> <strong>which are derived from path</strong> not from data itself. How to do that with pyspark?</p>