【问题标题】:how to create hive table based on non-select query如何基于非选择查询创建配置单元表
【发布时间】:2017-06-09 19:21:33
【问题描述】:

在我使用 impala 的工作中,我喜欢将我的 show table stats tablename 保存到蜂巢表中,我正在这样做但收到错误消息:

[r001d01i1p:21000] > create table mystats as
                       > show table stats eq_cmplx_exec_master;

错误:

查询:create table mystats as show table stats eq_cmplx_exec_master 错误:AnalysisException:第 2 行中的语法错误:显示表统计信息 eq_cmplx_exec_master ^ 遇到:SHOW 预期:SELECT,VALUES, 有

原因:异常:语法错误

谁能帮我解决一下,非常感谢。

理想情况下,我希望新表包含两个额外的列:ID、表名

【问题讨论】:

  • 错误信息很明确:您不能将 metadata 命令(例如 SHOW)的结果作为 data 注入到表中。 #PasDeBol。

标签: impala


【解决方案1】:

经过一番研究,这是我最终得到的结果,它可以按我的意愿完美运行:

impala-shell -i host-10-17-101-252:25003 -k -q "show table stats dbo" -d default --quiet -B -c -o table_stats.txt

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-10-27
    • 2014-12-08
    • 1970-01-01
    • 2020-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多