<?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: Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292744#M216286</link>
    <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp;: I am not using GetFile here. i followed that approach you suggested but issue still persists. Below is dataflow i have been using. i need to route all matching files into target folder based on date. So for today's date 20200327, all files ending with _202003027 must reside in target folder 20200327.&lt;/P&gt;&lt;P&gt;So in my fetch file i am passing this&amp;nbsp;/users/FIDS_OZ_DEV/Datastore/Bloomberg/backoffice/${now():format("yyyyMMdd")}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MFT.jpg" style="width: 504px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26888i8292059868703665/image-size/large?v=v2&amp;amp;px=999" role="button" title="MFT.jpg" alt="MFT.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 27 Mar 2020 17:33:29 GMT</pubDate>
    <dc:creator>Gubbi</dc:creator>
    <dc:date>2020-03-27T17:33:29Z</dc:date>
    <item>
      <title>Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292689#M216253</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;:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm finding a way to get the content of a file based on its filename and it should drop files to target based on date. .&lt;/P&gt;
&lt;P&gt;All of the target files are in the same directory, but I'd like to select only the files which has "{Today's YYYYMMDD} as their postfix.&lt;/P&gt;
&lt;P&gt;For example, if today is 20200326,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;/tmp/pfd_exch_namr_bbid.px.hpc.gz.20200326 -&amp;gt; create folder with 20200326 and drop file.&lt;/P&gt;
&lt;P&gt;/tmp/pfd_exch_namr_bbid.px.hpc.gz.20200326-&amp;gt; Drop file into above folder&lt;/P&gt;
&lt;P&gt;/tmp/pfd_exch_namr_bbid.px.hpc.gz.20200325-&amp;gt; not ok because this YYYYMMDD is not today.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Approach i followed :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ListFile: Extract only the files whose name ends with "gz.20200326"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;UpdateAttribute: Substitute YYYYMMDD into an Attribute "today"&lt;/SPAN&gt;&lt;/P&gt;
&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Update.jpg" style="width: 716px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26879iAE0C1F94ED57C7AD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Update.jpg" alt="Update.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P&gt;&lt;SPAN&gt;RouteOnAttribute: Extract only the file which matches&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;${filename:matches(${today:prepend('[^\.].*gz.'):append('\d{8}')})}&amp;nbsp;(where $filename is the target file name) and pass it as Relationship "target_file"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;But when executing, looks like it's not matching my requirement and all files are matching.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Could you please assist me on this.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 10:35:34 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292689#M216253</guid>
      <dc:creator>Gubbi</dc:creator>
      <dc:date>2020-03-27T10:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292723#M216276</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/74756"&gt;@Gubbi&lt;/a&gt;&amp;nbsp;It sounds like you have the getFile working and just having issues with the matching to target_file route? &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would recommend to simply the match in RouteOnAttribute:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;${filename:endsWith(${today})}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you are having problems with the GetFile, please share that proc configuration so we can see what you have going on there.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 13:16:53 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292723#M216276</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-03-27T13:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292744#M216286</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp;: I am not using GetFile here. i followed that approach you suggested but issue still persists. Below is dataflow i have been using. i need to route all matching files into target folder based on date. So for today's date 20200327, all files ending with _202003027 must reside in target folder 20200327.&lt;/P&gt;&lt;P&gt;So in my fetch file i am passing this&amp;nbsp;/users/FIDS_OZ_DEV/Datastore/Bloomberg/backoffice/${now():format("yyyyMMdd")}&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="MFT.jpg" style="width: 504px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/26888i8292059868703665/image-size/large?v=v2&amp;amp;px=999" role="button" title="MFT.jpg" alt="MFT.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 17:33:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292744#M216286</guid>
      <dc:creator>Gubbi</dc:creator>
      <dc:date>2020-03-27T17:33:29Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292745#M216287</link>
      <description>&lt;P&gt;Ignore my previous reply. Solution which you provided is working. Thanks a lot.&lt;/P&gt;</description>
      <pubDate>Fri, 27 Mar 2020 17:46:52 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/292745#M216287</guid>
      <dc:creator>Gubbi</dc:creator>
      <dc:date>2020-03-27T17:46:52Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/293114#M216491</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/60150"&gt;@stevenmatison&lt;/a&gt;&amp;nbsp; : On similar thread, can i do match for 2-3 days and push files to respective folder.&lt;/P&gt;&lt;P&gt;Like&amp;nbsp;${filename:endsWith(${today -1})} and&amp;nbsp;${filename:endsWith(${today -2})}. Basically i want to keep checking 2 days previous files along with current date and push to respective folder based on date condition.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;And how will i transfer those files previous day files to target date folder. Currently i am using&amp;nbsp;/users/${now():format("yyyyMMdd")} to push today's file. If i have to do it for previous 2 days. how will it change.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Apr 2020 23:49:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/293114#M216491</guid>
      <dc:creator>Gubbi</dc:creator>
      <dc:date>2020-04-01T23:49:02Z</dc:date>
    </item>
    <item>
      <title>Re: Transfer files based on the YYYYMMDD in their filename and create target folder with YYYYMMDD</title>
      <link>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/293165#M216516</link>
      <description>&lt;P&gt;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/74756"&gt;@Gubbi&lt;/a&gt;&amp;nbsp;The next solution here is to just add each route for today, yesterday, day before yesterday. &amp;nbsp; Then route all 3 to the next proc. &amp;nbsp; &amp;nbsp;Anything not matching won't be routed.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Apr 2020 13:32:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/Transfer-files-based-on-the-YYYYMMDD-in-their-filename-and/m-p/293165#M216516</guid>
      <dc:creator>stevenmatison</dc:creator>
      <dc:date>2020-04-02T13:32:37Z</dc:date>
    </item>
  </channel>
</rss>

