<?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 Nifi date filename in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-date-filename/m-p/172305#M50178</link>
    <description>&lt;P&gt;I'm constantly moving logs for storage and was looking for a way to change the filenames in a given nifi flow.  for example, if i'm getting a load of files from say /var/log*, is there a way in my flow that i'm using to adjust the filename and add on to it so i have the date?So for example if i have webapp.log, i would like to move it and have the file name changed to webapp.log(todaysdate).  Is there a processor in NiFi that will do this?&lt;/P&gt;</description>
    <pubDate>Tue, 27 Dec 2016 04:04:04 GMT</pubDate>
    <dc:creator>pacificobuzz</dc:creator>
    <dc:date>2016-12-27T04:04:04Z</dc:date>
    <item>
      <title>Nifi date filename</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-date-filename/m-p/172305#M50178</link>
      <description>&lt;P&gt;I'm constantly moving logs for storage and was looking for a way to change the filenames in a given nifi flow.  for example, if i'm getting a load of files from say /var/log*, is there a way in my flow that i'm using to adjust the filename and add on to it so i have the date?So for example if i have webapp.log, i would like to move it and have the file name changed to webapp.log(todaysdate).  Is there a processor in NiFi that will do this?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Dec 2016 04:04:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-date-filename/m-p/172305#M50178</guid>
      <dc:creator>pacificobuzz</dc:creator>
      <dc:date>2016-12-27T04:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Nifi date filename</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-date-filename/m-p/172306#M50179</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/15101/pacificobuzz.html" nodeid="15101" target="_blank"&gt;@David Parkins&lt;/A&gt; &lt;/P&gt;&lt;P&gt;Your best option for doing this is going to be using the
UpdateAttribute processor and then using a little NiFi Expression Language to
append the date onto your file.  From
there you should be able to configure.  I
created a sample flow and used the following config and achieved the following
results:&lt;/P&gt;&lt;P&gt;/var/log/log1.log&lt;/P&gt;&lt;P&gt;New filename: log1.log.2016-12-26 15:10:25.966Z&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10810-updateattributedate.png" style="width: 2164px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20004i3AEE7ED96E63214D/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10810-updateattributedate.png" alt="10810-updateattributedate.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is the config on the updateAttribute processor:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="10822-processorconfig.png" style="width: 1954px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/20005i1C927F3DD7C66946/image-size/medium?v=v2&amp;amp;px=400" role="button" title="10822-processorconfig.png" alt="10822-processorconfig.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;This is just a sample, you could do a lot better using append/prepend with NiFi Expression Language.  There is more info here: &lt;A href="https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html" rel="nofollow noopener noreferrer" target="_blank"&gt;https://nifi.apache.org/docs/nifi-docs/html/expression-language-guide.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 10:33:40 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Nifi-date-filename/m-p/172306#M50179</guid>
      <dc:creator>dpinkston</dc:creator>
      <dc:date>2019-08-18T10:33:40Z</dc:date>
    </item>
  </channel>
</rss>

