【发布时间】:2020-07-22 05:14:56
【问题描述】:
我正在尝试使用以下命令将我的 hql 输出导出到直线中的 csv:
beeline -u "jdbc:hive2://****/;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2"?tez.queue.name=devices-jobs --outputformat=csv2 -e "use schema_name; select * from table_name where open_time_new>= '2020-07-13' and open_time_new < '2020-07-22'" > filename.csv
问题是表中的某些列值包含逗号,这会将同一列的数据推送到下一个列值。 例如:
| abcd | as per data,outage fault,xxxx.
| xyz |as per the source,ghfg,hjhjg.
以上数据将保存为 4 列而不是 2 列。 需要帮助!
【问题讨论】:
标签: bash csv hive hiveql beeline