<?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: NiFi updateRecord - dealing with Blank fields in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356573#M237333</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to get ifElse working for me but the below gives me an empty string &amp;gt; ""&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_0-1667233807380.png" style="width: 850px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36107iAB098E6A60A05407/image-dimensions/850x74?v=v2" width="850" height="74" role="button" title="Griggsy_0-1667233807380.png" alt="Griggsy_0-1667233807380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And this gives me null as a string &amp;gt; "null"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_1-1667233936356.png" style="width: 820px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36108i943166CA58C9BEC7/image-dimensions/820x34?v=v2" width="820" height="34" role="button" title="Griggsy_1-1667233936356.png" alt="Griggsy_1-1667233936356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is there a way to return null not as a string?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 31 Oct 2022 16:33:15 GMT</pubDate>
    <dc:creator>Griggsy</dc:creator>
    <dc:date>2022-10-31T16:33:15Z</dc:date>
    <item>
      <title>NiFi updateRecord - dealing with Blank fields</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356378#M237274</link>
      <description>&lt;P&gt;Hello all&lt;/P&gt;&lt;P&gt;I have a slightly annoying problem in NiFi, I have some JSON records that have a field 'date' nested under 'sources' that I want to turn to Epoch time. Using updateRecord I am able to do this using the following config:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_0-1666948710849.png" style="width: 565px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36056iD6D8775569ECF58C/image-dimensions/565x103?v=v2" width="565" height="103" role="button" title="Griggsy_0-1666948710849.png" alt="Griggsy_0-1666948710849.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;As you can see where this field is present it works, however sometimes this field is not present, in these cases the record value is blank:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_1-1666949308722.png" style="width: 434px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36057i30DAF19921350198/image-dimensions/434x147?v=v2" width="434" height="147" role="button" title="Griggsy_1-1666949308722.png" alt="Griggsy_1-1666949308722.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;To do deal with these blank field I did some searching online and found the following 'isBlank' could be used in updateRecord property to deal with blank fields:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_2-1666949530183.png" style="width: 583px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36058i02E69F71C279DDD2/image-dimensions/583x129?v=v2" width="583" height="129" role="button" title="Griggsy_2-1666949530183.png" alt="Griggsy_2-1666949530183.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The outcome of this fixes the blank field issue... but, doesn't convert the present field values to epoch, see below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_3-1666949742086.png" style="width: 414px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36059i996A56C3461C83C0/image-dimensions/414x141?v=v2" width="414" height="141" role="button" title="Griggsy_3-1666949742086.png" alt="Griggsy_3-1666949742086.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how I can get these two actions to perform at the same time?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 09:39:26 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356378#M237274</guid>
      <dc:creator>Griggsy</dc:creator>
      <dc:date>2022-10-28T09:39:26Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi updateRecord - dealing with Blank fields</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356390#M237283</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/77674"&gt;@Griggsy&lt;/a&gt;&amp;nbsp; I would have to have working sample to test and provide better solution, that said i think you need to use function inside of the value, not the property.&amp;nbsp; &amp;nbsp;There you could also use ifElse making the NiFi Expression language operate for both scenarios.&amp;nbsp; &amp;nbsp;Chaining expressions together can be a challenge but should get you where you need to go.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 12:31:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356390#M237283</guid>
      <dc:creator>steven-matison</dc:creator>
      <dc:date>2022-10-28T12:31:33Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi updateRecord - dealing with Blank fields</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356509#M237316</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is a flow file example, as you can see the date field is only present in the array some of the time, what I want to achieve is, if the date is present I need it in epoch. If the date is not present for the field to be 'null,' (not "null" as a sting/in brackets) or ignored altogether.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt;"example": "cloudera",&lt;BR /&gt;"risk_rating": "low",&lt;BR /&gt;"observed" false,&lt;BR /&gt;"sources": [ {&lt;BR /&gt;"date": "2020-06-12T12:00:00.000Z",&lt;BR /&gt;"unique_id": "some_value",&lt;BR /&gt;"source_name": "cloudera",&lt;BR /&gt;"url": "&lt;A href="https://www.cloudera.com" target="_blank"&gt;https://www.cloudera.com&lt;/A&gt;",&lt;BR /&gt;"description": "example_log",&lt;BR /&gt;},{&lt;BR /&gt;"unique_id": "some_other_value",&lt;BR /&gt;"source_name": "google",&lt;BR /&gt;"url": "&lt;A href="https://www.google.com" target="_blank"&gt;https://www.google.com&lt;/A&gt;",&lt;BR /&gt;"description": "example_log_without_date"&lt;BR /&gt;}],&lt;BR /&gt;"report_confidence": "confirmed",&lt;BR /&gt;"base_score" 7.8,&lt;BR /&gt;"authentication": "none"&lt;BR /&gt;}&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 09:16:51 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356509#M237316</guid>
      <dc:creator>Griggsy</dc:creator>
      <dc:date>2022-10-31T09:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: NiFi updateRecord - dealing with Blank fields</title>
      <link>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356573#M237333</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/95503"&gt;@steven-matison&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have been trying to get ifElse working for me but the below gives me an empty string &amp;gt; ""&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_0-1667233807380.png" style="width: 850px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36107iAB098E6A60A05407/image-dimensions/850x74?v=v2" width="850" height="74" role="button" title="Griggsy_0-1667233807380.png" alt="Griggsy_0-1667233807380.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;And this gives me null as a string &amp;gt; "null"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Griggsy_1-1667233936356.png" style="width: 820px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/36108i943166CA58C9BEC7/image-dimensions/820x34?v=v2" width="820" height="34" role="button" title="Griggsy_1-1667233936356.png" alt="Griggsy_1-1667233936356.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;is there a way to return null not as a string?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Oct 2022 16:33:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/NiFi-updateRecord-dealing-with-Blank-fields/m-p/356573#M237333</guid>
      <dc:creator>Griggsy</dc:creator>
      <dc:date>2022-10-31T16:33:15Z</dc:date>
    </item>
  </channel>
</rss>

