Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 hadoop fs -copyToLocal 将表复制到文件中。该命令可以流畅地工作,减去我所有的字段都合并在一起的事实。有没有办法指定分隔符?
你是从 Hive 表中复制的吗?而且你是直接从仓库目录复制的吗?请提供您正在使用的完整命令。
我已经看到了完全相同的问题,将 Hive 表复制到本地文件系统将所有字段添加到一个大行中,并且在表中每一行的末尾不使用 '\n' 字符。
您最好的选择是使用自定义 SerDe(Serializer 和 DeSerializer)将 hive 导出到 CVS,如此处所述。您也可以从github获取源代码。