<?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: JSON file  with operation values ADD/MODIFY based on this I need to send JSON data to INSERT or UPDATE in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292339#M216034</link>
    <description>&lt;P&gt;After you get all the attributes you want, &amp;nbsp;you check them with RouteOnAttribute. &amp;nbsp;In that proc click + and set update / inserts equal to matches you want. &amp;nbsp;You use regex in the value for each. For example insert &amp;nbsp;is ${operation.equals('add')}. After RouteOnAttribute is configured, drag update to the update query proc, and insert to the insert query proc.&lt;/P&gt;</description>
    <pubDate>Mon, 23 Mar 2020 19:05:50 GMT</pubDate>
    <dc:creator>stevenmatison</dc:creator>
    <dc:date>2020-03-23T19:05:50Z</dc:date>
    <item>
      <title>JSON file  with operation values ADD/MODIFY based on this I need to send JSON data to INSERT or UPDATE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292252#M215992</link>
      <description>&lt;P&gt;My file:&lt;/P&gt;
&lt;P&gt;"ws:Operation": "ADD",&lt;BR /&gt;"ws:Supervisor_Name": {&lt;BR /&gt;"ws:PriorValue": "",&lt;BR /&gt;"content": "Dr. Leah Thaler"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In above example i need to send the&amp;nbsp;content:Dr. Leah Thaler to insert&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My file:&lt;/P&gt;
&lt;P&gt;"ws:Operation": "MODIFY",&lt;BR /&gt;"ws:Supervisor_Name": {&lt;BR /&gt;"ws:PriorValue": "",&lt;BR /&gt;"content": "Dr. Leah Thal"&lt;/P&gt;
&lt;P&gt;In above example i need to send the&amp;nbsp;content:Dr. Leah Thaler to update.&lt;/P&gt;
&lt;P&gt;Database is Oracle - the flow: Getfile-&amp;gt; EvaluateJSONPath -&amp;gt; send the data to two tables using AttributesToJSON for flatten JSON -&amp;gt; ConvertJSONSQL to Putsql.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note: I dont want to write AVRO schema. So we build this flow&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="2020-03-23 09_48_22-NiFi Flow.png" style="width: 999px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26800i4FB4CA9DB65E09D8/image-size/large?v=v2&amp;amp;px=999" role="button" title="2020-03-23 09_48_22-NiFi Flow.png" alt="2020-03-23 09_48_22-NiFi Flow.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 01:05:05 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292252#M215992</guid>
      <dc:creator>MPraveen</dc:creator>
      <dc:date>2020-03-23T01:05:05Z</dc:date>
    </item>
    <item>
      <title>Re: JSON file  with operation values ADD/MODIFY based on this I need to send JSON data to INSERT or UPDATE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292339#M216034</link>
      <description>&lt;P&gt;After you get all the attributes you want, &amp;nbsp;you check them with RouteOnAttribute. &amp;nbsp;In that proc click + and set update / inserts equal to matches you want. &amp;nbsp;You use regex in the value for each. For example insert &amp;nbsp;is ${operation.equals('add')}. After RouteOnAttribute is configured, drag update to the update query proc, and insert to the insert query proc.&lt;/P&gt;</description>
      <pubDate>Mon, 23 Mar 2020 19:05:50 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292339#M216034</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-03-23T19:05:50Z</dc:date>
    </item>
    <item>
      <title>Re: JSON file  with operation values ADD/MODIFY based on this I need to send JSON data to INSERT or UPDATE</title>
      <link>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292588#M216182</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp;. worked perfectly..&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 01:48:47 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/JSON-file-with-operation-values-ADD-MODIFY-based-on-this-I/m-p/292588#M216182</guid>
      <dc:creator>MPraveen</dc:creator>
      <dc:date>2020-03-26T01:48:47Z</dc:date>
    </item>
  </channel>
</rss>

