<?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: Using Attribute  for Output Directory in MoveHDFS processor in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211171#M81566</link>
    <description>&lt;A rel="user" href="https://community.cloudera.com/users/91226/dref278.html" nodeid="91226"&gt;@Frederic
 Le Texier
&lt;/A&gt;&lt;P&gt;I'm looking into NiFi-1.7.1 documentation and the source code link of MoveHDFS processor(which have updated documentation)&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/MoveHDFS.java#L150" target="_blank"&gt;https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/MoveHDFS.java#L150&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In apache nifi org the documentation is created based NiFi-1.5 version, probably these missing things are updated NiFi 1.5+ versions.&lt;/P&gt;&lt;P&gt;As you have proposed below, we need to use &lt;STRONG&gt;RouteOnAttribute &lt;/STRONG&gt;processor to make decision based on the attribute.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Aug 2018 20:00:04 GMT</pubDate>
    <dc:creator>Shu_ashu</dc:creator>
    <dc:date>2018-08-06T20:00:04Z</dc:date>
    <item>
      <title>Using Attribute  for Output Directory in MoveHDFS processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211168#M81563</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I try to use FlowFile Attribute to set output directory in a MoveHDFS processor.&lt;/P&gt;&lt;P&gt;I set the Ouptut Directory to theis value :&lt;STRONG&gt;${path_to_prod_AS}${Librairie}&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;${path_to_prod_AS} is a variable and ${Librairie} is an Attribute.&lt;/P&gt;&lt;P&gt;My problem is that The file are move in ${path_to_prod_AS} driectory,  it's as if he could not interpret the value of the attribute.&lt;/P&gt;&lt;P&gt;For the Input Directory, I Use that string : ${path_to_workspace}${now():format('yyyy-MM-dd')}/${Serveur}/${Librairie}/${Table}/&lt;/P&gt;&lt;P&gt;where ${path_to_workspace} is a variable and ${Serveur} ,${Librairie} and  ${Table} ar attribute. There is no problem to collect the file.&lt;/P&gt;&lt;P&gt;Thank you for your help&lt;/P&gt;</description>
      <pubDate>Fri, 03 Aug 2018 21:35:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211168#M81563</guid>
      <dc:creator>dref278</dc:creator>
      <dc:date>2018-08-03T21:35:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute  for Output Directory in MoveHDFS processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211169#M81564</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/91226/dref278.html" nodeid="91226" target="_blank"&gt;@Frederic
 Le Texier
&lt;/A&gt;&lt;P&gt;The issue is with the attribute &lt;STRONG&gt;${Librairie}&lt;/STRONG&gt; in Output Directory property value.&lt;/P&gt;&lt;P&gt;As per NiFi-1.7 MoveHDFS processor Usage&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="85516-movehdfs.png" style="width: 2702px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16674i5064A95BB413938F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="85516-movehdfs.png" alt="85516-movehdfs.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;OutputDirectory &lt;/STRONG&gt;Property value&lt;STRONG&gt; supports Expression Language&lt;/STRONG&gt; but evaluated using&lt;STRONG&gt; variable registry only&lt;/STRONG&gt;, But for InputDirectory/File property value will be evaluated using flowfile attributes and variable registry.&lt;/P&gt;&lt;P&gt;To resolve this issue: &lt;BR /&gt;&lt;STRONG&gt;Define your &lt;/STRONG&gt;&lt;STRONG&gt;${Librairie} attribute value in variable registry&lt;/STRONG&gt; if possible.&lt;/P&gt;&lt;P&gt;As right now you are having the variable as flowfile attribute which this value will not be evaluated and files are moving to &lt;STRONG&gt;${path_to_prod_AS} &lt;/STRONG&gt;directory.&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 04:00:02 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211169#M81564</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2019-08-18T04:00:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute  for Output Directory in MoveHDFS processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211170#M81565</link>
      <description>&lt;P&gt;Thank's a lot for your answer &lt;A href="https://community.hortonworks.com/questions/210061/using-attribute-for-output-directory-in-movehdfs-p.html?childToView=210075#" rel="nofollow noopener noreferrer" target="_blank"&gt;@Shu&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Can you tell me where did you find this information ? I was on the apache site and here is what  I could find :&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="85541-help-movehdfs-apache.png" style="width: 1133px;"&gt;&lt;img src="https://community.cloudera.com/t5/image/serverpage/image-id/16673iF45C690B7AA5EC7E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="85541-help-movehdfs-apache.png" alt="85541-help-movehdfs-apache.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My problem is that this attribute depends on the flowfile and I wish I could change the final directory depending on the value of this attribute.&lt;/P&gt;&lt;P&gt;I have the impression that it is not possible to change the value of a variable dynamically.
The only solution I see is to route the flow based on the attribute, but it will generate me a lot of branch in my process.
Do you think there would be a more dynamic solution?&lt;/P&gt;</description>
      <pubDate>Sun, 18 Aug 2019 03:59:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211170#M81565</guid>
      <dc:creator>dref278</dc:creator>
      <dc:date>2019-08-18T03:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute  for Output Directory in MoveHDFS processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211171#M81566</link>
      <description>&lt;A rel="user" href="https://community.cloudera.com/users/91226/dref278.html" nodeid="91226"&gt;@Frederic
 Le Texier
&lt;/A&gt;&lt;P&gt;I'm looking into NiFi-1.7.1 documentation and the source code link of MoveHDFS processor(which have updated documentation)&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/MoveHDFS.java#L150" target="_blank"&gt;https://github.com/apache/nifi/blob/master/nifi-nar-bundles/nifi-hadoop-bundle/nifi-hdfs-processors/src/main/java/org/apache/nifi/processors/hadoop/MoveHDFS.java#L150&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In apache nifi org the documentation is created based NiFi-1.5 version, probably these missing things are updated NiFi 1.5+ versions.&lt;/P&gt;&lt;P&gt;As you have proposed below, we need to use &lt;STRONG&gt;RouteOnAttribute &lt;/STRONG&gt;processor to make decision based on the attribute.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Aug 2018 20:00:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211171#M81566</guid>
      <dc:creator>Shu_ashu</dc:creator>
      <dc:date>2018-08-06T20:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Attribute  for Output Directory in MoveHDFS processor</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211172#M81567</link>
      <description>&lt;P&gt;Any progress on getting MoveHDFS to accept attributes in Output Directory? It seems difficult not be able to have a dynamic solution as mentioned in this thread.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jan 2019 17:16:01 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-Attribute-for-Output-Directory-in-MoveHDFS-processor/m-p/211172#M81567</guid>
      <dc:creator>henrikolsen</dc:creator>
      <dc:date>2019-01-09T17:16:01Z</dc:date>
    </item>
  </channel>
</rss>

