title: AWS Athena Error: INTERNAL_ERROR_QUERY_ENGINE on CREATE TABLE
body: <p>I'm trying to execute the following query on AWS Athena:</p>
  <pre class="lang-sql prettyprint-override"><code>CREATE TABLE IF NOT EXISTS salesforce_processed.&quot;case&quot;
  WITH (
      format = 'JSON',
      external_location = 's3://path/to/my/bucket/',
      partitioned_by = ARRAY['dt_obs']
  )
  AS
  SELECT
      nullif(trim(&quot;case&quot;.id), '') AS &quot;id&quot; , 
      try(cast(date_parse(&quot;case&quot;.dt_obs, '%Y-%m-%d') as date)) as &quot;dt_obs&quot;
  FROM salesforce_raw.&quot;case&quot; as &quot;case&quot;
  </code></pre>
  <p>But it returns this error message: <em>[ErrorCode: INTERNAL_ERROR_QUERY_ENGINE] Amazon Athena experienced an internal error while executing this query. Please contact AWS support for further assistance. You will not be charged for this query. We apologize for the inconvenience.</em></p>
  <p>There's no other error info, and if I execute the select statement alone, it runs with success.</p>