【问题标题】:Amazon Athena returning "mismatched input 'partitioned' expecting {, 'with'}" error when creating partitionsAmazon Athena 在创建分区时返回“不匹配的输入 'partitioned' Expecting {, 'with'}”错误
【发布时间】:2019-11-26 15:16:56
【问题描述】:

我想使用这个查询在 Amazon Athena 中创建一个分区表:

CREATE TABLE IF NOT EXISTS 
 testing.partitioned_test(order_id bigint, name string, car string, country string)
 PARTITIONED BY (year int)
 ROW FORMAT SERDE 'parquet.hive.serde.ParquetHiveSerDe'
 STORED AS 'PARQUET'
 LOCATION 's3://testing-imcm-into/partitions'

不幸的是,我没有收到告诉我以下内容的错误消息:

第 3:2 行:不匹配的输入 'partitioned' 期望 {, 'with'}

【问题讨论】:

    标签: sql amazon-web-services partitioning amazon-athena


    【解决方案1】:

    'PARQUET' 周围的引号似乎引起了问题。

    试试这个:

    CREATE EXTERNAL TABLE IF NOT EXISTS 
    partitioned_test (order_id bigint, name string, car string, country string)
    PARTITIONED BY (year int)
    STORED AS PARQUET
    LOCATION 's3://testing-imcm-into/partitions/'
    

    【讨论】:

      猜你喜欢
      • 2022-07-10
      • 2021-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-03
      相关资源
      最近更新 更多