0
votes

I am using a sub-transformation PARTNER_CONTACT_SUB with 2 mapped fields like as below:

enter image description here

Then in my sub-transformation I execute an sql query in an input table PARTNER_TYPE_SUB like as below :

enter image description here I'm use 2 mark from the INPUT SUB step.

But when I run the transformation, Pentaho responds this:

2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - ERROR (version 9.0.0.0-423, build 9.0.0.0-423 from 2020-01-31 04.53.04 by buildguy) : Unexpected error
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - ERROR (version 9.0.0.0-423, build 9.0.0.0-423 from 2020-01-31 04.53.04 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException: 
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - An error occurred executing SQL:
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - SELECT *, ? as partner_id 
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - FROM llx_socpeople 
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - where fk_soc = ?;
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - 
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - offending row : [societe_id Integer(9)], [nom ....
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - 
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - Error setting value #3 [String] on prepared statement
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - Parameter index out of range (3 > number of parameters, which is 2).
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - 
2021/02/01 14:27:48 - PARTNER CONTACT INPUT.0 - 

Have you an idea ?

Thanks.

My config :

Pentaho 9.0 under Ubuntu 18

2

2 Answers

0
votes

I have reproduce your error.

Look 'PARTNER CONTACT SUB' step in 'partner' transformation. Here you need only 2 input field (rowid and res_partner_id) for 'PARTNER CONTACT SUB' step to pass/ mapping to partner_contact transformation. But 'PARTNER CONTACT SUB' step gets more than 2 field as an input. And produce the error.

You need to pass exact 2 field to 'PARTNER CONTACT SUB' step. Your 'Filtrage lignes' should return only 2 field.

0
votes

thank you, I understood your solution she looks perfect I applied it but it seems that the 2 arguments are not transmitted attached the ktr files