我正在尝试将数据从teradata导入到HDFS位置。我有权限查看那个数据库。因此,我在另一个数据库中创建了一个暂存表。但是,当我试图运行代码时,它会说错误。
错误:运行Sqoop版本: 1.4.6.2.6.5.0-292 18/12/23 21:49:41警告tool.BaseSqoopTool:在命令行设置密码是不安全的。考虑使用-P代替。18/12/23 21:49:41错误tool.BaseSqoopTool:用于导入的错误解析参数:暂存表、t_hit_data_01_staging、-清除-暂存表、-查询、从table1 date1 date1 <= date <=date‘2017-09-02和$CONDITIONS中选择*,目标-dir、<>、-拆分-by、date1、-m,25。
我在代码中给出了暂存表的细节,并运行了它。但却抛出错误。(Error parsing arguments from import and as un-recognized arguments from staging table)
sqoop import \
--connect jdbc:teradata://<server_link>/Database=db01 \
--connection-manager org.apache.sqoop.teradata.TeradataConnManager \
--username <UN> \
--password <PWD> \
–-staging-table db02.table1_staging –clear-staging-table \
--query "select * from table1 where cast(date1 as Date) <= date '2017-09-02' and \$CONDITIONS " \
--target-dir '<hdfs location>' \
--split-by date1 -m 25`数据应该加载到HDFS位置,稍后在更改where子句时,使用Teradata.Then中另一个数据库中的暂存表,sqoop应该在HDFS位置的同一个文件夹下创建另一个文件。示例: part 0000,下一个文件为-0001等,
发布于 2019-02-06 05:02:06
我认为没有用于导入命令的暂存选项。
https://sqoop.apache.org/docs/1.4.0-incubating/SqoopUserGuide.html
https://stackoverflow.com/questions/53908863
复制相似问题