title: HIVE_CANNOT_OPEN_SPLIT: Schema mismatch when querying parquet files from Athena
body: <p>I'm getting a schema mismatch error when querying parquet data from Athena.</p>
  
  <p>The error is:</p>
  
  <pre><code>HIVE_CANNOT_OPEN_SPLIT: Error opening Hive split s3://datalake/googleanalytics/version=0/eventDate=2017-06-11/part-00001-9c9312f7-f9a5-47c3-987e-9348b78aaebc-c000.snappy.parquet (offset=0, length=48653579): Schema mismatch, metastore schema for row column totals has 13 fields but parquet schema has 12 fields
  </code></pre>
  
  <p>In the AWS Glue Crawler I tried enabling <strong>Update all new and existing partitions with metadata from the table</strong> which I thought would resolve this issue, however I'm still getting the above error.
  I did this because of the similar question:
  <a href="https://stackoverflow.com/questions/46241088/how-to-create-aws-glue-table-where-partitions-have-different-columns-hive-par">How to create AWS Glue table where partitions have different columns? (&#39;HIVE_PARTITION_SCHEMA_MISMATCH&#39;)</a></p>
  
  <p>The table schema for the totals column is:</p>
  
  <pre><code>struct&lt;visits:bigint,hits:bigint,pageviews:bigint,timeOnSite:bigint,bounces:bigint,transactions:bigint,transactionRevenue:bigint,newVisits:bigint,screenviews:bigint,uniqueScreenviews:bigint,timeOnScreen:bigint,totalTransactionRevenue:bigint,sessionQualityDim:bigint&gt;
  </code></pre>
  
  <p>The parquet file for partition <em>eventDate=2017-06-11</em> is missing the last field <em>"sessionQualityDim"</em>.</p>