开发者

Informatica post session command task

开发者 https://www.devze.com 2023-03-23 22:13 出处:网络
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:

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.


If you are using /bin/sh then you need to put a semi colon (;) after the square brackets.

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

精彩评论

暂无评论...
验证码 换一张
取 消