im on Linux
i try to execute psql command line from tJava routine
but no query are good... but when i execute in command line linux are correctly execute.
here for exemple sql query :
my syntaxe are bad for Talend -> tJava routine ?
plz dont tel me that i do not have to use psql in command line i'm forced by the existing.
ProcessBuilder pb = new ProcessBuilder("/usr/bin/psql" ,"-h",this.getHost(),"-p",this.getPort(),"-U",this.getLogin(),"-d",this.getDataBase(),"-c", "\"\\SELECT NOW();\"");
Map<String, String> env = pb.environment();
Process p = pb.start();
my error message is :
java.sql.SQLException: ERROR: syntax error at or near ""SELECT NOW();""LINE 1: "SELECT NOW();" ^
i tried :
if you have an idea ?
Thanks a lot.
Solved! Go to Solution.
Talend named a Leader.
Kickstart your first data integration and ETL projects.
Part 2 of a series on Context Variables
Learn how to do cool things with Context Variables
Read about some useful Context Variable ideas