Search code examples
informaticainformatica-powercenter

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 has been 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}'

The difference is in awk switch changed from -F\ to -F/.


Solution

  • Found this gem which sounds like it should sort it for you https://kb.informatica.com/solution/23/Pages/51/299665.aspx