top button
Flag Notify
Site Registration

Script runs in Unix but not in Informatica command task

+1 vote
7,092 views

My script ran successfully in Unix but not in a command task of an Informatica workflow. The permissions are fine, and the parameter file and variables have been declared in the workflow. Why is this happening?

posted Sep 12, 2014 by Sachin

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
Check the environment that your script needs.. are all the variable present, populated ?
By what unix user are you running the script in test env..and by what user is infa launching that script ?

1 Answer

0 votes

Make sure that the machine you are running informatica on, is running in a unix box. If it is on a windows machine, you will have to run the DOS equivalent command for your script.

answer Sep 16, 2014 by Shweta Singh
Similar Questions
0 votes

I tried a simple

if [ 1 == 1 ]; then echo "Hi"; fi >>/projects/ods/Chk.txt
included in the command task but it fails with error code 512....

what am I missing here?

+1 vote

I'm trying to get my Informatica workflow to fail a session if it selected 0 source records. I have come up with the following script to run as the Post-Session Success Command:

if [ $PM{Source Qualifier Name}@numAppliedRows == 0 ]
then
exit 2
else
exit 0
fi

where {Source Qualifier Name} is the name of my source qualifier. When I look at the session log it looks as I would expect where the $PM{Source Qualifier Name}@numAppliedRows is replaced by the number of rows my source qualifier selected but it is still causing the session to fail even when this number is != 0. The session log gives me the following error message:

sh: 0403-057 Syntax error at line 1 : 'if' is not matched.

Any help would be appreciated.

+1 vote

I am getting following error while running a workflow in informatica.

Session task instance [worklet.session] : [TM_6775 The master DTM process was unable to connect to the master service process to update the session status with the following message: error message [ERROR: The session run for [Session task instance [worklet.session]] and [ folder id = 206, workflow id = 16042, workflow run id = 65095209, worklet run id = 65095337, task instance id = 13272 ] is not yet registered with this service process.] and error code [1417].]

This error comes randomly for many other sessions, when they are ran through workflow as a whole. However if I "start task" that failed task next time, it runs successfully.

Any help is appreciated.

+1 vote

The command to convert from .xlsx to csv works in putty, but the same when given in informatica fails....I am getting exit error code 32512.

The workflowlog >>

Severity    Timestamp   Node    Thread  Message Code    Message
INFO    9/8/2016 5:28:20 PM Node_BIDEV  140284941813504 LM_36621    Command task instance [Convert_csv]: started command [convert], with pid [14121] on node [Node_BIDEV].
ERROR   9/8/2016 5:28:21 PM Node_BIDEV  140285390595840 LM_36623    Command task instance [Convert_csv]: execution of command [convert] did not complete successfully with exit code [32512]
WARNING 9/8/2016 5:28:21 PM Node_BIDEV  140285390595840 LM_36626    Command task instance [Convert_csv]: previous command [convert] failed and "run if previous command succeeded" option is set, the remaining commands will not be run.
ERROR   9/8/2016 5:28:21 PM Node_BIDEV  140285390595840 LM_36320    Command task instance [Convert_csv]: Execution failed.
WARNING 9/8/2016 5:28:21 PM Node_BIDEV  140285390595840 LM_36373    Workflow [wf_CUSTOMER_SURVEY_CORE_DailyFiles] is suspended.
INFO    9/8/2016 5:28:22 PM Node_BIDEV  140285390595840 LM_36375    Workflow [wf_CUSTOMER_SURVEY_CORE_DailyFiles]: Sent suspension email to email user 
WARNING 9/8/2016 5:28:27 PM Node_BIDEV  140284973283072 LM_36371    Workflow [wf_CUSTOMER_SURVEY_CORE_DailyFiles] is aborting.
WARNING 9/8/2016 5:28:27 PM Node_BIDEV  140284973283072 LM_36322    Workflow [wf_CUSTOMER_SURVEY_CORE_DailyFiles]: Execution aborted.

The command script I am using is

libreoffice --headless --convert-to csv:"Text - txt - csv (StarCalc)":"126,0,76,1,2" /var/opt/load/Sourcedata/CUSTOMER_SURVEY/2016Q2_ML_V1.xlsx

Please help me...

...