hadoop - Sqoop Free-Form Query Causing Unrecognized Arguments in Hue/Oozie -
i attempting run sqoop command free-form query, because need perform aggregation. it's being submitted via hue interface, oozie workflow. following scaled-down version of command , query. when command processed, "--query" statement (enclosed in quotes) results in each portion of query interpreted unrecognized arguments, shown in error following command. in addition, target directory being misinterpreted. preventing running, , can done resolve it? ${env} , ${shard} variables being parsed, reflected in last error message.
thank you!
===========
import --connect jdbc:mysql://irbasedw-${shard}.db.xxxx.net:3417/irbasedw_${shard}?donttrackopenresources=true&defaultfetchsize=10000&usecursorfetch=true --username iretl --password-file /irdw/${env}/lib/.passwordbasedw --table agg_daily_activity_performance_stage -m 1 --query "select sum(click_count) agg_daily_activity_performance_stage \$conditions group 1" --target-dir /irdw/${env}/legacy/agg/activity_performance/text/shard_${shard}
==========
3881 [main] error org.apache.sqoop.tool.basesqooptool - error parsing arguments import: 3881 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: sum(click_count) 3881 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: agg_daily_activity_performance_stage 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: \$conditions 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: group 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: 1" 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: --target-dir 3882 [main] error org.apache.sqoop.tool.basesqooptool - unrecognized argument: /irdw/test/legacy/agg/activity_performance/text/shard_0
i able working. solution submit of query elements separate arguments. nothing should in "command" window. instead, starting "import" first argument, enter each part of query separate argument. properties , values each element entered separate arguments. example:
arg: import arg: --connect arg: jdbc:mysql.... arg: --username arg: [username] arg: --password-file arg: [password file] arg: --query arg: select ..... arg: --target-dir arg: [target]
the workflow performs expected.
Comments
Post a Comment