title: How to use 'create-hive-table' with Sqoop correctly?
body: <p>I'm trying to import data from MySQL table to Hive using Sqoop. From what I understood there are 2 ways of doing that.</p>
  
  <ol>
  <li><p>Import data into HDFS and then create External Table in Hive and load data into that table.</p></li>
  <li><p>Use <code>create-hive-table</code> while running Sqoop query to create a new table in Hive and directly load data into that. I am trying to do this but can't do it for some reason</p></li>
  </ol>
  
  <p>This is my code</p>
  
  <pre><code>sqoop import \
  --connect jdbc:mysql://localhost/EMPLOYEE \
  --username root \
  --password root \
  --table emp \
  --m 1 \
  --hive-database sqoopimport \
  --hive-table sqoopimport.employee \
  --create-hive-table \
  --fields-terminated-by ',';
  </code></pre>
  
  <p>I tried using <code>--hive-import</code> as well but got error.
  When I ran the above query, job was successful but there was no table created in hive as well as data was stored in <code>\user\HDFS\emp\</code> location where <code>\HDFS\emp</code> was created during the job. </p>
  
  <p>PS: Also I could not find any reason for using <code>--m 1</code> with Sqoop. It's just there in all queries.</p>