<?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 Incremetnals Update and Delete Using NiFi in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/242227#M204030</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Please help me on the below issue&lt;/P&gt;&lt;P&gt;I am ingesting the Data From Oracle to PostgresSql Using NiFi.&lt;/P&gt;&lt;P&gt;We have huge data and continuously generating from sources, I want to update attributes and delete attributes using NiFi &lt;/P&gt;&lt;P&gt;My Flow is: QueryDatabaseRecord--&amp;gt;UpdateAttribute--&amp;gt;PutDatabaseRecord&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;when matched record found on the final table&lt;/STRONG&gt; then define which action you need to take either Update (or) Delete&lt;/LI&gt;&lt;LI&gt;if the &lt;STRONG&gt;record not matched in the final dataset&lt;/STRONG&gt; then insert the record.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
    <pubDate>Wed, 16 Jan 2019 00:47:53 GMT</pubDate>
    <dc:creator>dileepkumar_upp</dc:creator>
    <dc:date>2019-01-16T00:47:53Z</dc:date>
    <item>
      <title>Incremetnals Update and Delete Using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/242227#M204030</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Please help me on the below issue&lt;/P&gt;&lt;P&gt;I am ingesting the Data From Oracle to PostgresSql Using NiFi.&lt;/P&gt;&lt;P&gt;We have huge data and continuously generating from sources, I want to update attributes and delete attributes using NiFi &lt;/P&gt;&lt;P&gt;My Flow is: QueryDatabaseRecord--&amp;gt;UpdateAttribute--&amp;gt;PutDatabaseRecord&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;when matched record found on the final table&lt;/STRONG&gt; then define which action you need to take either Update (or) Delete&lt;/LI&gt;&lt;LI&gt;if the &lt;STRONG&gt;record not matched in the final dataset&lt;/STRONG&gt; then insert the record.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Appreciate your help.&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 00:47:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/242227#M204030</guid>
      <dc:creator>dileepkumar_upp</dc:creator>
      <dc:date>2019-01-16T00:47:53Z</dc:date>
    </item>
    <item>
      <title>Re: Incremetnals Update and Delete Using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/242228#M204031</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/102418/dileepkumaruppu.html" nodeid="102418"&gt;@Deppu&lt;/A&gt;&lt;/P&gt;&lt;P&gt;If you are able to identify insert/updates then set &lt;STRONG&gt;statement.type&lt;/STRONG&gt; attribute to the flowfile then based on the attribute value &lt;A href="https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi/nifi-standard-nar/1.8.0/org.apache.nifi.processors.standard.PutDatabaseRecord/index.html" target="_blank"&gt;PutDatabaseRecord&lt;/A&gt; processor will run &lt;STRONG&gt;Update/Insert/Delete&lt;/STRONG&gt; Statements.&lt;/P&gt;&lt;P&gt;-&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;This is kind of hacky way to do this:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;If you are not able to identify &lt;STRONG&gt;inserts/updates&lt;/STRONG&gt; then split the records into each record individually using SplitRecord processor then&lt;STRONG&gt; run two/three successive PutDatabaseRecord&lt;/STRONG&gt; processors.&lt;/P&gt;&lt;UL&gt;
&lt;LI&gt;You need to make decision how to&lt;STRONG&gt; identify Deletes/Updates&lt;/STRONG&gt;. because if insert fails then you can try with either update statement type (or) delete statement type.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Flow:&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;1. FirstPutDatabaseRecord //insert statementtype use failure connection to next PutDatabaseRecord
2.SecondPutDatabaseRecord //update statementtype,use failure connection to next PutDatabaseRecord.
3.ThirdPutDatabaseRecord //delete statementtype&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;EM&gt;&lt;U&gt;Note:&lt;/U&gt;&lt;/EM&gt;&lt;/STRONG&gt; I'm guessing this flow but rearrange these processors as per your logic.&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 08:18:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/242228#M204031</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-01-16T08:18:27Z</dc:date>
    </item>
    <item>
      <title>Re: Incremetnals Update and Delete Using NiFi</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/311410#M224641</link>
      <description>&lt;P&gt;This solution will not work. The failure flow does not go to next putDatabaseRecord processor because the error is exception. Failure flow files will go nowhere&lt;/P&gt;</description>
      <pubDate>Fri, 12 Feb 2021 08:10:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Incremetnals-Update-and-Delete-Using-NiFi/m-p/311410#M224641</guid>
      <dc:creator>JohnNi</dc:creator>
      <dc:date>2021-02-12T08:10:03Z</dc:date>
    </item>
  </channel>
</rss>

