<?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 How to execute Hive DDL Command from Apache NIFI ? in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-execute-Hive-DDL-Command-from-Apache-NIFI/m-p/208370#M170329</link>
    <description>&lt;P&gt;I am trying to create some tables in Hive from Apache NIFI but I didn't find any exact Processor for that. However I found a processor name PutHiveQl which can be used for DDL/DML operation but I didn't find any property in which I can write the query. If it is the right processor for this purpose then how it can be used in my case.&lt;/P&gt;</description>
    <pubDate>Mon, 04 Jun 2018 14:23:33 GMT</pubDate>
    <dc:creator>vivek_b3ds</dc:creator>
    <dc:date>2018-06-04T14:23:33Z</dc:date>
    <item>
      <title>How to execute Hive DDL Command from Apache NIFI ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-execute-Hive-DDL-Command-from-Apache-NIFI/m-p/208370#M170329</link>
      <description>&lt;P&gt;I am trying to create some tables in Hive from Apache NIFI but I didn't find any exact Processor for that. However I found a processor name PutHiveQl which can be used for DDL/DML operation but I didn't find any property in which I can write the query. If it is the right processor for this purpose then how it can be used in my case.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 14:23:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-execute-Hive-DDL-Command-from-Apache-NIFI/m-p/208370#M170329</guid>
      <dc:creator>vivek_b3ds</dc:creator>
      <dc:date>2018-06-04T14:23:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to execute Hive DDL Command from Apache NIFI ?</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-execute-Hive-DDL-Command-from-Apache-NIFI/m-p/208371#M170330</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/57161/vivekb3ds.html" nodeid="57161" target="_blank"&gt;@Vivek Singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;PutHiveQL processor is used to execute HiveDDL/DML commands and the processor expects incoming flowfile content would be HiveQL command.&lt;/P&gt;&lt;P&gt;You can keep your create table statement by using GenerateFlowfile processor (or) replacetext processor ..etc and feed the success relation to PutHiveQL processor then the processor executes the content of flowfile and creates the table.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Flow:&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="77532-flow.png" style="width: 1050px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16868i637D4353F042C9EE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="77532-flow.png" alt="77532-flow.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;GenerateFlowfile configs:&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="77533-gff.png" style="width: 1675px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16869i6B198A1AF633A6FF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="77533-gff.png" alt="77533-gff.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;PuthiveQL configs:&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Configure/enable HiveConnection pool and if you are having more than one HiveDDL/DML command in the flowfile content then use ; as delimiter then the processor will execute those commands with the specified delimiter.&lt;/P&gt;&lt;P&gt;In NiFi convertAvroTo ORC processor adds hive.ddl attribute based on the flowfile content we can make use of that attribute and then use ReplaceText processor to create new flowfile content and execute the hive ddl statement using PutHiveQL processor.&lt;/P&gt;&lt;P&gt;Please refer to &lt;A href="https://community.hortonworks.com/articles/108718/ingesting-rdbms-data-as-new-tables-arrive-automagi.html" target="_blank" rel="nofollow noopener noreferrer"&gt;this&lt;/A&gt; link for more details regarding generating/executing hive.ddl statements using NiFi.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:23:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-execute-Hive-DDL-Command-from-Apache-NIFI/m-p/208371#M170330</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T04:23:25Z</dc:date>
    </item>
  </channel>
</rss>

