0
votes

I write script to find the particular filename in a folder and copy the files after loaded into target table using informatica. I use this script in informatica post command task but my session got failed it did not loaded into target tables but copy the files to backup directory.

cd /etl_mbl/SrcFiles/MainFiles for f in Test.csv do cp -v "$f" /etl_mbl/SrcFiles/Backup/"${f%.csv}" done

I want to correct my script based on the source files loaded into target using informatica and copy the loaded files into backup directory.

2

2 Answers

2
votes

Do not use a separate command task. Use informatica's Post session success command and Post session failure command to achieve this. Put your unix code in Post session success command so it will only be triggered after session is successful.

enter image description here

0
votes

Go with @Utsav's approach. Alternatively you can use a condition $YourSessionName.Status = SUCCEEDED on your link between Session and Command Taks The benefit of this approach is that the command is clearly visible at the first glance.