gpt4 book ai didi

sql - Amazon Athena 返回 "mismatched input ' partitioned' expecting {, 'with' }"创建分区时出错

转载 作者:行者123 更新时间:2023-12-05 01:39:05 27 4
gpt4 key购买 nike

我想使用此查询在 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/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com