title: How to create AWS Glue table where partitions have different columns? ('HIVE_PARTITION_SCHEMA_MISMATCH')
body: <p>As per this <a href="https://forums.aws.amazon.com/thread.jspa?messageID=805011" rel="noreferrer">AWS Forum Thread</a>, does anyone know how to use AWS Glue to create an AWS Athena table whose partitions contain different schemas (in this case different subsets of columns from the table schema)?</p>
  
  <p>At the moment, when I run the crawler over this data and then make a query in Athena, I get the error <code>'HIVE_PARTITION_SCHEMA_MISMATCH'</code></p>
  
  <p>My use case is:</p>
  
  <ul>
  <li>Partitions represent days</li>
  <li>Files represent events</li>
  <li>Each event is a json blob in a single s3 file</li>
  <li>An event contains a subset of columns (dependent on the type of event)</li>
  <li>The 'schema' of the entire table is the full set of columns for all the event types (this is correctly put together by Glue crawler)</li>
  <li>The 'schema' of each partition is the subset of columns for the event types that occurred on that day (hence in Glue each partition potentially has a different subset of columns from the table schema)</li>
  <li>This inconsistency causes the error in Athena I think</li>
  </ul>
  
  <p>If I were to manually write a schema I could do this fine as there would just be one table schema, and keys which are missing in the JSON file would be treated as Nulls.</p>
  
  <p>Thanks in advance!</p>