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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
MattE
Creator II
Creator II

tSystem Linux array commands

I want to run this command on a tSystem on a Linux box. Note jq is already installed on the Linux box

sudo chmod 777 /temp/month_end/redemptions/ && jq -c '.[]' /temp/month_end/redemptions/BillingFile_February_2023_raw.json > /temp/month_end/redemptions/BillingFile_February_2023.json

But Talend can't handle this multiple commands it give a file not found error as mentioned here https://community.talend.com/s/article/Executing-a-Linux-command-with-a-pipe-using-a-tSystem-compone...

What is the correct way to do this?

I've tried the attached but it still gives the same error

Labels (2)
4 Replies
Anonymous
Not applicable

Hello,

As the tSystem component truncates the command at the first space in the file name and you will encounter the following error:

"The system cannot find the specified file".

Could you please check this point as well?

Best regards

Sabrina

MattE
Creator II
Creator II
Author

@Xiaodi Shi​ I don't understand what you mean. There are no spaces in the filename, they are BillingFile_February_2023_raw.json and BillingFile_February_2023.json

Anonymous
Not applicable

Hello,

Could you please try to add the commands as seen below in the Command table?

"sudo chmod 777 /temp/month_end/redemptions/"

"jq -c '.[]' /temp/month_end/redemptions/BillingFile_February_2023_raw.json"

" jq -c '.[]'/temp/month_end/redemptions/BillingFile_February_2023.json"

Best regards

Sabrina

MattE
Creator II
Creator II
Author

I see what you mean. Unfortunately the full 2nd command needs to be jq -c '.[]' /temp/month_end/redemptions/BillingFile_February_2023_raw.json > /temp/month_end/redemptions/BillingFile_February_2023.json this is because the jq app is transforming the first file and sending the output to the second file . I've tried the below configuration but get the file not found error.

0695b00000ddZvfAAE.png