[resolved] Schema must have key, but it does.

One Star

[resolved] Schema must have key, but it does.

I'm getting the following error message, telling me the schema needs a key. But a key has been defined.
Exception in component tInformixOutput_1
java.lang.RuntimeException: For update, Schema must have a key
at tcs_data_warehouse.datedimensionaddupdateholidays_0_1.DateDimensionAddUpdateHolidays.tFileInputExcel_1Process(DateDimensionAddUpdateHolidays.java:1070)
at tcs_data_warehouse.datedimensionaddupdateholidays_0_1.DateDimensionAddUpdateHolidays.tInformixConnection_1Process(DateDimensionAddUpdateHolidays.java:327)
at tcs_data_warehouse.datedimensionaddupdateholidays_0_1.DateDimensionAddUpdateHolidays.runJobInTOS(DateDimensionAddUpdateHolidays.java:1896)
at tcs_data_warehouse.datedimensionaddupdateholidays_0_1.DateDimensionAddUpdateHolidays.main(DateDimensionAddUpdateHolidays.java:1767)
The following images show the job design, the schema, and the java code at line 1070 which will always evaluate to an error.

Accepted Solutions
One Star

Re: [resolved] Schema must have key, but it does.

I found it. I also have to set the update key on the Advanced Settings tab.
Shong, Thank you for your help. This was driving me crazy.

All Replies
One Star

Re: [resolved] Schema must have key, but it does.

Additional information.
We are using TIS 4.1.1, the database is Informix.
This job worked fine until I changed the name of the column in the database from "date" to "calendar_date". This is not the primary key in the table, but is unique. But, again, this worked fine until I changed the name of the column.
Community Manager

Re: [resolved] Schema must have key, but it does.

Hi
java.lang.RuntimeException: For update, Schema must have a key

You must set one column as key on schema for update, check the key box. From your image, I see the key box of calendar_date column is checked now.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Schema must have key, but it does.

"You must set one column as key on schema for update, check the key box. From your image, I see the key box of calendar_date column is checked now."
I'm confused. I have the column calendar_date checked in the schema. Isn't this what is supposed to be checked? Is there some other checkbox? That is what I am saying, the schema is checked to make calendar_date the key, but I am still getting this error message. It was checked when the column was named "date" and still checked when I renamed the column (in the database and in Talend jobs) to "calendar_date". The only other difference is I'm getting this error message.
One Star

Re: [resolved] Schema must have key, but it does.

I found it. I also have to set the update key on the Advanced Settings tab.
Shong, Thank you for your help. This was driving me crazy.