<?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: How can I store sqoop query &amp;quot;select(*) from anytable&amp;quot; results  into hdfs? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146230#M23827</link>
    <description>&lt;P&gt;Please try below command, its working fine on my cluster.&lt;/P&gt;&lt;P&gt;sqoop import --connect jdbc:mysql://hostname/classicmodels --username root --password xxx --query 'select count(*) as cnt from customers where $CONDITIONS' --m 1 --target-dir /tmp/count1 --driver com.mysql.jdbc.Driver&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2016 23:09:23 GMT</pubDate>
    <dc:creator>jyadav</dc:creator>
    <dc:date>2016-03-28T23:09:23Z</dc:date>
    <item>
      <title>How can I store sqoop query "select(*) from anytable" results  into hdfs?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146229#M23826</link>
      <description>&lt;P&gt;I want to run sqoop query to table count records and save this result into any file locally or in hdfs but I can not. &lt;/P&gt;&lt;P&gt;I run this query:-&lt;/P&gt;&lt;P&gt;sqoop eval --connect hostname/db --username user --password password --query 'select count(*) from tablename' --target-dir /sandbox/test&lt;/P&gt;&lt;P&gt;I am getting error:-&lt;/P&gt;&lt;P&gt; Running Sqoop version: 1.4.6.2.3.0.0-2557 (Sqoop:92)
2016-03-28 11:57:55,725 WARN  - [main:] ~ Setting your password on the command-line is insecure. Consider using -P instead.&lt;/P&gt;&lt;P&gt; (BaseSqoopTool:1021)
2016-03-28 11:57:55,725 ERROR - [main:] ~ Error parsing arguments for eval: (BaseSqoopTool:303)
2016-03-28 11:57:55,725 ERROR - [main:] ~ Unrecognized argument: --target-dir (BaseSqoopTool:306)
2016-03-28 11:57:55,725 ERROR - [main:] ~ Unrecognized argument: /sandbox/test (BaseSqoopTool:306)&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 22:50:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146229#M23826</guid>
      <dc:creator>vijaysvnit2005</dc:creator>
      <dc:date>2016-03-28T22:50:46Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store sqoop query "select(*) from anytable" results  into hdfs?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146230#M23827</link>
      <description>&lt;P&gt;Please try below command, its working fine on my cluster.&lt;/P&gt;&lt;P&gt;sqoop import --connect jdbc:mysql://hostname/classicmodels --username root --password xxx --query 'select count(*) as cnt from customers where $CONDITIONS' --m 1 --target-dir /tmp/count1 --driver com.mysql.jdbc.Driver&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2016 23:09:23 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146230#M23827</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-03-28T23:09:23Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store sqoop query "select(*) from anytable" results  into hdfs?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146231#M23828</link>
      <description>&lt;P&gt;Thank you so much ! It is working now&lt;/P&gt;&lt;P&gt;you are the man !&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 00:12:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146231#M23828</guid>
      <dc:creator>vijaysvnit2005</dc:creator>
      <dc:date>2016-03-29T00:12:38Z</dc:date>
    </item>
    <item>
      <title>Re: How can I store sqoop query "select(*) from anytable" results  into hdfs?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146232#M23829</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/3144/vijaysvnit2005.html" nodeid="3144"&gt;@mike pal&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Thanks Mike for confirming, would be great if you can click on best answer &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 01:08:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/How-can-I-store-sqoop-query-quot-select-from-anytable-quot/m-p/146232#M23829</guid>
      <dc:creator>jyadav</dc:creator>
      <dc:date>2016-03-29T01:08:10Z</dc:date>
    </item>
  </channel>
</rss>

