Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone.
Talend = TOS 6.1.1
OS = Mac Os El Capitan
My job is
tConnection --> tFileInputDelimited--> tMap (few lookups with tPostgesqlInput) --> tPostgresqlOutput --> tCommit
In one of the lookup, i want to select data with a value from another lookup.
It works because i've debugged values and see the good values.
My problem is that i don't want to use all the value received but a part of it :
SELECT \n ref_invoice FROM \""+
context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE substring(my_column from 1 for 4)||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"
my_column is NOT the column in the schema but the key value received from the lookup Tmap.
So query will be :
SELECT \n ref_invoice FROM \""+
context.pBddSchema+"\".\"invoice\"\n WHERE ref_invoice ILIKE substring('FRGF-2016-06-12345' from 1 for 4)||'-' ||to_char(now(), 'YYYY')||'-%' \nORDER BY ref_invoice DESC\nLIMIT 1"
I don't have found a solution to replace the my_column parameter with the value from the tMap.
Any idea ?
For the moment, the query retreive all the table's data but i just want for exemple the FRGF ones.
In another ETL and with Oracle, i've just to write :1 to tell it to replace the parameter 1 with my value