In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces how to do the failure of query\ $CONDITIONS HUE execution in sqoop. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
1. Enter directly in the HUE sqoop command box:
Sqoop-import-- connect jdbc:mysql://ip address: Port / database-- username user name-- password password-- query select * from table name where 1room1 and\ $CONDITIONS-- split-by id-- hive-table hive table-- target-dir / apps/hive/warehouse/mydb.db/product/dt=$ {date}-- hive-partition-key dt-- hive-partition-value ${date}-- hive-import-- driver com.mysql.jdbc.Driver
The run prompts an error because the SQL statement is parsed into a sqoop parameter
2784 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool-Error parsing arguments for import:
2016-09-11 15 tool.BaseSqoopTool 21V 46485 ERROR [main] tool.BaseSqoopTool (BaseSqoopTool.java:hasUnrecognizedArgs)-Error parsing arguments for import:
2785 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool-Unrecognized argument: *
2016-09-11 15 tool.BaseSqoopTool 21V 46486 ERROR [main] tool.BaseSqoopTool-Unrecognized argument: *
2785 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool-Unrecognized argument: from
2016-09-11 15 tool.BaseSqoopTool 21V 46486 ERROR [main] tool.BaseSqoopTool-Unrecognized argument: from
2785 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool-Unrecognized argument: product
2016-09-11 15 tool.BaseSqoopTool 21V 46486 ERROR [main] tool.BaseSqoopTool-Unrecognized argument: p_product
2785 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool-Unrecognized argument: where
2016-09-11 15 tool.BaseSqoopTool 21V 46486 ERROR [main] tool.BaseSqoopTool-Unrecognized argument: where
2785 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool-Unrecognized argument: $CONDITIONS
two。 Solution: it is best to adopt a parameterized approach
Action failed, error message [${wf:errorMessage (wf:lastErrorNode ())}]
${jobTracker}
${nameNode}
Import
-- connect
"jdbc:mysql://IP address: Port / Database"
-- username
"user name"
-- password
"password"
-- query
Select * from product where $CONDITIONS # # Note: this place does not have a backslash (\)
-- split-by
"id"
-- hive-table
"HIVE Table name"
-- target-dir
"/ apps/hive/warehouse/mydb.db/product/dt=$ {date}"
-- hive-partition-key
"dt"
-- hive-partition-value
"${date}"
-- hive-import
-- driver
"com.mysql.jdbc.Driver"
On the sqoop query\ $CONDITIONS HUE execution failure to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.