sql - Amazon Athena returning "mismatched input 'partitioned' expecting {, 'with'}" error when creating partitions
问题描述
I'd like to use this query to create a partitioned table in 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'
Unfortunately I don't get the error message which tells me the following:
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/'
推荐阅读
- python - 如何正确地将我的 tkinter 按钮与空格对齐
- random - Fortran 中的随机数
- c# - 更改材料设计复选框内的文本
- .net - 为 CRUD 操作创建基本服务
- python - 合并具有多个键且一个键为列名的 DataFrame
- r - 如何编辑 ggVennDiagram 交叉点填充区域
- javascript - 如何在平板电脑分辨率中找到 x 和 y 位置并通过用户输入的警报消息进行验证
- python - 如何使用 kivy 在 python 中动态访问单独的相机类(无需预初始化相机)
- exe - 如何检测.exe文件是否包含未编译的代码
- arrays - 使用 And/Or 运算符最大化按位函数