<?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 Sqoop from Postgre to Hive and convert to ORC format in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327582#M230096</link>
    <description>&lt;P&gt;I'm trying to sqoop some tables from Postgres to Hive and convert them to ORC while sqooping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; I used the below command.&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default --hcatalog-table table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile" --create-hcatalog-table -m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was getting the below error:&lt;BR /&gt;&lt;BR /&gt;ERROR tool.ImportTool: Import failed: org.apache.hive.hcatalog.common.HCatException : 2016 : Error operation not supported : Store into a transactional table default.agent from Pig/Mapreduce is not supported&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; I changed the sqoop to look like this.&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default --hcatalog-table table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile &lt;STRONG&gt;tblproperties (\"transactional\"=\"false\")&lt;/STRONG&gt;" --create-hcatalog-table -m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;DIV&gt;INFO hcat.SqoopHCatUtilities: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Table default.duplicates failed strict managed table checks due to the following reason: Table is marked as a managed table but is not transactional.)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; and I added the below after some googling,&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default --hcatalog-table table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table &lt;STRONG&gt;--hcatalog-external-table&lt;/STRONG&gt;&amp;nbsp;-m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default &lt;STRONG&gt;--hcatalog-external-table&lt;/STRONG&gt; table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table -m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried both given above,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the Error:&lt;/P&gt;&lt;DIV&gt;ERROR tool.BaseSqoopTool: Unrecognized argument: --hcatalog-external-table&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now, I don't know what to do.. Please help me out here.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Oct 2021 15:38:15 GMT</pubDate>
    <dc:creator>ram_</dc:creator>
    <dc:date>2021-10-13T15:38:15Z</dc:date>
    <item>
      <title>Sqoop from Postgre to Hive and convert to ORC format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327582#M230096</link>
      <description>&lt;P&gt;I'm trying to sqoop some tables from Postgres to Hive and convert them to ORC while sqooping.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;1.&lt;/STRONG&gt; I used the below command.&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default --hcatalog-table table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile" --create-hcatalog-table -m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was getting the below error:&lt;BR /&gt;&lt;BR /&gt;ERROR tool.ImportTool: Import failed: org.apache.hive.hcatalog.common.HCatException : 2016 : Error operation not supported : Store into a transactional table default.agent from Pig/Mapreduce is not supported&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;2.&lt;/STRONG&gt; I changed the sqoop to look like this.&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default --hcatalog-table table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile &lt;STRONG&gt;tblproperties (\"transactional\"=\"false\")&lt;/STRONG&gt;" --create-hcatalog-table -m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Error:&lt;/P&gt;&lt;DIV&gt;INFO hcat.SqoopHCatUtilities: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. MetaException(message:Table default.duplicates failed strict managed table checks due to the following reason: Table is marked as a managed table but is not transactional.)&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;STRONG&gt;3.&lt;/STRONG&gt; and I added the below after some googling,&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default --hcatalog-table table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table &lt;STRONG&gt;--hcatalog-external-table&lt;/STRONG&gt;&amp;nbsp;-m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;sqoop import --hcatalog-home /usr/hdp/current/hive-webhcat --connect jdbc:postgresql://&amp;lt;host&amp;gt;/&amp;lt;database&amp;gt; --username user --password pwd --table table --hcatalog-database default &lt;STRONG&gt;--hcatalog-external-table&lt;/STRONG&gt; table&amp;nbsp; --hcatalog-storage-stanza "stored as orcfile tblproperties (\"transactional\"=\"false\")" --create-hcatalog-table -m 1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried both given above,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the Error:&lt;/P&gt;&lt;DIV&gt;ERROR tool.BaseSqoopTool: Unrecognized argument: --hcatalog-external-table&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now, I don't know what to do.. Please help me out here.&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Oct 2021 15:38:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327582#M230096</guid>
      <dc:creator>ram_</dc:creator>
      <dc:date>2021-10-13T15:38:15Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop from Postgre to Hive and convert to ORC format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327641#M230118</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try to run the sqoop command as below and let us know how it goes:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;$&amp;nbsp;sqoop import --connect jdbc:mysql://localhost/employees --username hive --password hive --table departments&amp;nbsp;--hcatalog-database default --hcatalog-table my_table_orc --create-hcatalog-table --hcatalog-storage-stanza "stored as orcfile"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 09:51:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327641#M230118</guid>
      <dc:creator>ShankerSharma</dc:creator>
      <dc:date>2021-10-14T09:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop from Postgre to Hive and convert to ORC format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327642#M230119</link>
      <description>&lt;P&gt;Hi COE,&lt;/P&gt;&lt;P&gt;I don't get what you changed,&lt;/P&gt;&lt;P&gt;But, I got the below error&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR tool.ImportTool: Import failed: No primary key could be found for table dup_07jul. Please specify one with --split-by or perform a sequential import with '-m 1'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;after adding '-m 1', I got&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ERROR tool.ImportTool: Import failed: org.apache.hive.hcatalog.common.HCatException : 2016 : Error operation not supported : Store into a transactional table default.duplicates_1 from Pig/Mapreduce is not supported&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:03:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327642#M230119</guid>
      <dc:creator>ram_</dc:creator>
      <dc:date>2021-10-14T10:03:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop from Postgre to Hive and convert to ORC format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327643#M230120</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please try the below command and let us know:-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;$&amp;nbsp;sqoop import --connect jdbc:mysql://localhost/employees --username hive --password hive --table departments&amp;nbsp;--hcatalog-database default --hcatalog-table my_table_orc --create-hcatalog-table --hcatalog-storage-stanza --hcatalog-storage-stanza "stored as orc tblproperties (\"transactional\"=\"false\")"&lt;/P&gt;&lt;P class="p2"&gt;&amp;nbsp;&lt;/P&gt;&lt;P class="p1"&gt;If it doesn’t work then the workaround is the two step process.&lt;/P&gt;&lt;P class="p1"&gt;1. Create the ORC table in hive with the keyword external and set transactional to false&lt;/P&gt;&lt;P class="p1"&gt;2. Then use the sqoop command to load the data into the orc table.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:41:49 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327643#M230120</guid>
      <dc:creator>ShankerSharma</dc:creator>
      <dc:date>2021-10-14T10:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: Sqoop from Postgre to Hive and convert to ORC format</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327644#M230121</link>
      <description>&lt;P&gt;No, that's not working for me. I already mentioned the error in question.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://git-wip-us.apache.org/repos/asf?p=sqoop.git;a=blob;f=src/docs/user/hcatalog.txt;h=96a90f75ca7e6e3ee9e0e086759ed6a8cde0d44b;hb=be260e3096a6a2710e661c7fe33f6b402ce66476" target="_blank"&gt;https://git-wip-us.apache.org/repos/asf?p=sqoop.git;a=blob;f=src/docs/user/hcatalog.txt;h=96a90f75ca7e6e3ee9e0e086759ed6a8cde0d44b;hb=be260e3096a6a2710e661c7fe33f6b402ce66476&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in reference to above link, can you please tell me why&amp;nbsp;--hcatalog-external-table is not working??&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The workaround is good, but I have many tables to move and it may not be easy for me to do the table creation manually.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Oct 2021 10:46:00 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Sqoop-from-Postgre-to-Hive-and-convert-to-ORC-format/m-p/327644#M230121</guid>
      <dc:creator>ram_</dc:creator>
      <dc:date>2021-10-14T10:46:00Z</dc:date>
    </item>
  </channel>
</rss>

