Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I had all the success in loading a dmp file to oracle tables using Dynamic data type of Talend. As a final step in my load process I want to move the source files to processed or errored folders. I was able to do this successfully from my Studio using the below command, but having issues doing the same when I am trying to deploy it on the TAC/Remote Server. The job runs successfully but the move command is failing, if I take the error thrown out to the console and run it as-is on my Liunx terminal (Putty) it works fine. I am probably missing out on something very minor, can you please help find the issue.
Windows command in tSystem component (works fine when I run locally):
"cmd /c move "+ StringHandling.CHANGE(((String)globalMap.get("tFileList_2_CURRENT_FILE")),".CTL",".*") +" " +((String)globalMap.get("tFileList_2_CURRENT_FILEDIRECTORY"))+"\\"+context.dest_folder+"\\"
Linux command in tSystem component: (doesn't work when I run on remote server):
new String[]{"/bin/bash","-C","mv "+((String)globalMap.get("tFileList_2_CURRENT_FILEDIRECTORY"))+"/"+StringHandling.CHANGE(((String)globalMap.get("tFileList_2_CURRENT_FILE")),".CTL",".*") +" " +((String)globalMap.get("tFileList_2_CURRENT_FILEDIRECTORY"))+"\\"+context.dest_folder+"\\"}
Error on the console :
/bin/bash: mv /opt/xxx/talend/Member/Datafiles/xx_1094B_STATUS.* /opt/xxx/talend/Member/Datafiles/Processed/: No such file or directory
***I tried using absolute and relative paths, but in vain the problem remains
Are you sure you have the folder in the Remote server, or are you trying to access the shared drive.
Because if you are trying to run job on remote server and trying to access your local drive then it is not possible.
Please clear what you are trying to do and also recheck if every folder is present on the Linux server
Thanks for the reply Prakhar. I am scared you didn't notice this in my original post " if I take the error thrown out to the console and run it as-is on my Liunx terminal (Putty) it works fine" which means all the needed folders, files, permissions etc are intact as needed.
I see. Could you try to specify Home Directory in the option in tSystem.
Write "/" as home directory and then try to execute it.