<?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 Using the MergeContent processor in Nifi, can I use more than one correlation attribute name? in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146171#M40333</link>
    <description>&lt;P&gt;I'm using the merge content processor and have successfully been using the "Correlation Attribute Name" to bin together like files using a single flowfile attribute with expression language. I would like to start using two attributes to bin and merge files. Is this possible and any help on proper syntax for this would be appreciated.&lt;/P&gt;</description>
    <pubDate>Sun, 11 Sep 2016 19:54:27 GMT</pubDate>
    <dc:creator>henrysowell</dc:creator>
    <dc:date>2016-09-11T19:54:27Z</dc:date>
    <item>
      <title>Using the MergeContent processor in Nifi, can I use more than one correlation attribute name?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146171#M40333</link>
      <description>&lt;P&gt;I'm using the merge content processor and have successfully been using the "Correlation Attribute Name" to bin together like files using a single flowfile attribute with expression language. I would like to start using two attributes to bin and merge files. Is this possible and any help on proper syntax for this would be appreciated.&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2016 19:54:27 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146171#M40333</guid>
      <dc:creator>henrysowell</dc:creator>
      <dc:date>2016-09-11T19:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Using the MergeContent processor in Nifi, can I use more than one correlation attribute name?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146172#M40334</link>
      <description>&lt;P&gt;I don't think MergeContent supports multiple attribute names for the correlation attribute, but you could put an UpdateAttribute processor right before it and make a new attribute like:&lt;/P&gt;&lt;P&gt;combined = ${attribute1}_${attribute2}&lt;/P&gt;&lt;P&gt;and then use "combined" in MergeContent&lt;/P&gt;</description>
      <pubDate>Sun, 11 Sep 2016 23:02:46 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146172#M40334</guid>
      <dc:creator>bbende</dc:creator>
      <dc:date>2016-09-11T23:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Using the MergeContent processor in Nifi, can I use more than one correlation attribute name?</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146173#M40335</link>
      <description>&lt;P&gt;Thanks &lt;A rel="user" href="https://community.cloudera.com/users/363/bbende.html" nodeid="363"&gt;@Bryan Bende&lt;/A&gt;, I think this is a great solution. I'm currently using two attributes to help create directory structures dynamically in HDFS:&lt;/P&gt;&lt;PRE&gt;/tmp/data_staging/${SourceAttribute}/${data.date}
&lt;/PRE&gt;&lt;P&gt;I was planning to get around the lack of multiple correlation attribute support by doing a route on attribute processor to different merge content processors then back to a single HDFS processor using the original attributes. With your suggestion I can do a much cleaner and more flexible solution. After merging the two attributes with an UpdateAttribute processor, I'll send the data to a MergeContent processor where I'll bin the files on the new combined attribute, and then to my putHDFS processor. The merged attribute will persist (e.g., dataSource1_20160911), which I can then do something like the following to continue dynamically creating directories:&lt;/P&gt;&lt;PRE&gt;/tmp/data_staging/${convergedSourceDateAttribute:substringBefore('_')}/${convergedSourceDateAttribute:substringAfter('_')}
&lt;/PRE&gt;&lt;P&gt;Does that seem reasonable?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2016 02:34:55 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Using-the-MergeContent-processor-in-Nifi-can-I-use-more-than/m-p/146173#M40335</guid>
      <dc:creator>henrysowell</dc:creator>
      <dc:date>2016-09-12T02:34:55Z</dc:date>
    </item>
  </channel>
</rss>

