Friday, August 17, 2018

Command as source backslash issue

I tried reading source via command and came across an issue. The command tested in bash shell worked fine. In Command Task it was working fine as well. However, when put into the Source Qualifier as Command property on a session, it kept crushing.

Looking at the logs I've discovered, that the command is altered. Original command:

ll ./* | awk -F\ '{if ( NF==1 ) title=$1} else if ( NF>2 ) print title ","$NF"," strftime("%Y"), $6, $7, $8}'

Fetched from log:

ll ./* | awk -F/ '{if ( NF==1 ) title=$1} else if ( NF>2 ) print title ","$NF"," strftime("%Y"), $6, $7, $8}'

Never found any solution. Following the advice found at Informatica KB I've created a script to invoke the command indirectly.


KB entry says: This is a known issue and a CR 108604 has been submitted to be addressed in the future release of PowerCenter. Last Modified Date:8/2/2008 8:05 PMID:1947, - seems it's over 10 years old... Not sure if it's going to be fixed anytime soon. It refers PowerCenter 8.1 and still exists in 10.2

As found in this KB article, there is a custom property available:

SkipUnixToNTCmdPathConversion = yes

Setting this to "yes" stops the automatic backslash to forwardslash conversion.