<?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 Is it possible to import python modules in Talend. in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377723#M139534</link>
    <description>&lt;P&gt;I'm running the spark job where it needs to use the library from the python module I created. The snippet of spark script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&lt;I&gt;from loaders import ingestion&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;I&gt;logging.basicConfig(level=&lt;/I&gt;&lt;A href="http://logging.info/" alt="http://logging.info/" target="_blank"&gt;&lt;I&gt;logging.INFO&lt;/I&gt;&lt;/A&gt;&lt;I&gt;)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;I&gt;log = logging.getLogger('jdbc-loader')&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; However, once I run the spark job, it returns the following error.&lt;/P&gt;&lt;P&gt; &lt;I&gt;File "/data/Talend-7.3.1/jobserver/agent/TalendJobServersFiles/repository/&amp;lt;path&amp;gt;", line 17, in &amp;lt;module&amp;gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;from loaders import ingestion&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;ImportError: No module named loaders&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any ways to pass the &lt;/P&gt;&lt;P&gt;python module into a script in Talend Studio? &lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2024 23:16:35 GMT</pubDate>
    <dc:creator>WSyahirah21</dc:creator>
    <dc:date>2024-11-15T23:16:35Z</dc:date>
    <item>
      <title>Is it possible to import python modules in Talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377723#M139534</link>
      <description>&lt;P&gt;I'm running the spark job where it needs to use the library from the python module I created. The snippet of spark script:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&amp;nbsp;&amp;nbsp;&lt;I&gt;from loaders import ingestion&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;I&gt;logging.basicConfig(level=&lt;/I&gt;&lt;A href="http://logging.info/" alt="http://logging.info/" target="_blank"&gt;&lt;I&gt;logging.INFO&lt;/I&gt;&lt;/A&gt;&lt;I&gt;)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;I&gt;log = logging.getLogger('jdbc-loader')&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt; However, once I run the spark job, it returns the following error.&lt;/P&gt;&lt;P&gt; &lt;I&gt;File "/data/Talend-7.3.1/jobserver/agent/TalendJobServersFiles/repository/&amp;lt;path&amp;gt;", line 17, in &amp;lt;module&amp;gt;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;&amp;nbsp;&amp;nbsp;from loaders import ingestion&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;ImportError: No module named loaders&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any ways to pass the &lt;/P&gt;&lt;P&gt;python module into a script in Talend Studio? &lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:16:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377723#M139534</guid>
      <dc:creator>WSyahirah21</dc:creator>
      <dc:date>2024-11-15T23:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to import python modules in Talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377724#M139535</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Are you able to run your python script fine from CMD window? There is something lack of python module in your python script?&lt;/P&gt;&lt;P&gt;So far, there are two ways to import and use an external jar in talend&lt;/P&gt;&lt;P&gt; - Use tLibraryLoad to load the jar in the job.&lt;/P&gt;&lt;P&gt; - Create a custom routine, import the jar in the routine and then call the routine in the job.&lt;/P&gt;&lt;P&gt;It maybe not applicable for python module.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jan 2022 07:18:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377724#M139535</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-01-25T07:18:29Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to import python modules in Talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377725#M139536</link>
      <description>&lt;P&gt;Hi Sabrina, it has been a while, but is it possible to use the python module  if I add the resource into PYTHONPATH environment? I wanted to try it out. &lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, to try that way, I need to put the python module into the directory of talend resources in server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My question is, where can I locate the directory of the following resource in terminal. &lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0695b00000QCEArAAP.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/146014i7D45625AF3C0B720/image-size/large?v=v2&amp;amp;px=999" role="button" title="0695b00000QCEArAAP.png" alt="0695b00000QCEArAAP.png" /&gt;&lt;/span&gt;So far, I only can see the directory of resources per job execution. E.g.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;B&gt;&lt;I&gt;/data/Talend-7.3.1/jobserver/agent/TalendJobServersFiles/repository/INGESTION_20220402_130416_WoC1C/Ingestion_Dev/ingestion/ingestion_dev_0_13/resources/spark_jdbc_0.1.py&lt;/I&gt;&lt;/B&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Apr 2022 06:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377725#M139536</guid>
      <dc:creator>WSyahirah21</dc:creator>
      <dc:date>2022-04-05T06:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to import python modules in Talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377726#M139537</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm not sure that it is possible to use the python module if you add the resource into PYTHONPATH environment and I need to check and make an investigation on it with our manager. I will come back to you as soon as possible.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 06 Apr 2022 02:15:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377726#M139537</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-06T02:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to import python modules in Talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377727#M139538</link>
      <description>&lt;P&gt;Hi xdshi, &lt;/P&gt;&lt;P&gt;Issue solved. In order to use the python module in talend, I did following steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Added modulefile.zip.tgz into resources, unarchived that file using tFileUnarchive.&lt;/LI&gt;&lt;LI&gt;Set the &lt;B&gt;java.nio.file.Paths.get(context.pylibs).getParent().toString()&lt;/B&gt; in &lt;B&gt;Extraction Directory&lt;/B&gt; parameter to read the parent file of modulefile. &lt;/LI&gt;&lt;LI&gt;Use the python module in pyspark script as usual using import statement. &lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for you respond!  &lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2022 19:58:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377727#M139538</guid>
      <dc:creator>WSyahirah21</dc:creator>
      <dc:date>2022-04-12T19:58:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is it possible to import python modules in Talend.</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377728#M139539</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Thanks for letting us know you have resolved this issue by yourself and sharing solution with us.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;Sabrina&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2022 02:51:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Is-it-possible-to-import-python-modules-in-Talend/m-p/2377728#M139539</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-04-13T02:51:36Z</dc:date>
    </item>
  </channel>
</rss>

