<?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: To loop through the dataflow in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/319269#M227745</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87710"&gt;@midee&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I just ran the test myself with your sample as a one line formatted json and it still worked.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id": "1155391","key": "DPGAUT-2","fields": {"customfield_10001": null,"customfield_10002": null,"customfield_10003": null,"customfield_10004": null,"customfield_10005": null,"customfield_10006": null,"resolution": null,"customfield_10101": "","customfield_10007": null,"customfield_10008": null,"customfield_10009": "This is required value","customfield_10010": null,"customfield_10011": null,"customfield_10012": null,"customfield_10013": null,}}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Make sure your RouteOnContent processor dynamic property value does not have a line return in it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1624537965478.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31673i8C42F48E2AE90261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattWho_0-1624537965478.png" alt="MattWho_0-1624537965478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You'll notice it only shows "1" line above. If you see a "2" line then you have a line return in your Value field which would cause the issue you are seeing.&lt;BR /&gt;&lt;BR /&gt;Hope this helped,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 12:34:13 GMT</pubDate>
    <dc:creator>MattWho</dc:creator>
    <dc:date>2021-06-24T12:34:13Z</dc:date>
    <item>
      <title>To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/317754#M227310</link>
      <description>&lt;P&gt;I have dataflow files which has to be routed on the basis of certain criteria.&lt;/P&gt;&lt;P&gt;It has multiple field like ("Customefied_23456: "Null") in the &lt;STRONG&gt;key: value&lt;/STRONG&gt; pair. My query is how&amp;nbsp; to filter out the flowfile which contain the some value for customfield (&lt;STRONG&gt;"customfield_33749": "this is required value"&lt;/STRONG&gt;,). i.e it does not contain null like&amp;nbsp; ("Customefied_23456: "Null").&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please let me know how to proceed in this case.&lt;/P&gt;&lt;P&gt;thanks in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="midee_0-1622991181191.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31432iED2F5FF2BF6E5182/image-size/medium?v=v2&amp;amp;px=400" role="button" title="midee_0-1622991181191.png" alt="midee_0-1622991181191.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 06 Jun 2021 14:59:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/317754#M227310</guid>
      <dc:creator>midee</dc:creator>
      <dc:date>2021-06-06T14:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/317931#M227359</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please advise me on this issue.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Issue&lt;/STRONG&gt;:&lt;/P&gt;&lt;P&gt;&amp;nbsp;In the flow file which contain at least customfield_&amp;nbsp; with some value other than &lt;STRONG&gt;null&lt;/STRONG&gt; should be routed to another processor and the flowfile which has all null value should be moved to other processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks in advance!&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 14:47:35 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/317931#M227359</guid>
      <dc:creator>midee</dc:creator>
      <dc:date>2021-06-08T14:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/317997#M227383</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87710"&gt;@midee&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;This use case is really not clear to me.&lt;BR /&gt;&lt;BR /&gt;The image you shared is the content of a single FlowFile and that content has numerous "&lt;SPAN&gt;customfield_" fields with most being "null" and one having a string value.&lt;BR /&gt;&lt;BR /&gt;So you are asking that this 1 FlowFile with both null and non-null "customfield_" fields is routed to the path &lt;STRONG&gt;A&lt;/STRONG&gt; because&amp;nbsp;&lt;U&gt;&lt;EM&gt;at least one&lt;/EM&gt;&lt;/U&gt; "customfield_" field as a non-null string?&amp;nbsp; The content would&amp;nbsp;remain unedited.&lt;BR /&gt;&lt;BR /&gt;And you want other FlowFiles where the content contains nothing but all "customfield_" fields with null value routed to path &lt;STRONG&gt;B&lt;/STRONG&gt;?&amp;nbsp; The content would remain unedited.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Matt&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 13:33:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/317997#M227383</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-06-09T13:33:13Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/318001#M227385</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, your analysis is correct.&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;So you are asking that this 1 FlowFile with both null and non-null "customfield_" fields is routed to the path&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;A&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;because&amp;nbsp;&lt;/SPAN&gt;&lt;U&gt;&lt;EM&gt;at least one&lt;/EM&gt;&lt;/U&gt;&lt;SPAN&gt;&amp;nbsp;"customfield_" field as a non-null string?&amp;nbsp; The content would&amp;nbsp;remain unedited.&amp;nbsp; ..&lt;FONT color="#0000FF"&gt;Yes, the flowfile which will contain at least one non-null value should be moved to other processor without content modification.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And you want other FlowFiles where the content contains nothing but all "customfield_" fields with null value routed to path&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;B&lt;/STRONG&gt;&lt;SPAN&gt;?&amp;nbsp; The content would remain unedited. --&lt;FONT color="#0000FF"&gt;Yes, it is the same.&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Please suggest on this.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000000"&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 13:49:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/318001#M227385</guid>
      <dc:creator>midee</dc:creator>
      <dc:date>2021-06-09T13:49:42Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/318482#M227472</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87710"&gt;@midee&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You could use a routeOnContent [1]processor to accomplish this.&amp;nbsp; You would create a Java regex that matches only on customfield(s) where there is a string wrapped in quotes.&amp;nbsp; If found, it routes entire FlowFile to the relationship created using the dynamic property's name.&lt;BR /&gt;&lt;BR /&gt;RouteOnContent configuration:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1623675382126.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31526iB9894C481FB17D98/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattWho_0-1623675382126.png" alt="MattWho_0-1623675382126.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I noticed in you example you have two customfield entries that do not have "null"&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"customfield_10001": "This is required value",
