<?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 Re: hdfs Avro format file need to insert into Hive ORCTable  in nifi in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hdfs-Avro-format-file-need-to-insert-into-Hive-ORCTable-in/m-p/195899#M83907</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/91299/hariprasanthmadhavan.html" nodeid="91299"&gt;@Hariprasanth Madhavan&lt;/A&gt;&lt;P&gt;There are lot of ways to insert data into `HiveORC` table from NiFi.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Method1: Using PutHiveStreaming Processor:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;Create &lt;A href="https://hortonworks.com/tutorial/using-hive-acid-transactions-to-insert-update-and-delete-data/" target="_blank"&gt;transactional table&lt;/A&gt; and then feed the avro data to PutHivestreaming table.&lt;/P&gt;&lt;P&gt;As HiveStreaming processor converts the avro format data into &lt;STRONG&gt;ORC format&lt;/STRONG&gt; and regards to all delta files you can use major compaction to create one base file. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Method2: ConvertAvroToORC in NiFi and store into HDFS:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;ConvertAvroToORC &lt;/STRONG&gt;processor to convert the avro format data into ORC format.&lt;/P&gt;&lt;P&gt;Store the data into HDFS and create an External hive table pointing to the same HDFS directory.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Method3: Create Avro table and load from Avro table to ORC table:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Based on the avro file we are having in NiFi we can create avro tables dynamically based on &lt;STRONG&gt;avro.schema.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Create an orc table and after storing the avro data into HDFS use PutHiveQL processor to run &lt;/P&gt;&lt;P&gt;insert into ORC table select * from Avro table&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://stackoverflow.com/questions/52465233/extracting-multiline-content-from-flow-file-content/" target="_blank"&gt;this&lt;/A&gt; link for more details regards to create avro table dynamically.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue, &lt;STRONG&gt;Click on Accept button below to accept the answer, &lt;/STRONG&gt;That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
    <pubDate>Fri, 28 Sep 2018 21:04:37 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2018-09-28T21:04:37Z</dc:date>
    <item>
      <title>hdfs Avro format file need to insert into Hive ORCTable  in nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hdfs-Avro-format-file-need-to-insert-into-Hive-ORCTable-in/m-p/195898#M83906</link>
      <description>&lt;P&gt;hdfs Avro formatted file insert into HiveORC formatted table &lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 12:30:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hdfs-Avro-format-file-need-to-insert-into-Hive-ORCTable-in/m-p/195898#M83906</guid>
      <dc:creator>hariprasanthmad</dc:creator>
      <dc:date>2018-09-28T12:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: hdfs Avro format file need to insert into Hive ORCTable  in nifi</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/hdfs-Avro-format-file-need-to-insert-into-Hive-ORCTable-in/m-p/195899#M83907</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/91299/hariprasanthmadhavan.html" nodeid="91299"&gt;@Hariprasanth Madhavan&lt;/A&gt;&lt;P&gt;There are lot of ways to insert data into `HiveORC` table from NiFi.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Method1: Using PutHiveStreaming Processor:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;BR /&gt;Create &lt;A href="https://hortonworks.com/tutorial/using-hive-acid-transactions-to-insert-update-and-delete-data/" target="_blank"&gt;transactional table&lt;/A&gt; and then feed the avro data to PutHivestreaming table.&lt;/P&gt;&lt;P&gt;As HiveStreaming processor converts the avro format data into &lt;STRONG&gt;ORC format&lt;/STRONG&gt; and regards to all delta files you can use major compaction to create one base file. &lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Method2: ConvertAvroToORC in NiFi and store into HDFS:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Use &lt;STRONG&gt;ConvertAvroToORC &lt;/STRONG&gt;processor to convert the avro format data into ORC format.&lt;/P&gt;&lt;P&gt;Store the data into HDFS and create an External hive table pointing to the same HDFS directory.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;&lt;EM&gt;Method3: Create Avro table and load from Avro table to ORC table:&lt;/EM&gt;&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Based on the avro file we are having in NiFi we can create avro tables dynamically based on &lt;STRONG&gt;avro.schema.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Create an orc table and after storing the avro data into HDFS use PutHiveQL processor to run &lt;/P&gt;&lt;P&gt;insert into ORC table select * from Avro table&lt;/P&gt;&lt;P&gt;Refer to &lt;A href="https://stackoverflow.com/questions/52465233/extracting-multiline-content-from-flow-file-content/" target="_blank"&gt;this&lt;/A&gt; link for more details regards to create avro table dynamically.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;If the Answer helped to resolve your issue, &lt;STRONG&gt;Click on Accept button below to accept the answer, &lt;/STRONG&gt;That would be great help to Community users to find solution quickly for these kind of issues.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Sep 2018 21:04:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/hdfs-Avro-format-file-need-to-insert-into-Hive-ORCTable-in/m-p/195899#M83907</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-09-28T21:04:37Z</dc:date>
    </item>
  </channel>
</rss>

