<?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: Chaining morphlines in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22496#M4015</link>
    <description>&lt;P&gt;Arrange it such that morphlineA pipe records into morphlineB:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command morphlineB = new Compiler().compile(morphlineFileB, morphlineIdB, morphlineContextB, null);&lt;BR /&gt;Command morphlineA = new Compiler().compile(morphlineFileA, morphlineIdA, morphlineContextA, morphlineB);&lt;/P&gt;</description>
    <pubDate>Tue, 09 Dec 2014 17:55:13 GMT</pubDate>
    <dc:creator>whosch</dc:creator>
    <dc:date>2014-12-09T17:55:13Z</dc:date>
    <item>
      <title>Chaining morphlines</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22491#M4014</link>
      <description>&lt;P&gt;Hi...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is the recommended way of chaining independent&amp;nbsp;morphlines together?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, assume there are multiple such&amp;nbsp;morphlines, each capable of running on its own to implement&amp;nbsp;a well-defined function, and the Java application determines that two or more such functions are successively needed end-to-end (e.g., one to read froma data source and the next to extract the values from the input).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One approach of course would be to execute each morphline from within Java and pass the record to the next, until the chain is completed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there another way to do so (e.g., somehow compiling together the independent conf files)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 16:59:15 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22491#M4014</guid>
      <dc:creator>PNS</dc:creator>
      <dc:date>2014-12-09T16:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: Chaining morphlines</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22496#M4015</link>
      <description>&lt;P&gt;Arrange it such that morphlineA pipe records into morphlineB:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Command morphlineB = new Compiler().compile(morphlineFileB, morphlineIdB, morphlineContextB, null);&lt;BR /&gt;Command morphlineA = new Compiler().compile(morphlineFileA, morphlineIdA, morphlineContextA, morphlineB);&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 17:55:13 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22496#M4015</guid>
      <dc:creator>whosch</dc:creator>
      <dc:date>2014-12-09T17:55:13Z</dc:date>
    </item>
    <item>
      <title>Re: Chaining morphlines</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22497#M4016</link>
      <description>&lt;P&gt;Yes, that seems to be the best strategy.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was experimenting with putting the text from different morphline files, each containing a single morphline, via string substitution (e.g., using the Apache Commons Lang StrSubstitutor class).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That approach does not work if you use text substitution in the morphline file, because in that case the "declarations' have to be outside the morphline, at the top of the file, so when the files are merged compilation fails.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It would have been nice if HOCON supported a C-style #include command. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the advice!&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 18:01:08 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22497#M4016</guid>
      <dc:creator>PNS</dc:creator>
      <dc:date>2014-12-09T18:01:08Z</dc:date>
    </item>
    <item>
      <title>Re: Chaining morphlines</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22498#M4017</link>
      <description>&lt;P&gt;FWIW, also see &lt;A href="https://github.com/typesafehub/config/blob/master/HOCON.md#includes" target="_blank"&gt;https://github.com/typesafehub/config/blob/master/HOCON.md#includes&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 18:06:30 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22498#M4017</guid>
      <dc:creator>whosch</dc:creator>
      <dc:date>2014-12-09T18:06:30Z</dc:date>
    </item>
    <item>
      <title>Re: Chaining morphlines</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22499#M4018</link>
      <description>&lt;P&gt;This does not work for merging with text substitution for the same reason I mentioned in my previous comment, but you are right, it is include functionality.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I was probably biased towards the use case for which I created this thread. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2014 18:27:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Chaining-morphlines/m-p/22499#M4018</guid>
      <dc:creator>PNS</dc:creator>
      <dc:date>2014-12-09T18:27:21Z</dc:date>
    </item>
  </channel>
</rss>

