Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

[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.
Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

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.

View solution in original post

5 Replies
Anonymous
Not applicable
Author

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.
Anonymous
Not applicable
Author

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
Anonymous
Not applicable
Author

"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.
Anonymous
Not applicable
Author

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.
Fish3
Contributor
Contributor

11 year old post was what helped me out.