<?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: Parse and modify data befor calling PutDatabaseRecord in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222320#M184192</link>
    <description>&lt;P&gt;You can use the ReplaceText processor. Use ${attribute_name} to write an attribute in your text.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Aug 2017 23:46:15 GMT</pubDate>
    <dc:creator>quentin_toulou</dc:creator>
    <dc:date>2017-08-22T23:46:15Z</dc:date>
    <item>
      <title>Parse and modify data befor calling PutDatabaseRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222315#M184187</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I've just started with nifi and am very new to its workings. I'm using version 1.3.0&lt;/P&gt;&lt;P&gt;I have a flow where i read some data from a microsoft sql db table using ExecuteSQL and then have PutDatabaseRecrod processor insert it into a mysql database. It works straight out of the box.&lt;/P&gt;&lt;P&gt;Before the PutDatabaseRecord i need to parse (regexp) value of a column, and create new fields.&lt;/P&gt;&lt;P&gt;I would appreciate if someone can hint out as to what processor to use here.&lt;/P&gt;&lt;P&gt;Thanks &amp;amp; regards,&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 14:13:41 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222315#M184187</guid>
      <dc:creator>quiz_oxis</dc:creator>
      <dc:date>2017-08-18T14:13:41Z</dc:date>
    </item>
    <item>
      <title>Re: Parse and modify data befor calling PutDatabaseRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222316#M184188</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;A common flow to modify your data is : ConvertAvroToJson -&amp;gt; splitJson -&amp;gt; EvaluateJsonPath -&amp;gt; UpdateAttribute&lt;/P&gt;&lt;P&gt;So you will have one flowfile by row and with the EvaluateJsonPath you convert your fields as attributes of this flowfile. After that you can use UpdateAttribute to modify an attribute or add new one. You can use Nifi Expression Language.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2017 16:10:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222316#M184188</guid>
      <dc:creator>quentin_toulou</dc:creator>
      <dc:date>2017-08-18T16:10:20Z</dc:date>
    </item>
    <item>
      <title>Re: Parse and modify data befor calling PutDatabaseRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222317#M184189</link>
      <description>&lt;P&gt;Thanks Quentin, it works but i couldn't figure out the UpdateAttribute part. Using EvaluateJsonPath creates the attribute (&lt;/P&gt;&lt;P&gt;ZComponent) with a value &lt;/P&gt;&lt;PRE&gt;Sis_Grp.Dom="LOCAPPLE",Name="CrashGuard"&lt;/PRE&gt;&lt;P&gt;I now need to parse this value into seperate attributes. how can i achieved this with updateattribute&lt;/P&gt;&lt;PRE&gt;Sis_Grp.Dom=LOCAPPLE and Name=CrashGuard&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 17:30:24 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222317#M184189</guid>
      <dc:creator>quiz_oxis</dc:creator>
      <dc:date>2017-08-22T17:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: Parse and modify data befor calling PutDatabaseRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222318#M184190</link>
      <description>&lt;P&gt;With the UpdateAttribute, you can add your own property. (With the '+' button in the 'Properties' tab)&lt;/P&gt;&lt;P&gt;Add a property with the name : Sis_Grp.Dom and the value  : ${ZComponent:substringAfter('"'):substringBefore('"')}&lt;/P&gt;&lt;P&gt;(the argument for the substringBefore is double quote between simple quotes.)&lt;/P&gt;&lt;P&gt;and a second with the name : Name and the value : ${ZComponent:substringAfter('Name="'):substringBefore('"')}&lt;/P&gt;&lt;P&gt;You can find all the Nifi Expression language &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html"&gt;here&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 20:24:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222318#M184190</guid>
      <dc:creator>quentin_toulou</dc:creator>
      <dc:date>2017-08-22T20:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: Parse and modify data befor calling PutDatabaseRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222319#M184191</link>
      <description>&lt;P&gt;That works, i now have two new attributes. how can i add them to my flowfile content?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 21:22:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222319#M184191</guid>
      <dc:creator>quiz_oxis</dc:creator>
      <dc:date>2017-08-22T21:22:55Z</dc:date>
    </item>
    <item>
      <title>Re: Parse and modify data befor calling PutDatabaseRecord</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222320#M184192</link>
      <description>&lt;P&gt;You can use the ReplaceText processor. Use ${attribute_name} to write an attribute in your text.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 23:46:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Parse-and-modify-data-befor-calling-PutDatabaseRecord/m-p/222320#M184192</guid>
      <dc:creator>quentin_toulou</dc:creator>
      <dc:date>2017-08-22T23:46:15Z</dc:date>
    </item>
  </channel>
</rss>

