title: Amazon Athena table creation fails with "no viable alternative at input 'create external'"
body: <p>This is my first attempt to craft my own table in Athena so please be gentle :) I have several other tables based off AWS examples running in this database with no troubles, so I'm confident the DB is setup correctly.</p>
  
  <p>Also, I'm sure my regex is atrocious, please try to ignore it for now!</p>
  
  <p>I have some vpc flow logs stored on S3, the format of the log files is:</p>
  
  <pre><code>2 123456654321 eni-ae343be4 100.75.233.178 172.31.26.162 49178 80 6 6 270 1488872163 1488872180 ACCEPT OK
  2 123456654321 eni-ae343be4 100.75.233.178 172.31.26.162 64013 80 6 2 84 1488872163 1488872180 ACCEPT OK
  2 123456654321 eni-ae343be4 206.97.36.202 172.31.26.162 33164 445 6 2 96 1488872163 1488872180 REJECT OK
  </code></pre>
  
  <p>I have based my table on the <a href="https://aws.amazon.com/blogs/big-data/analyzing-data-in-s3-using-amazon-athena/" rel="nofollow noreferrer">AWS example published here</a>. The query I have created is:</p>
  
  <pre><code>CREATE EXTERNAL TABLE IF NOT EXISTS flow_logs_raw_native (
           version int,
           account-id bigint,
           interface-id string,
           srcaddr string,
           dstaddr string,
           srcport int,
           dstport int,
           protocol int,
           packets int,
           bytes int,
           Tstart bigint,
           Tend bigint,
           action string,
           log-status string 
  ) 
  ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.RegexSerDe'
  WITH SERDEPROPERTIES (
           'serialization.format' = '1','input.regex' = '([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*) ([^ ]*)' ) LOCATION 's3://vpcflowlogstos3-bucket-1ns5peqxgc31n/flowlogs/';
  </code></pre>
  
  <p>Every time I run the query I receive an error:</p>
  
  <pre><code>line 1:8: no viable alternative at input 'create external' (service: amazonathena; status code: 400; error code: invalidrequestexception; request id: b0cfde99-031c-11e7-b4de-4139fae95147)
  </code></pre>
  
  <p>I've been looking at this for a couple of hours now, trying to find a spelling mistake, or missing element, but I'm stuck! Can anyone see what's wrong here?</p>
  
  <p>Thank you,</p>
  
  <p>Kelly.</p>