<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: Free-Form Sqoop Query Causes &amp;quot;Unrecognized Arguments&amp;quot; in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/18800#M2877</link>
    <description>&lt;P&gt;I was able to get this working. The solution is to submit all of the query elements as separate arguments. Nothing should be in the "Command" window. Instead, starting with "import" as the first argument, enter each part of the query as a separate argument. Properties and values for each element are entered as separate arguments. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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]&lt;/PRE&gt;&lt;P&gt;The workflow performs as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michael Reynolds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 15 Sep 2014 23:04:39 GMT</pubDate>
    <dc:creator>Urantian</dc:creator>
    <dc:date>2014-09-15T23:04:39Z</dc:date>
    <item>
      <title>Free-Form Sqoop Query Causes "Unrecognized Arguments"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/18524#M2876</link>
      <description>&lt;P&gt;I am attempting to run a sqoop command with a free-form query, because I need to perform an aggregation. &amp;nbsp;The following is a scaled-down version of the command and query. &amp;nbsp;When the command is processed, the "--query" statement (enclosed in quotes) results in&amp;nbsp;each portion of the query to be interpreted as unrecognized arguments, as shown in the error following the command. &amp;nbsp;In addition, the target directory is being misinterpreted. &amp;nbsp;What is preventing this from running, and what can be done to resolve it? &amp;nbsp;The ${env} and ${shard} variables are being properly parsed, as reflected in the last error message.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Edit: &amp;nbsp;This command is being submitted via the Hue interface, as an Oozie workflow.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michael Reynolds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;import --connect jdbc:mysql://irbasedw-${shard}.db.impactradius.net:3417/irbasedw_${shard}?dontTrackOpenResources=true&amp;amp;defaultFetchSize=10000&amp;amp;useCursorFetch=true --username iretl --password-file /irdw/${env}/lib/.passwordBaseDw --table agg_daily_activity_performance_stage -m 1 --query "SELECT SUM(click_count) FROM agg_daily_activity_performance_stage WHERE \$CONDITIONS GROUP BY 1" --target-dir /irdw/${env}/legacy/agg/activity_performance/text/shard_${shard}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;------------&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;3881 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Error parsing arguments for import:
3881 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: SUM(click_count)
3881 [main] ERROR org.apache.sqoop.tool.BaseSqoopTool  - Unrecognized argument: FROM
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: WHERE
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: BY
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&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Apr 2026 14:00:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/18524#M2876</guid>
      <dc:creator>MReynolds</dc:creator>
      <dc:date>2026-04-21T14:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Free-Form Sqoop Query Causes "Unrecognized Arguments"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/18800#M2877</link>
      <description>&lt;P&gt;I was able to get this working. The solution is to submit all of the query elements as separate arguments. Nothing should be in the "Command" window. Instead, starting with "import" as the first argument, enter each part of the query as a separate argument. Properties and values for each element are entered as separate arguments. For example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;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]&lt;/PRE&gt;&lt;P&gt;The workflow performs as expected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Michael Reynolds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Sep 2014 23:04:39 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/18800#M2877</guid>
      <dc:creator>Urantian</dc:creator>
      <dc:date>2014-09-15T23:04:39Z</dc:date>
    </item>
    <item>
      <title>Re: Free-Form Sqoop Query Causes "Unrecognized Arguments"</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/62762#M2878</link>
      <description>&lt;P&gt;MReynolds:thanks a lot! &amp;nbsp;solved my big problem!&lt;/P&gt;</description>
      <pubDate>Thu, 14 Dec 2017 08:13:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Free-Form-Sqoop-Query-Causes-quot-Unrecognized-Arguments/m-p/62762#M2878</guid>
      <dc:creator>eniac27427</dc:creator>
      <dc:date>2017-12-14T08:13:31Z</dc:date>
    </item>
  </channel>
</rss>

