<?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 Dynamic partition with sqoop ? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Dynamic-partition-with-sqoop/m-p/191782#M153861</link>
    <description>&lt;P&gt;I read from sqoop documentation&lt;/P&gt;&lt;P&gt;&lt;A href="http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_hcatalog_background" target="_blank"&gt;http://sqoop.apache.org/docs/1.4.6/SqoopUserGuide.html#_hcatalog_background&lt;/A&gt;&lt;/P&gt;&lt;H3&gt;23.6. Support for Partitioning&lt;/H3&gt;&lt;P&gt;The Sqoop HCatalog feature supports the following table types:&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;Unpartitioned tables&lt;/LI&gt;&lt;LI&gt;Partitioned tables with a static partitioning key specified&lt;/LI&gt;&lt;LI&gt;Partitioned tables with dynamic partition keys from the database result set&lt;/LI&gt;&lt;LI&gt;Partitioned tables with a combination of a static key and additional dynamic partitioning keys&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;But I am not getting how to use dynamic partition using sqoop.&lt;/P&gt;&lt;PRE&gt;sqoop import --connect jdbc:mysql://localhost:3306/test
--username root
--password-file file:///home/hdfs/.password
--split-by id
--table test 
--delete-target-dir
--fields-terminated-by ","
--hcatalog-table test
--hcatalog-storage-stanza "stored as orcfile"
--create-hcatalog-table
--hcatalog-partition-keys created_at
--map-column-hive created_at=date,updated_at=date&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;Getting This error&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Either both --hcatalog-partition-keys and --hcatalog-partition-values should be provided or both of these options should be omitted.&lt;BR /&gt;and if I use the partition value then it assigns it as static partition&lt;/P&gt;&lt;PRE&gt;sqoop import --connect jdbc:mysql://localhost:3306/test
--username root
--password-file file:///home/hdfs/.password
--split-by id
--table test 
--delete-target-dir
--fields-terminated-by ","
--hcatalog-table test
--hcatalog-storage-stanza "stored as orcfile"
--create-hcatalog-table
--hcatalog-partition-keys created_at
--hcatalog-partition-value created_at
--map-column-hive created_at=date,updated_at=date

&lt;/PRE&gt;&lt;P&gt;after giving created_at as hcatalog-partition-value it created the directory like apps/hive/warehouse/test/created_at=created_at&lt;/P&gt;&lt;P&gt;it should have used created_at column to create dynamic partition based on data.&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please help me fix this issue&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 15:20:33 GMT</pubDate>
    <dc:creator>mubbashar_h</dc:creator>
    <dc:date>2018-01-17T15:20:33Z</dc:date>
  </channel>
</rss>

