<?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>topic Add Dependencies for Routine in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199014#M2107</link>
    <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have written a routine to run a Java code to read a file and store as RDD. i have added few Spark &amp;amp; Scala dependencies using "Edit Routine Libraries"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i run the component tJava with call to routine, it fails with classNotFound Exception. once i add that particular Dependency, the error goes away but job fails for another ClassNotFound error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already have all the JARS present in "\.m2\repository" path, so not sure how a routine can use all existing JARS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Routine :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;package routines;&lt;/P&gt;&lt;P&gt;import org.apache.spark.SparkConf;&lt;BR /&gt;import org.apache.spark.api.java.JavaRDD;&lt;BR /&gt;import org.apache.spark.api.java.JavaSparkContext;&lt;BR /&gt;&lt;BR /&gt;public class file_to_rdd {&lt;BR /&gt;&lt;BR /&gt;public static void main(String filepath) {&lt;BR /&gt;// configure spark&lt;BR /&gt;SparkConf sparkConf = new SparkConf();&lt;BR /&gt;&lt;BR /&gt;// start a spark context&lt;BR /&gt;JavaSparkContext sc = new JavaSparkContext(sparkConf);&lt;BR /&gt;&lt;BR /&gt;// provide path to input text file&lt;BR /&gt;String path = filepath;&lt;BR /&gt;&lt;BR /&gt;// read text file to RDD&lt;BR /&gt;JavaRDD&amp;lt;String&amp;gt; lines = sc.textFile(path);&lt;BR /&gt;&lt;BR /&gt;// collect RDD for printing&lt;BR /&gt;for(String line:lines.collect()){&lt;BR /&gt;System.out.println(line);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:54:46 GMT</pubDate>
    <dc:creator>ankushdeshpande</dc:creator>
    <dc:date>2024-11-16T03:54:46Z</dc:date>
    <item>
      <title>Add Dependencies for Routine</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199014#M2107</link>
      <description>&lt;P&gt;Hello All,&lt;/P&gt;&lt;P&gt;I have written a routine to run a Java code to read a file and store as RDD. i have added few Spark &amp;amp; Scala dependencies using "Edit Routine Libraries"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When i run the component tJava with call to routine, it fails with classNotFound Exception. once i add that particular Dependency, the error goes away but job fails for another ClassNotFound error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I already have all the JARS present in "\.m2\repository" path, so not sure how a routine can use all existing JARS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Routine :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;package routines;&lt;/P&gt;&lt;P&gt;import org.apache.spark.SparkConf;&lt;BR /&gt;import org.apache.spark.api.java.JavaRDD;&lt;BR /&gt;import org.apache.spark.api.java.JavaSparkContext;&lt;BR /&gt;&lt;BR /&gt;public class file_to_rdd {&lt;BR /&gt;&lt;BR /&gt;public static void main(String filepath) {&lt;BR /&gt;// configure spark&lt;BR /&gt;SparkConf sparkConf = new SparkConf();&lt;BR /&gt;&lt;BR /&gt;// start a spark context&lt;BR /&gt;JavaSparkContext sc = new JavaSparkContext(sparkConf);&lt;BR /&gt;&lt;BR /&gt;// provide path to input text file&lt;BR /&gt;String path = filepath;&lt;BR /&gt;&lt;BR /&gt;// read text file to RDD&lt;BR /&gt;JavaRDD&amp;lt;String&amp;gt; lines = sc.textFile(path);&lt;BR /&gt;&lt;BR /&gt;// collect RDD for printing&lt;BR /&gt;for(String line:lines.collect()){&lt;BR /&gt;System.out.println(line);&lt;BR /&gt;}&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:54:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199014#M2107</guid>
      <dc:creator>ankushdeshpande</dc:creator>
      <dc:date>2024-11-16T03:54:46Z</dc:date>
    </item>
    <item>
      <title>Re: Add Dependencies for Routine</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199015#M2108</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt; 
&lt;P&gt;In studio, right click on routine and select 'Edit routine libraries' option to add external libraries to your routine.&lt;/P&gt; 
&lt;P&gt;With talend subscription solution, you can open the configuration page in TAC and define the User libraries parameters to specify a repository URL for storing all libraries. In this way, your&amp;nbsp; jar files should be loaded automatically to Nexus after you configure the parameters and the dependency libraries are exported also when deploy the job to remote Job server.&lt;/P&gt; 
&lt;P&gt;Let us know if it helps.&lt;/P&gt; 
&lt;P&gt;Best regards&lt;/P&gt; 
&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Mon, 09 Dec 2019 06:58:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199015#M2108</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-09T06:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Add Dependencies for Routine</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199016#M2109</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; An example about how to add jars to routines can be referred from below link.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;A href="https://community.qlik.com/s/article/ka03p0000006Ev8AAE#toc-hId-1940395967" target="_blank"&gt;https://community.talend.com/t5/Design-and-Development/Talend-and-Amazon-Comprehend-Integration/ta-p/144048#toc-hId-1940395967&lt;/A&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Warm Regards,&lt;BR /&gt;Nikhil Thampi&lt;/P&gt; 
&lt;P&gt;Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2019 04:36:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Add-Dependencies-for-Routine/m-p/2199016#M2109</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-12-11T04:36:58Z</dc:date>
    </item>
  </channel>
</rss>

