hhw*_*www 3 sql partitioning amazon-web-services amazon-athena
我想使用此查询在 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'
Run Code Online (Sandbox Code Playgroud)
不幸的是,我没有收到告诉我以下内容的错误消息:
第 3:2 行:不匹配的输入“分区”需要 {, '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/'
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15354 次 |
| 最近记录: |