<?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 [resolved] tSystem mysql: command not found in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298880#M71287</link>
    <description>I am relatively new to Talend and have done multiple searches for assistance with this issue but I have not found anything to help me resolve it.&amp;nbsp; I am using the tSystem component to run a unix batch file that contains a mysql call.&amp;nbsp; If I process it from a terminal session the .sh file works properly.&amp;nbsp; When the same file is called by tSystem the following error results:&amp;nbsp; line 1: mysql: command not found&lt;BR /&gt;Here is a simplified look at the .sh file:&lt;BR /&gt;mysql -u user --password=password --host=server MyDatabase "select * from mytable where Flag &amp;lt;&amp;gt; 'Y' ;" | sed 's/\t/,/g' &amp;gt; /networkpath/outputfile.csv&lt;BR /&gt;I think there may be an issue with my command piping the data to SED and then to the output file.</description>
    <pubDate>Mon, 27 Oct 2014 20:04:35 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-10-27T20:04:35Z</dc:date>
    <item>
      <title>[resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298880#M71287</link>
      <description>I am relatively new to Talend and have done multiple searches for assistance with this issue but I have not found anything to help me resolve it.&amp;nbsp; I am using the tSystem component to run a unix batch file that contains a mysql call.&amp;nbsp; If I process it from a terminal session the .sh file works properly.&amp;nbsp; When the same file is called by tSystem the following error results:&amp;nbsp; line 1: mysql: command not found&lt;BR /&gt;Here is a simplified look at the .sh file:&lt;BR /&gt;mysql -u user --password=password --host=server MyDatabase "select * from mytable where Flag &amp;lt;&amp;gt; 'Y' ;" | sed 's/\t/,/g' &amp;gt; /networkpath/outputfile.csv&lt;BR /&gt;I think there may be an issue with my command piping the data to SED and then to the output file.</description>
      <pubDate>Mon, 27 Oct 2014 20:04:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298880#M71287</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-27T20:04:35Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298881#M71288</link>
      <description>Yes, the reason is if you call it from a e.g. bash you have all your environment settings ready (e.g. the $PATH variable or some MySQL vars).&lt;BR /&gt;The tSystem is a very simple call without any environment settings in the first place. It depends on the user which runs the job.&lt;BR /&gt;Actually I would call the mysql client with its full path to avoid the problem with the missing PATH variable.</description>
      <pubDate>Mon, 27 Oct 2014 21:29:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298881#M71288</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-27T21:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298882#M71289</link>
      <description>Thanks for the reply.&amp;nbsp; I made the change and the script now works:&lt;BR /&gt;/usr/local/mysql/bin/mysql -u user --password=password --host=server MyDatabase "select * from mytable where Flag &amp;lt;&amp;gt; 'Y' ;" | sed 's/\t/,/g' &amp;gt; /networkpath/outputfile.csv</description>
      <pubDate>Tue, 28 Oct 2014 12:26:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298882#M71289</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-28T12:26:50Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298883#M71290</link>
      <description>I use tSystem to execute a python script and the python script will call other commands.&lt;BR /&gt;It is essential to have all the environment settings to the tSystem.&lt;BR /&gt;How can I set the PATHS on the fly ?</description>
      <pubDate>Tue, 04 Aug 2015 12:09:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298883#M71290</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-08-04T12:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298884#M71291</link>
      <description>hi,&lt;BR /&gt;&amp;nbsp;it should better to start a new post as it's already resolved.&lt;BR /&gt;never mind the short way will be to initiliaze your PATH in a file &amp;amp; source it as a first command &lt;BR /&gt;&lt;A href="http://stackoverflow.com/questions/9326695/what-does-it-mean-to-source-a-file-in-unix-linux-context" rel="nofollow noopener noreferrer"&gt;http://stackoverflow.com/questions/9326695/what-does-it-mean-to-source-a-file-in-unix-linux-context&lt;/A&gt;&lt;BR /&gt;regards&lt;BR /&gt;laurent</description>
      <pubDate>Tue, 04 Aug 2015 16:23:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298884#M71291</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-04T16:23:23Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298885#M71292</link>
      <description>Thanks kzone,
&lt;BR /&gt;I tried to add source in TOS but it throws Cannot run program "source" error.
&lt;BR /&gt;I tried to source it in the python script but paths still cannot be used.</description>
      <pubDate>Wed, 05 Aug 2015 03:25:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298885#M71292</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-08-05T03:25:09Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298886#M71293</link>
      <description>Some updates, 
&lt;BR /&gt;To use source, I have to create a .sh file containing&amp;nbsp; 
&lt;BR /&gt;source fileName; 
&lt;BR /&gt;{fullPath}/python fileName.py 
&lt;BR /&gt;and chmod +w the .sh file 
&lt;BR /&gt;Then, i encounter other problems. 
&lt;BR /&gt;Some programs require environment setting such as some files located in $HOME directory. 
&lt;BR /&gt;However, it seems the $HOME directory is different. 
&lt;BR /&gt;I try to use echo $HOME command but it does not work. 
&lt;BR /&gt;I can foresee there will be many more problems if the environment setting is different to my development setting. 
&lt;BR /&gt;Can I have the tShell environment setting exactly the same to the development setting? 
&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 05 Aug 2015 04:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298886#M71293</guid>
      <dc:creator>_AnonymousUser</dc:creator>
      <dc:date>2015-08-05T04:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tSystem mysql: command not found</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298887#M71294</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;it seems the $HOME directory is different&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;$HOME depends on logging user&lt;BR /&gt;&lt;A href="http://unix.stackexchange.com/questions/34379/is-home-but-sometimes" rel="nofollow noopener noreferrer"&gt;http://unix.stackexchange.com/questions/34379/is-home-but-sometimes&lt;/A&gt;</description>
      <pubDate>Wed, 05 Aug 2015 08:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tSystem-mysql-command-not-found/m-p/2298887#M71294</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-08-05T08:37:01Z</dc:date>
    </item>
  </channel>
</rss>

