title: Dynamic creation of partition key using Sqoop command from MySQL to Hive
body: <p>I want to create a Hive table by importing data from MySQL. The following command can create the table - </p>
  
  <pre><code>sqoop import \
  -D mapred.job.name=name \
  -Dorg.apache.sqoop.splitter.allow_text_splitter=true \
  -connect "connection_detail" \
  -username "username" \
  -password "pwd" \
  -query "SELECT * FROM schema.tablename WHERE  \$CONDITIONS " \
  -null-string '' \
  -null-non-string '' \
  -fields-terminated-by ',' \
  -m 1 \
  -hive-overwrite \
  --hive-import \
  --hive-table tablename \
  -map-column-hive z_column=bigint,y_column=int,x_column=int \
  -delete-target-dir \
  -target-dir  "path_dir"
  </code></pre>
  
  <p>I now want to create dynamic partition columns in the table - 
  I tried the following command. But, it is giving error mentioned below - </p>
  
  <pre><code>sqoop import \
  -D mapred.job.name=name \
  -Dorg.apache.sqoop.splitter.allow_text_splitter=true \
  -connect "connection_detail" \
  -username "username" \
  -password "pwd" \
  -query "SELECT * FROM schema.tablename WHERE  \$CONDITIONS " \
  -null-string '' \
  -null-non-string '' \
  -fields-terminated-by ',' \
  -m 1 \
  -hive-overwrite \
  --hive-import \
  --hive-table tablename \
  -map-column-hive z_column=bigint,y_column=int,x_column=int \
  --hive-partition-key a_column,b_column,c_column \
  --hive-partition-value 'a_data','b_data','c_data' \
  -delete-target-dir \
  -target-dir  "path_dir"
  </code></pre>
  
  <p>FAILED: ParseException line 1:367 cannot recognize input near ',' 'b_column' ',' in column type</p>
  
  <p>Where exactly is the error?</p>