"customfield_10002": "",&lt;/LI-CODE&gt;&lt;P&gt;Based on my regex provided above, both of these would match resulting in FlowFile being routed to the "NotNull" relationship.&lt;BR /&gt;If i were to change the second&amp;nbsp;&lt;STRONG&gt;&lt;FONT color="#FF0000"&gt;.*?&lt;/FONT&gt;&lt;/STRONG&gt; to&amp;nbsp;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;.+?&lt;/STRONG&gt;&lt;/FONT&gt; , then the customfield that contained only quotes would not match (just in case you only want to route when it is not null and not empty.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"customfield_.+?": ".*?",&lt;/LI-CODE&gt;&lt;P&gt;versus&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;"customfield_.+?": ".+?",&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;If you found this addressed your query, please take a moment to login and click "accept" on this solution.&lt;BR /&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Mon, 14 Jun 2021 13:03:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/318482#M227472</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-06-14T13:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/318862#M227563</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your response and it work as per my requirement.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Jun 2021 06:59:33 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/318862#M227563</guid>
      <dc:creator>midee</dc:creator>
      <dc:date>2021-06-17T06:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/319120#M227688</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/35454"&gt;@MattWho&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;When I applied the solution provided by you on the flowfile (formatted json ), it works as expected.&lt;/P&gt;&lt;P&gt;However, when the same expression was applied to the flowfile in original form(one line json file), it was not working as expected.&lt;/P&gt;&lt;P&gt;Could you please let me know this unexpected behavior.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jun 2021 12:45:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/319120#M227688</guid>
      <dc:creator>midee</dc:creator>
      <dc:date>2021-06-22T12:45:54Z</dc:date>
    </item>
    <item>
      <title>Re: To loop through the dataflow</title>
      <link>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/319269#M227745</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/87710"&gt;@midee&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I just ran the test myself with your sample as a one line formatted json and it still worked.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{"expand": "renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id": "1155391","key": "DPGAUT-2","fields": {"customfield_10001": null,"customfield_10002": null,"customfield_10003": null,"customfield_10004": null,"customfield_10005": null,"customfield_10006": null,"resolution": null,"customfield_10101": "","customfield_10007": null,"customfield_10008": null,"customfield_10009": "This is required value","customfield_10010": null,"customfield_10011": null,"customfield_10012": null,"customfield_10013": null,}}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Make sure your RouteOnContent processor dynamic property value does not have a line return in it.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1624537965478.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31673i8C42F48E2AE90261/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattWho_0-1624537965478.png" alt="MattWho_0-1624537965478.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You'll notice it only shows "1" line above. If you see a "2" line then you have a line return in your Value field which would cause the issue you are seeing.&lt;BR /&gt;&lt;BR /&gt;Hope this helped,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 12:34:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/To-loop-through-the-dataflow/m-p/319269#M227745</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-06-24T12:34:13Z</dc:date>
    </item>
  </channel>
</rss>

