<?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: Change the filename after putHDFS processor to a more user friendly name in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223068#M69832</link>
    <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20255/dheeruksingh.html" nodeid="20255" target="_blank"&gt;@dhieru singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in update attribute processor add new property by clicking + sign&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name of property:- &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;filename&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;value of the property:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;what ever name you want to keep for file&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39839-change-filename.png" style="width: 641px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15625i6440518B18263520/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39839-change-filename.png" alt="39839-change-filename.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to append with timestamp then use EL&lt;/P&gt;&lt;PRE&gt;&amp;lt;new-file-name&amp;gt;_${now():format("yyyyMMddHHmmss")}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if my &lt;STRONG&gt;input filename&lt;/STRONG&gt; is &lt;/P&gt;&lt;PRE&gt;foo &lt;/PRE&gt;&lt;P&gt;and i want to &lt;STRONG&gt;change&lt;/STRONG&gt; the &lt;STRONG&gt;filename&lt;/STRONG&gt; to &lt;STRONG&gt;bar_timestamp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;then my &lt;STRONG&gt;UpdateAttribute&lt;/STRONG&gt; processor new property would be&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;filename &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;bar_${now():format("yyyyMMddHHmmss")}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;output filename would be&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;bar_20171017132115&lt;/PRE&gt;</description>
    <pubDate>Sun, 18 Aug 2019 01:58:42 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2019-08-18T01:58:42Z</dc:date>
    <item>
      <title>Change the filename after putHDFS processor to a more user friendly name</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223067#M69831</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I am merging the events from log source using a merge Content processor, and putting it to PutHDFS. PutHDFS writes using the filename uuid_date0901417, I need to change this filename to a more user friendly name. &lt;/P&gt;&lt;P&gt;I researched a little bit I found this link &lt;/P&gt;&lt;P&gt;&lt;A href="http://apache-nifi.1125220.n5.nabble.com/Best-way-to-generate-a-new-filename-td8835.html" target="_blank"&gt;http://apache-nifi.1125220.n5.nabble.com/Best-way-to-generate-a-new-filename-td8835.html&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But refering this link I could change only the directory structure according to date.&lt;/P&gt;&lt;P&gt;I am not able to use the Updateattribute processor correctly to change the filename. How do I proceed, create a property in updateAttribute procesor and the  give an expression language containing userfriendlyname_datetime. How will this EL look like?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Dhiren&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 00:11:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223067#M69831</guid>
      <dc:creator>dhieru</dc:creator>
      <dc:date>2017-10-18T00:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Change the filename after putHDFS processor to a more user friendly name</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223068#M69832</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/20255/dheeruksingh.html" nodeid="20255" target="_blank"&gt;@dhieru singh&lt;/A&gt;&lt;/P&gt;&lt;P&gt;in update attribute processor add new property by clicking + sign&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Name of property:- &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;filename&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;value of the property:-&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;what ever name you want to keep for file&amp;gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="39839-change-filename.png" style="width: 641px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/15625i6440518B18263520/image-size/medium?v=v2&amp;amp;px=400" role="button" title="39839-change-filename.png" alt="39839-change-filename.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;If you want to append with timestamp then use EL&lt;/P&gt;&lt;PRE&gt;&amp;lt;new-file-name&amp;gt;_${now():format("yyyyMMddHHmmss")}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;&lt;U&gt;Example:-&lt;/U&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if my &lt;STRONG&gt;input filename&lt;/STRONG&gt; is &lt;/P&gt;&lt;PRE&gt;foo &lt;/PRE&gt;&lt;P&gt;and i want to &lt;STRONG&gt;change&lt;/STRONG&gt; the &lt;STRONG&gt;filename&lt;/STRONG&gt; to &lt;STRONG&gt;bar_timestamp&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;then my &lt;STRONG&gt;UpdateAttribute&lt;/STRONG&gt; processor new property would be&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;filename &lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;bar_${now():format("yyyyMMddHHmmss")}&lt;/PRE&gt;&lt;P&gt;&lt;STRONG&gt;output filename would be&lt;/STRONG&gt;&lt;/P&gt;&lt;PRE&gt;bar_20171017132115&lt;/PRE&gt;</description>
      <pubDate>Sun, 18 Aug 2019 01:58:42 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223068#M69832</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T01:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: Change the filename after putHDFS processor to a more user friendly name</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223069#M69833</link>
      <description>&lt;P&gt;&lt;A rel="user" href="https://community.cloudera.com/users/18929/yaswanthmuppireddy.html" nodeid="18929"&gt;@Shu&lt;/A&gt; Thanks a lot for quick reply. Much appreciated.&lt;/P&gt;&lt;P&gt;This solved the issue. The problem was once I set the expression language for creating directory structure. The putFile was looking for the directory structure hence the error. So I had to delete the PutFile processor and the use your EL and it worked like a charm. Thanks again&lt;/P&gt;</description>
      <pubDate>Wed, 18 Oct 2017 00:41:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Change-the-filename-after-putHDFS-processor-to-a-more-user/m-p/223069#M69833</guid>
      <dc:creator>dhieru</dc:creator>
      <dc:date>2017-10-18T00:41:27Z</dc:date>
    </item>
  </channel>
</rss>

