【发布时间】:2016-09-27 09:05:17
【问题描述】:
我想将 CSV 文件转换为 Avro。目前我正在将我的 CSV 转换为 json,然后从中创建 Avro 文件。下面是示例 CSV 数据,
name,favorite_number,favorite_color
Rick,26,Red
Mathew,22,Blue
有没有使用 avro-tools 将 CSV 文件转换为 Avro 的直接方法? fromtext 能胜任吗?
d:\app>java -jar avro-tools-1.7.7.jar fromtext
Expected 2 args: from_file to_file (local filenames, Hadoop URI's, or '-' for st
din/stdout
Option Description
------ -----------
--codec Compression codec (default: null)
--level <Integer> Compression level (only applies to
deflate and xz) (default: -1)
我已经阅读了使用 hive 实现的解决方案。 请注意 - 我没有使用 Hadoop。
【问题讨论】: