Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

MySQL SCD Example in Components Guide

Good morning,
I'm using Talend Open Studio for Big Data, version 5.4.
I recreated the MySQL SCD example on p. 502 of the Components Guide, using my own data extract as a source. When I run it, I get the following error:
"Incorrect table definition. There can only be one auto column and it must be defined as a key"
The SCD configuration and schema are below. I didn't find this issue elsewhere in the Help Center.
Has anyone else encountered this? Is there something wrong with how I followed the example?

Thanks,
Mitch

Labels (2)
15 Replies
Anonymous
Not applicable
Author

Anyone at all?
Anonymous
Not applicable
Author

Happy New Year!
Anonymous
Not applicable
Author

Hi,
It looks like column is missing primary key column altogether or there is some difference in the schema of the table and the structure used.
I would suggest to check the table structure, if it has one primary key column which is defined as auto_increment column. If not there already than define one. And again draw the graph freshly after refreshing the table metadata.
It should automatically recognize the key column and should not face any issue in this new job.

--
Thanks & Regards,
vinod_talend
Anonymous
Not applicable
Author

Hi Vinod,
Thanks for your response.
The primary key column is not auto-increment, but the values are unique. The SCD component adds an auto-increment key column (SK1).
As for "some difference in the schema of the table and the structure used", I changed the order of the fields in the SCD schema, so they would match the incoming schema from the tLogRow; same result.
Any further advice would be greatly appreciated.

Thanks again,
Mitch
Anonymous
Not applicable
Author

Hi Mitch
Can you please upload a screenshot of your table structure? There must be a auto-increment key column in the table, and set the name of the column in the surrogate key field; Also, a field called scd_start and a field called scd_end should be defined in the table if you uses type2 fields.
The tMysqlSCD_1 component also gives this error: "The schema from the input link "row2\" is different from the schema defined in the component"

The schema of tMysqlSCD should be the same as tLogRow, move the SK1 column from the schema of tMsqlSCD.

Shong
Anonymous
Not applicable
Author

Hi Mitch
Can you please upload a screenshot of your table structure? There must be a auto-increment key column in the table, and set the name of the column in the surrogate key field; Also, a field called scd_start and a field called scd_end should be defined in the table if you uses type2 fields.

Hi Shong,
Thanks for your response.
My table structure is attached. ORG_CD is the main key field, and SK1 is the auto-incrementing surrogate.
The tMysqlSCD_1 component also gives this error: "The schema from the input link "row2\" is different from the schema defined in the component"

The schema of tMysqlSCD should be the same as tLogRow, move the SK1 column from the schema of tMsqlSCD.

I'm not sure what you're asking for here. The surrogate is critical for the SCD; removing it to make the schemas match better would be counter-productive.

Mitch