<?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: Hi, question in nifi updateattribute processor in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319272#M227747</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; Thank you so much for responding,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to rename the outgoing file as such "name_timestamp". want to name each file with the following standard "name"+"_"+"timestamp"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the issue is solved after changing destination value from flowfile-content to flowfile-attribute&lt;/P&gt;&lt;P&gt;initially it was pointing to flowfile-content and I dont see the custom extracted attributes in attribute section, but after changing to flowfile-attribute, I can see the extracted values in the attribute section&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mahi123_0-1624540620596.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31674i5FA37D7155F08D7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mahi123_0-1624540620596.png" alt="Mahi123_0-1624540620596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much&lt;/P&gt;</description>
    <pubDate>Thu, 24 Jun 2021 13:18:27 GMT</pubDate>
    <dc:creator>Mahi123</dc:creator>
    <dc:date>2021-06-24T13:18:27Z</dc:date>
    <item>
      <title>Hi, question in nifi updateattribute processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319219#M227725</link>
      <description>&lt;P&gt;I have a processor EvaluateJsonPath processor which is extracting two fields from json file(coming from GETFile processor) which contains&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;"name": "Jon",&lt;/P&gt;&lt;P&gt;"title": "king of the nights watch"&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;after extracting name in EvaluateJsonPath processor as $.name, I want to to write this data to put file processor but before writing I want to change the name of the file such as&lt;/P&gt;&lt;P&gt;name+timestamp, ex: jon_23-06-2021&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have tried updateattribute processor something like&amp;nbsp;&lt;/P&gt;&lt;P&gt;{name}_${now():format('yyyy-MM-dd-HH-mm-ss')}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but its not working, could some one help me here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 01:01:31 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319219#M227725</guid>
      <dc:creator>Mahi123</dc:creator>
      <dc:date>2021-06-24T01:01:31Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, question in nifi updateattribute processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319266#M227743</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/89762"&gt;@Mahi123&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Just to make sure i understand your use case correctly, you want to change the content only of your NiFi FlowFile?&lt;BR /&gt;&lt;BR /&gt;You have a NiFi FlowFile with following json content:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"name": "Jon",
"title": "king of the nights watch"
}&lt;/LI-CODE&gt;&lt;P&gt;and you want to modify it to:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
"name": "Jon_&amp;lt;current date&amp;gt;",
"title": "king of the nights watch"
}&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;I read your statement "&lt;SPAN&gt;I want to change the name of the file" as wanting to edit the filename and not the content of the file itself.&amp;nbsp; Which is something totally different than above.&lt;BR /&gt;&lt;BR /&gt;Assuming you are looking to modify content and not the filename itself, you can do this using the ReplaceText processor after your EvaluateJsonPath processor.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MattWho_0-1624537112850.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31672i8A9246086B52D997/image-size/medium?v=v2&amp;amp;px=400" role="button" title="MattWho_0-1624537112850.png" alt="MattWho_0-1624537112850.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Search Value =&amp;nbsp;("name": "${name}")&lt;BR /&gt;Replacement Value =&amp;nbsp;"name": "${name}_${now():format('yyyy-MM-dd-HH-mm-ss')}"&lt;BR /&gt;Replacement Strategy = Regex Replace&lt;BR /&gt;Evaluation Mode = Line-by-Line&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;NiFi typically has more than one way to satisfy the use case and there may be better option than the above using the various available record based processors.&amp;nbsp; You may want to explore those as well.&lt;BR /&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;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Matt&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 12:22:25 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319266#M227743</guid>
      <dc:creator>MattWho</dc:creator>
      <dc:date>2021-06-24T12:22:25Z</dc:date>
    </item>
    <item>
      <title>Re: Hi, question in nifi updateattribute processor</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319272#M227747</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; Thank you so much for responding,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to rename the outgoing file as such "name_timestamp". want to name each file with the following standard "name"+"_"+"timestamp"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and the issue is solved after changing destination value from flowfile-content to flowfile-attribute&lt;/P&gt;&lt;P&gt;initially it was pointing to flowfile-content and I dont see the custom extracted attributes in attribute section, but after changing to flowfile-attribute, I can see the extracted values in the attribute section&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Mahi123_0-1624540620596.png" style="width: 400px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/31674i5FA37D7155F08D7A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Mahi123_0-1624540620596.png" alt="Mahi123_0-1624540620596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;thank you very much&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 13:18:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Hi-question-in-nifi-updateattribute-processor/m-p/319272#M227747</guid>
      <dc:creator>Mahi123</dc:creator>
      <dc:date>2021-06-24T13:18:27Z</dc:date>
    </item>
  </channel>
</rss>

