【发布时间】:2021-07-26 00:49:48
【问题描述】:
我正在尝试在 Trino 上创建一个表 使用 Hive 连接器将 Json 作为数据源。
create table if not exists test.json_table
(
"timestamp" STRING,
"header" array[STRUCT<id:STRING, type:STRING, name:STRING, timestamp:STRING, name2:STRING, version:STRING>],
"data" array[STRUCT<subtype:STRING, acc_number:STRING>]
)
WITH (
external_location = 's3a://path/json-file',
format = 'JSON'
);
这在 Trino 中不起作用。由于语法似乎与 Presto / Athena 不同。
谁能给点建议!谢谢
【问题讨论】:
-
您遇到的错误是什么?如果可能的话,还为您的问题发布一些示例 JSON 记录