I am running the below postgres insert sql script through informatica command prompt. Able to run the script successfully.
Only issue is in script we are passing password as hardcoded value but its not secure and moreover not sure how to change it dynamically for dev and prod. Need suggestion how to keep the password as secret and how to change it dynamically for dev and prod. Below is the command we are using and **** is basically where we are passing the password.
PGPASSWORD=***** psql -U username -h host -d databasename -f source filename path
Use
pmpasswdutility.pmpasswd newpass. Assume output isABCX6789PGPASS = ABCX6789. Export the variable for UNIX/LINUX.PGPASSin yourpsql...command. Please note to initiate the psql using infa command line utility.When password changes, you just have to change the pass in environment variable and not in tool.
This also give you an extra layer of security since you arent mentioning text password in informatica script.