title: sqoop import direct table vs free form query
body: <p>I'm trying to import data from the existing relational tables to hadoop environment using Sqoop 1.4.6. </p>
  
  <p>When importing using free-form-query <strong>--query</strong> argument, all the columns in the specified table is fetched and written to a target directory successfully. </p>
  
  <pre><code>sqoop import \
  --connect "jdbc:sqlserver://x.x.x.x;database=yyyyy" \
  --username xxxxxx --password yyyyyy \
  --query 'SELECT * FROM tbltest WHERE $CONDITIONS' \
  --target-dir /user/hue/tbltest1 \
  --fields-terminated-by '|'
  --m 10
  </code></pre>
  
  <p>However, when I specify <strong>--table</strong> argument instead of free-form-query, the mapreduce job just hangs. I do not any exceptions or errors in map task logs either. </p>
  
  <pre><code>sqoop import \
  --connect "jdbc:sqlserver://x.x.x.x;database=yyyyy" \
  --username xxxxxx --password yyyyyy \
  --table tbltest \
  --target-dir /user/hue/tbltest2 \
  --fields-terminated-by '|'
  --m 10
  
  16/03/22 21:21:13 INFO mapreduce.Job: Running job: job_1458667709298_0030
  16/03/22 21:21:18 INFO mapreduce.Job: Job job_1458667709298_0030 running in uber mode : false
  16/03/22 21:21:18 INFO mapreduce.Job:  map 0% reduce 0%
  </code></pre>
  
  <p>Can anyone point what exactly is the issue with the second method?</p>