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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Bhagwati1
Contributor II
Contributor II

Issue with tMysqlscd Component

Hello Guys,

 

I am trying to implement SCD type 2 using tMysqlSCD.Below are the screenshots of my Job.

 

Below are primary Keys in Source table.

 

1.Rec_source

2.Rec_Date

3.Fund_ID

 

Below are primary Keys in Destination table.

 

1.Rec_source

2.Rec_Date

3.Fund_ID

4.Trans_ID

 

Issue Description :

 

Scd_end,scd_version and scd_active do change when a there are changes for non-primary key field.(part of SCD type 2 field).

 

0683p000009LwNJ.png0683p000009LwKM.png

 

0683p000009LwCQ.png

 

 

0683p000009Lw5Q.png

 

I am not sure if i am missing something.

 

Could you please help?

 

Thanks

Bhagwati

Labels (1)
4 Replies
Anonymous
Not applicable

Hi
Uncheck the 'key' box of Trans_ID column on the schema, this field is the surrogate key.

Regards
Shong
Bhagwati1
Contributor II
Contributor II
Author

Thanks for your respone !

 

I tried your suggestion but unfortunately it is not working. I am using talend 6.1 Open studio.

 

Could you please advise?

 

Thanks,

 

Bhagwati

Bhagwati1
Contributor II
Contributor II
Author

Hello,

 

Another finding,

 

tMySqlSCD works when data is loaded from Excel to Mysql table.

 

But fails when i load data from MySQL table to another MySQL table. Not sure if i am missing something.

 

Anyone please help?

 

Thanks,

 

Bhagwati0683p000009Lw5n.png0683p000009Lvjs.png

Anonymous
Not applicable

Hi
Print the data on the console to see what's the difference between Excel's data and DB data. In addition, you use a tMysqlConnection to create the db connection, you should use also a tMysqlCommit to commit the changes if the job works fine and tMysqlRollback if the to rollback the changes if the job fails.

Regards
Shong