Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
first of all, sorry for my poor english .. i'm a french speaker.
i would like to ask a question about the rows orders in a tmap with 2 outputs.
As you can see, i'm doing a "simple" job with a DB Connection, followed by a filereading (tfileInputFullRow) which is followed by a tmap with 2 outputs (initially it is 2 tdboutputs which goes in 2 different tables but i changed it into 2 tfileOuputDelimited which goes to the same txt file, to really see what's happening).
Also, I'm using the same sequence value (postgres) in the 2 outputs, nexval for the 1st, and currval for the 2nd ...
The original file has 5 rows as followed
test1
blabla1
test2
blabla2
blabla3
I want the test* lines to be insert in the 1st tdboutput and the blabla* ones in the 2nd tdbouput.
Everything is doing fine EXCEPT that the row orders is not respected, indeed, the result in the output file contains (i addthe sequence in the 2nd field) :
test1 1
test2 2
blabla1 2
blabla2 2
blabla3 2
Instead of :
test1 1
blabla1 1
test2 2
blabla2 2
blabla3 2
With the 2 tlogrows, the row orders is well respected, BUT, in other components like tdboutput it isn't ...
Can someone please help me ? i've tried many things ... 😞
Thank you
--
Pascal
Hi,
i finally managed to get through this probleme by using the talend function Numeric.sequence(), that i set in the tmap, instead of the nextval and currval.
With a nextval before, and a setval after.
Thank you
Pascal
Hi
Can show us the sequence function expression you are using on tMap? A screenshot of tMap is helpful for us to understand the issue well.
Regards
Shong
Hi,
sorry for the late reply, i have been sick ..
Here is a screenshot of the tmap
And the sequence function expression is defined for the field idcmdcarte, as followed :
These functions are set on the advanced settings of the 2 tdboutput, like this.
Thank you
--
Pascal
Hi,
i finally managed to get through this probleme by using the talend function Numeric.sequence(), that i set in the tmap, instead of the nextval and currval.
With a nextval before, and a setval after.
Thank you
Pascal