尝试在 Athena 中创建具有 MAP 列数据类型的 Iceberg 表时出现“无法解析 Iceberg 查询”?

问题描述 投票:0回答:1

根据Athena Iceberg文档,支持

map
类型。

为什么这两种说法都不起作用?

CREATE TABLE iceberg_test1 (id string, themap map)
  LOCATION 's3://mybucket/test/iceberg1'
  TBLPROPERTIES ( 'table_type' = 'ICEBERG' );

错误:

无法解析 Iceberg 查询

第二次尝试:

CREATE TABLE iceberg_test1 (id string, themap map<varchar,varchar>)
  LOCATION 's3://mybucket/test/iceberg1'
  TBLPROPERTIES ( 'table_type' = 'ICEBERG' );

同样的错误:

无法解析 Iceberg 查询

amazon-athena apache-iceberg
1个回答
1
投票

map
(未指定键/值类型)和
varchar
都不是有效的 Iceberg 类型。请参阅 Iceberg 文档了解有效类型

CREATE TABLE iceberg_test1 (id string, themap map<string, string>)
  LOCATION 's3://mybucket/test/iceberg1'
  TBLPROPERTIES ( 'table_type' = 'ICEBERG' );

只要您有权访问 S3 位置,就可以使用。

© www.soinside.com 2019 - 2024. All rights reserved.