Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am using \copy command to insert the rows into postgres database . Below is the command i am using
#!/bin/bash cd "/usr/local/pgsql/bin"& set PGPASSWORD=ma-24-03& psql --host=192.18.14.4 --port=5432 --username=postgres --dbname=a_test -c "\copy fact_supplier_Run FROM '/home/jail/user1/home/ExtractData/201_C.DAT' with DELIMITER '#' NULL ''"
It runs successfully if i fire manually but if i use tsystem component it doesn't fire up.Just gets completed without errors.
Any suggestion would be helpful.
Hello,
Could you please also post your tSystem component setting screenshots on community which will be helpful for us to address your issue.
Best regards
Sabrina
I have attached the screenshot of my job .
Where we ran the query in source , prints the output to local delimited file. Then uses tSystem command to upload the data to the destination DB using \copy command.
Please suggest
Hi,
in any case:
you need include the whole command into double quotes
and you must a proper escape characters
but problem relate to bash - error with spaces in parameters (you can find a lot of fo links about calling psql from bash)
simplest solutions could be - include all your commands into .sh file and call this .sh file from Talend