我想使用此查询在 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'
不幸的是,我没有收到告诉我以下内容的错误消息:
line 3:2: mismatched input 'partitioned' expecting {, 'with'}
最佳答案
'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/'
关于sql - Amazon Athena 返回 "mismatched input ' partitioned' expecting {, 'with' }"创建分区时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59054006/