【问题标题】:How do I export database tables data from hdfs into local csv using hive without write permission如何在没有写入权限的情况下使用 hive 将数据库表数据从 hdfs 导出到本地 csv
【发布时间】:2018-11-14 23:36:03
【问题描述】:

我没有 hdfs 集群的写权限。 我正在通过边缘节点使用 hive 访问在 hdfs 上创建/存储的数据库表。 我有读取权限。 我想将位于 hdfs 上的表中的数据导出到本地系统上的 csv 中。 我该怎么做?

【问题讨论】:

    标签: hive hiveql


    【解决方案1】:
    insert overwrite local directory '/____/____/' row format delimited fields terminated by ',' select * from table;
    

    请注意,这可能会创建多个文件,您可能希望在完成导出后在客户端将它们连接起来。

    【讨论】:

    • 如果没有对 hdfs 的写访问权限,这项工作是否有效,因为我必须在集群上执行这些操作
    • @Tilo 不,你不能,因为你没有在集群上写的权限
    猜你喜欢
    • 2019-04-12
    • 2011-08-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-07-26
    • 1970-01-01
    • 1970-01-01
    • 2018-03-03
    相关资源
    最近更新 更多