tOracleOutput with additional fields.

One Star

tOracleOutput with additional fields.

Hi. I am working with current version of Talend and Perl. I am trying to use Oracle Sequence number to generate a surrogate key for a warehouse. I set up the additional columnt and I specify Talend to replace it with the Oracle function. When the job exeicutes, Oracle gets the following error.
Starting job ParentCustomerCluster at 12:36 30/05/2007.
connecting to socket on port 4334 ...
connected
connecting to socket on port 3334 ...
connected
DBD::Oracle::st execute failed: called with 7 bind variables when 6 are needed at E:\TOS-Win32-r3065-V2.0.0\workspace\.Perl\STAGE_TO_EDW.job_ParentCustomerCluster.pl line 702.
can't execute insert query
Issuing rollback() for database handle being DESTROY'd without explicit disconnect().
A thread exited while 2 threads were running.
Job ParentCustomerCluster ended at 12:36 30/05/2007.

I see that there is only 6 paramaters. And with trace, all values are filled in. The message abover says that all paramaters are undef. Am I doing something wrong, or is this a bug?
Tags (1)
Employee

Re: tOracleOutput with additional fields.

The first problem is that you use an additionnal column to replace a schema column, but you don't have any "?" in the SQL expression. This is wrong. Either you use "?" in the SQL expression, or you don't replace an existing column, I mean you insert the additionnal column before or after an existing column.
The second problem is that Perl Oracle connector receives undef values. I have too few informations to give a solution. This problem might get resolved once the first problem is over. If not, give more details about the input data flow.
Employee

Re: tOracleOutput with additional fields.

Funny how your question looks like Glor question in 77 (and even more funny how my answer looks like the answer I gave to Glor) :-)
One Star

Re: tOracleOutput with additional fields.

Yes I see. But my table only has SEVEN columns. So the statement is correct. First column = sequence number, with 6 additional columns to be populated with the values in the paramaters. It still gets passed 7 paramaters, and there is only 6 ?'s. So it is ignoring the fact that I specified that the first column in my table should be replaced by Oracle sequence value.
Philip
One Star

Re: tOracleOutput with additional fields.

Hi. Now I really don't know what is going on anymore. I physically deleted the CUSTOMER_SEQ column from my schema. So now my schema just has 6 columns. I then use an additional column as before, and specify that it must be before the first column. Guess what? I get the same error as above, stating that 7 bind variables are being passed to Oracle, instead of 6. Even if I delete the additional column, I still get the same error. Where does Talend store this information? Maybe it does not clean up after iself somehowe and still references the original metadata. Any help will be appreciated.
Thanks
Philip
One Star

Re: tOracleOutput with additional fields.

Sorry. There was a copy of the actual code open. So it seems that Talend did not update the code when I saved the job. So it kept executing the old code. Maybe Talend should warn that it cannot rebuild the job?