Page 1 of 1

SQLCODE - Upsert

Posted: Wed Feb 23, 2005 9:48 am
by akrzy
What am I doing wrong that the following error appears :
"
Sequential_File_10: Error when checking operator: Could not find input field "sqlcode"
"

I use write mode=Upsert and reject=TRUE.

Posted: Wed Feb 23, 2005 10:34 am
by ArndW
akrzy,

I think you need to explain a bit more. "upsert" doesn't apply to sequential files, so you are probably working with a table as well ... When are you getting the error and what are you doing? Could your sequential output file be a reject link from database output stage?

Posted: Wed Feb 23, 2005 3:06 pm
by ray.wurlod
Have you used the name Sequential_File_10 for a database stage??

The error message suggests that you have an expression that uses a field name sqlcode, but that this does not exist in an input stream, or is incorrectly qualified (left over from an earlier version of the job design perhaps).

Posted: Wed Feb 23, 2005 3:56 pm
by akrzy
Let me explain.

My job reads data from flat file and writes them to database table for example MS SQL Server.

In the Propertise tab (ODBC) I set "Write mode = Upsert" to reject rows to flat file (Sequential_File_10).

For every destination table I have the same error:
"Could not find input field "sqlcode" "

Posted: Thu Feb 24, 2005 2:46 am
by ArndW
Akrzy,

did you check your SQL as Ray suggested? Could you be using "sqlcode" incorrectly as a parameter somewhere? Is your error still present when you remove the reject sequential file link?

Posted: Thu Feb 24, 2005 3:45 am
by akrzy
The "sqlcode" coulmn appears in the output link when I check rejected=TRUE (databse stage). This columns appears automaticlaly.

Posted: Thu Feb 24, 2005 4:13 am
by ArndW
and does the "sqlcode" column show up in the column definitions of the sequential reject file (it should)? Perhaps you need to turn off column propagation for this stage... do you have it set?

Posted: Thu Feb 24, 2005 4:36 am
by akrzy
Yes, "sqlcode" there is in the column definitions of the sequential reject file

Posted: Thu Feb 24, 2005 4:57 am
by vigneshra
Hi akrzy,
As Arnd says, you need to turn off the column propagation for the reject link. That will solve the problem. Again, I raise a question here. What is the impact in the performance on turning on/off the column propagation option? Is it significant?

Posted: Thu Feb 24, 2005 5:01 am
by akrzy
How can I turn off the column propagation for the reject link?

Posted: Thu Feb 24, 2005 6:49 am
by ArndW
akrzy,

go into your Oracle stage, to the output link and in the bottom left of the COLUMNS tab you will see the checkbox.

Posted: Thu Feb 24, 2005 7:14 am
by akrzy
I can't see any checkbox :(

Posted: Thu Feb 24, 2005 7:41 am
by akrzy
I've found.
In the ADministrator I checked "Enable runtime column propagation".
But It doesn't work still.

Posted: Thu Feb 24, 2005 8:11 am
by ArndW
You need to uncheck the box in the designer of that job stage, not in the administrator. Are you writing straight from the Oracle stage into a Sequential error file, or are you going through a transform? I just wrote a dummy job with a reject link and it worked fine... Perhaps you could delete the file & link from your job and recreate it - just to make sure that it isn't some issue in the job design. Also, did you enable the tick-box in the Oracle stage to write the rejects to a reject link?

Posted: Thu Feb 24, 2005 8:25 am
by vigneshra
Hi akrzy,
Just double-click the stage from which the link to the reject file arises (It may be a transformer or a database stage itself). Go to the column tab and find the check-box at the bottom left. Just uncheck and your problem will be solved! I don't know any other way to explain :D