Plainly spoken I don't understand your question.
Everything up to the "when the count is 0" is clear, but what do you mean with the remainder? What is written as an empty file? Which file is empty?
BTW it is technically clear that if there's no input then there's an empty output file (instead of no file at all). This works as designed and is nothing new; target files are always created, and if there's no input, no output data will be written to the empty file.
(OK, this is a bit simplified, but I hope you understand what I mean to say.)
im echoing the below parameters to a file , but when the source record count and target record count is 0 will it not write 0 to a file along with workflow name?
below is my command
echo $PMSourcequalifier@numAffectedrows ,$PMTargetName@numAffectedrows ,$PMWorkflowName > stats.txt
below is what im expecting
wkfwname,0,0 or workflowname,,
but my file is empty.
hope this gives you some clarification on my request.
Thanks, that makes it indeed clear.
To be honest I'm as surprised by you, I wouldn't have expected an empty file in the post-session command.
One question: is ">stats.txt" indeed the full redirection? Or did you give a path to the stats.txt file which you have not written here?
The reason for this question is that all command tasks will be executed in $INFA_HOME/server/bin, and in many cases this is a write-protected directory, so giving a full directory path here might prove helpful.
This could very well be a possibility of permission issue.
Can you try redirecting the file to a location where the user has permissions (hardcode the path) and check if that works?
im using path where i can write , one thing what i observed it is sometimes writing with the details sometimes with empty file. Looks like this is not a reliable approach and iam going with alternate solution.
From an application perspective, either the output is written or not-written.
If the output is written at times and not in certain executions, it has to be something related to configuration; as the application should not behave differently at different points.
my requirement has changed now , im not using @affectedNumRows to get the counts, im using session log to parse the details.
Is there a code to parse the informatica session log details to get the record counts for source and target?
Unfortunately, We don't have any code to parse the session log and get the source and target record counts.
However you can follow the below discussion it might help you.