Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Run an UNIX script on TIC Talend Integration Cloud

Hello, I'm trying to run a script .sh in Data Integration Cloud.

I use the tSystem component, and it works perfectly when I run the job on local mode.

However, the script that I run in my tSystem won't work when I run it on the Cloud.

I would like to know if TIC can run an .sh script which contains cUrl commands ?

 

In a second time, I stored temporary files "locally in the Cloud" in paths as:"C:/Talend/out/customer.csv" (which seems to work).

So I would like to know if the path would be the same if I want to refer to this file from my .sh script.

In other words : does an Unix command can use a Windows path?

Thanks

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

I have solved my problem, and here are the results of my research:

  1. In TIC, the current directory is a Talend workspace in a UNIX directory tree. As a simple user (not an admin), the right are limited in directories like "/home/" or "/". My solution was to stay in the current directory, and never call the root directory.
  2. Respecting the previous condition, tSystems work! However I used them by checking "Use Single Command" and by filling Command field by this kind of format "new String[]{"/bin/bash","-c","chmod +x " + context.scriptName}"   (Yes you have first to use chmod before calling a script sh)
  3. Respectiong the previous conditions, cUrl commands work!
  4. For Windows path like "C:/Talend/out/customer.csv", it's stored in the current directory and the whole file name is "C:/Talend/out/customer.csv". 
  5. To answer: "does an Unix command can use a Windows path?" -> Perhaps but put a Windows path look like a Talend Bad Practice

I hope it will help

View solution in original post

3 Replies
Anonymous
Not applicable
Author

I have not tried this on Talend's servers in the cloud and would doubt it would work. Imagine the havoc that someone could cause running scripts like this on Talend's servers. However you can make use of the Remote Engine and do it that way. You are still orchestrating your code in the Cloud but you are running on an engine you own.

Anonymous
Not applicable
Author

I have solved my problem, and here are the results of my research:

  1. In TIC, the current directory is a Talend workspace in a UNIX directory tree. As a simple user (not an admin), the right are limited in directories like "/home/" or "/". My solution was to stay in the current directory, and never call the root directory.
  2. Respecting the previous condition, tSystems work! However I used them by checking "Use Single Command" and by filling Command field by this kind of format "new String[]{"/bin/bash","-c","chmod +x " + context.scriptName}"   (Yes you have first to use chmod before calling a script sh)
  3. Respectiong the previous conditions, cUrl commands work!
  4. For Windows path like "C:/Talend/out/customer.csv", it's stored in the current directory and the whole file name is "C:/Talend/out/customer.csv". 
  5. To answer: "does an Unix command can use a Windows path?" -> Perhaps but put a Windows path look like a Talend Bad Practice

I hope it will help

Anonymous
Not applicable
Author

Interesting to learn this. I've only ever tried doing stuff like this on a Remote Engine where I have control.