Home Flat Files rules Redirecting flat file target to unix command

Redirecting flat file target to unix command Featured

Written by 
Rate this item
(1 Vote)

PowerCenter flat file target can be configured to redirect output to shell command standard input instead of a flat file.

This technique can be used to:

 

  •  modify attributes in remote LDAP. Mapping must generate ldif file with commands for LDAP. Below command to be entered in the session attribute of the flat file target.

ldapmodify -h $$LDAPHost -p 389 -D"$$LDAPUser" -x -w $$LDAPPassword -f $PMTargetFileDir/LDAP/$PMSessionName_ldap.ldif -S $PMTargetFileDir/LDAP/$PMSessionName_ldap_errors.ldif

  • sending email. Command below must be entered in command attribute of target configuration on session level.

mail -s "Hello" This e-mail address is being protected from spambots. You need JavaScript enabled to view it

 

The picture below shows what must be setup to redirect flat file to shell command. In our case this is mail command.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Read 7706 times