postgresql - Sqoop 从 Postgre 到 Hive 并转换为 ORC 格式
问题描述
我正在尝试将一些表从 Postgres sqoop 到 Hive,并在 sqooping 时将它们转换为 ORC。
- 我使用了以下命令。
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql:/// --username user --password pwd --table table --hcatalog-database default --hcatalog-table表 --hcatalog-storage-stanza "存储为 orcfile" --create-hcatalog-table -m 1
我收到以下错误:
错误工具.ImportTool:导入失败:org.apache.hive.hcatalog.common.HCatException:2016:不支持错误操作:不支持从 Pig/Mapreduce 存储到事务表 default.agent
- 我把 sqoop 改成这样,添加了 tblproperties ("transactional"="false")
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql:/// --username user --password pwd --table table --hcatalog-database default --hcatalog-table表 --hcatalog-storage-stanza "存储为 orcfile tblproperties ("transactional"="false")" --create-hcatalog-table -m 1
错误:
信息 hcat.SqoopHCatUtilities:失败:执行错误,从 org.apache.hadoop.hive.ql.exec.DDLTask 返回代码 1。MetaException(message:Table default.duplicates 由于以下原因未能通过严格的托管表检查:表被标记为托管表但不是事务性的。)
- 我在谷歌搜索后添加了以下内容,以两种不同的格式添加了 --hcatalog-external-table
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql:/// --username user --password pwd --table table --hcatalog-database default --hcatalog-table表 --hcatalog-storage-stanza "存储为 orcfile tblproperties ("transactional"="false")" --create-hcatalog-table --hcatalog-external-table -m 1
和
sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql:/// --username user --password pwd --table table --hcatalog-database default --hcatalog-external -table table --hcatalog-storage-stanza "存储为 orcfile tblproperties ("transactional"="false")" --create-hcatalog-table -m 1
我尝试了上面给出的两个,
这是错误:
错误工具.BaseSqoopTool:无法识别的参数:--hcatalog-external-table
现在,我被困住了..任何帮助表示赞赏。
解决方案
推荐阅读
- yii2 - Yii2,url中的参数在动作视图中不起作用
- c# - 将excel范围写入整数数组类型转换异常
- sql - 在 oracle 中使用子查询更新列
- c# - 如何在@Html.Dropdownlist 中创建动态 id?
- haskell - Curry/Uncurry monad 变压器提升
- reactjs - React Typescript强制道具中空数组的编译时错误
- java - 计算两个具有相同长度且具有完全相同的素数除数集的数组中的对
- matlab - 在matlab中绘制卫星轨道的磁场
- reactjs - 可以在使用 appium 的真实设备上拍摄使用 Jest 的快照吗
- php - 在PayPal Rest API中,创建付款时,一笔付款可以进行多笔交易?