0

如何使用 localfile 连接器和带有 presto 的 orc 文件格式写入结果 CTAS(板条箱表)的文件

示例查询:

 CREATE TABLE localfile.default.lineitem_orc_parted with (
  format = 'ORC',
  partitioned_by = ARRAY['commityear'],
  bucketed_by = ARRAY['linenumber'],
  bucket_count = 7
) AS SELECT *,year(commitdate) as commityear from tcph.sf100.lineitem limit 100000000;

-->目录 'localfile' 不支持表属性 'format'

是否有可能有/没有分区,分桶?

4

1 回答 1

1

Prestolocalfile连接器目前仅支持读取http-request.log。它不允许读取 ORC 文件,也不允许创建任何表。没有真正适合从 Presto 中转储 ORC 文件的内置连接器。

作为一种解决方法,我建议使用Presto Hive 连接器并将 (CTAS) 写入表。然后你只需从表的位置复制文件。

如果这不能满足您的需求,我建议您创建一个问题:https ://github.com/prestosql/presto/issues并加入Presto Slack上的对话。

于 2019-09-24T12:35:44.943 回答