Five Stars

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).

 

image.pngimage.png

 

image.png

 

 

image.png

 

I am not sure if i am missing something.

 

Could you please help?

 

Thanks

Bhagwati

  • Data Integration
4 REPLIES
Community Manager

Re: Issue with tMysqlscd Component

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

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
Five Stars

Re: Issue with tMysqlscd Component

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

Five Stars

Re: Issue with tMysqlscd Component

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,

 

Bhagwatiimage.pngimage.png

Community Manager

Re: Issue with tMysqlscd Component

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
----------------------------------------------------------
Talend | Data Agility for Modern Business