<?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 Re: tSystem to run unix commands with Tabcmd in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282914#M56961</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Your tSystem might be pointing to a different Unix directory. Could you please check the current directory by using pwd command?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; If its different from intended directory, please move to the right directory by using cd command.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; If its working fine from terminal, this could be the root cause.&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;</description>
    <pubDate>Mon, 07 Oct 2019 14:47:27 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-10-07T14:47:27Z</dc:date>
    <item>
      <title>tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282911#M56958</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've made a talend job which automatically sends out tableau reports to our client partners in pdf format. The main component is a tSystem component, where I run the Tabcmd script. I developed the job in Windows environment, but the job will run in an Ubuntu machine. This is the script which runs perfectly in a Windows machine:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"cmd /c cd client_partner_reports &amp;amp; tabcmd login -s https://online.tableau.com -t sitename -u username -p password &lt;BR /&gt;&amp;amp; &lt;BR /&gt;tabcmd get \"views/workbook/worksheet?Date%20Parameter%20="+ (String)globalMap.get("end_date") +"&amp;amp;Date%20Parameter%202=" + (String)globalMap.get("start_date") + "&amp;amp;someid=" + (String)globalMap.get("someid") +"\" -f \""+ (String)globalMap.get("name") + "_" + (String)globalMap.get("start_date") + "_" + (String)globalMap.get("end_date") +".pdf\""&lt;/PRE&gt; 
&lt;P&gt;I tried to make it Unix compatible by getting rid of the&amp;nbsp;cmd /c cd client_partner_reports part of the script, and replacing &amp;amp; with ; , but it gives me this error:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;java.io.IOException: Cannot run program "tabcmd": error=2, No such file or directory&lt;/PRE&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;When I ran the same code in a terminal it ran fine, but inside a tsystem it gives me this error. Then I modified the script like this:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;"/opt/tableau/tabcmd/bin/tabcmd login -s https://online.tableau.com -t sitename -u username -p password 
; 
/opt/tableau/tabcmd/bin/tabcmd get \"views/workbook/worksheet?Date%20Parameter%20="+ (String)globalMap.get("end_date") +"&amp;amp;Date%20Parameter%202=" + (String)globalMap.get("start_date") + "&amp;amp;someid=" + (String)globalMap.get("someid") +"\" -f \""+ (String)globalMap.get("name") + "_" + (String)globalMap.get("start_date") + "_" + (String)globalMap.get("end_date") +".pdf\""&lt;/PRE&gt; 
&lt;P&gt;If I run this, it gives me this error message:&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;  *** Unrecognized option: -f&lt;/PRE&gt; 
&lt;P&gt;Again, if I run the code in a terminal, it downloads and saves the pdf.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;What is the error here? How can I make sure that I have a script which will run in a Unix machine too?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282911#M56958</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282912#M56959</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Did you check environment variables ? It's the best shot you have to figure out why it's not working.&lt;/P&gt;&lt;P&gt;Your tableau user might havee some variable declared.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Oct 2019 14:40:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282912#M56959</guid>
      <dc:creator>rmartin2</dc:creator>
      <dc:date>2019-10-07T14:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282913#M56960</link>
      <description>Thanks for the reply!&lt;BR /&gt;On the second script, I did specify the full path, but then it gave this error:&lt;BR /&gt;*** Unrecognized option: -f&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Oct 2019 14:42:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282913#M56960</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-07T14:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282914#M56961</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Your tSystem might be pointing to a different Unix directory. Could you please check the current directory by using pwd command?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; If its different from intended directory, please move to the right directory by using cd command.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; If its working fine from terminal, this could be the root cause.&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;</description>
      <pubDate>Mon, 07 Oct 2019 14:47:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282914#M56961</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-07T14:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282915#M56962</link>
      <description>Hi,
&lt;BR /&gt;I set it up the home directory in the Talend component, so it is the intended directory. The issue is I believe that Talend interprets the tabcmd get command with the -f option somehow differently than when it is just put in a terminal.
&lt;BR /&gt;</description>
      <pubDate>Mon, 07 Oct 2019 15:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282915#M56962</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-07T15:12:09Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282916#M56963</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;Could you please add the command in a shell script .sh file and try to run the command through that file?&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;</description>
      <pubDate>Mon, 07 Oct 2019 15:15:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282916#M56963</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-07T15:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282917#M56964</link>
      <description>In the meantime I found out that the error is probably related to having multiple commands executed. When I create a job in Linux with only a tSystem component, and I put “echo test1 ; echo test2” I would expect the output to be&lt;BR /&gt;test1&lt;BR /&gt;test2&lt;BR /&gt;But instead of that it is: echo test1 ; echo test2. So it seems that Talend doesn’t recognize the ; as an end of a command.&lt;BR /&gt;&lt;BR /&gt;[cid:image001.png@01D57DFA.8AC83410]&lt;BR /&gt;&lt;BR /&gt;[cid:image002.png@01D57DFA.8AC83410]&lt;BR /&gt;</description>
      <pubDate>Tue, 08 Oct 2019 16:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282917#M56964</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-08T16:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282918#M56965</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; Could you please share a screenshot to get an understanding of how you are calling the shell commands using tSystem?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Are you using "Use Array Command" option?&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;</description>
      <pubDate>Thu, 10 Oct 2019 23:00:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282918#M56965</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-10T23:00:34Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282919#M56966</link>
      <description>I used a single command option. I did however found a workaround, I have now two different tSystem components doing only a single command, and connected via onSubjobOK, now it runs perfectly.
&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Oct 2019 09:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282919#M56966</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-11T09:05:01Z</dc:date>
    </item>
    <item>
      <title>Re: tSystem to run unix commands with Tabcmd</title>
      <link>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282920#M56967</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;You can do that way. You can also go for array command option too.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;Since the issue is resolved, could you please mark the post as closed? It will help others during their reference.&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;</description>
      <pubDate>Fri, 11 Oct 2019 15:42:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/tSystem-to-run-unix-commands-with-Tabcmd/m-p/2282920#M56967</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-10-11T15:42:52Z</dc:date>
    </item>
  </channel>
</rss>

