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

[resolved] CDC fails on insert because of NULL values in tcdc_view (TIS)

Hi,
I use TIS (CDC) for replication on 2 databases , i my case MYSQL. So i catch changes in one database and replicate them on the other database in asynchronous mode.
When i insert a row and delete the same row in the table i want to replicate, the process fails during replication because the row has been deleted from the original table (link between tcdc_MYTABLE, MYTABLE and tcdc_view_MYTABLE) so that NULL values are reported in tcdc_view for the insertion operation ; and as i can't insert NULL values in the table the process fails.
This is a very blocking problem for the CDC component.
I'm blocked if i don't want to create (manually of course) a temporary table instead of the view
Labels (2)
23 Replies
Anonymous
Not applicable
Author

Ok. I'll be back to you with my video.
Regards
Anonymous
Not applicable
Author

Hi Shong,
I've sent you by mail my videos.
Waiting for your return
Regards
dko
Anonymous
Not applicable
Author

In these videos, I only do I+D on the same row and as you'll see, i get NULL values.
Anonymous
Not applicable
Author

Hi
Ok, I receive your video and I will have a look at it tomorrow.
Best regards
Shong
Anonymous
Not applicable
Author

Hi dko
I have looked your video and don't see an exception on your CDC operation. The only difference is I use SQLYog to operate mysql and you use PHPMYAdmin. I have no clue at the moment.
Best regards
Shong
Anonymous
Not applicable
Author

Hi Shong,
Thanks for your answer.
I'm trying to apply your first proposal, replacing NULL values by default one ("", 0, etc) in Insert because if I do I+D on the same row, it doesn't matter if I insert the row with default values as I'll delete it rigth after. It may work I think even if I have a lot of work for that because I have to do it manually for each table and field as the number of fields per table is quite variable. Maybe it could help a lot if this is taken into account in your CDC code.
Therefore, how can I get get the same sequence (I+D) during my replication. I mean, for instance, if I follow the example you give for CDC in Oracle ( http://www.talendforge.org/tutorials/tutorial.php?language=english&idTuto=44) Delete is always executed before Insert (due to the order of execution of my job) so that I'll synchronise Insert with the default values in the other table.
Regards
Anonymous
Not applicable
Author

Hi,
Concerning the second part of my previous post, I think I know why it doesn't work when i want to keep the order of the changes during my synchronisation.
I've selected "multithreading execution" and deselect the use of the project settings in my job parameters. I've also deleted all "OnSubjobOk" (as described in http://www.talendforge.org/tutorials/tutorial.php?language=english&idTuto=44) to let my multithreading work. For the tests I've done for the moment, it works.
Maybe it can help.
Regards
dko
Anonymous
Not applicable
Author

Hi dko
That is the culprit, if you check the box 'multiple thread exection', the subjobs will run parallelly.
Best regards
Shong
Anonymous
Not applicable
Author

Hi,
After deep tests today on CDC, I'm not able to get the same sequence of operations on table A (for instance I+D+I+I+D, where at least one I+D are on the same row) when I synchronize table A and table B.
Using multithreading was not the solution since it's not possible to guarantee the execution time of each thread.
This is remains a big problem.
Regards
dko
Anonymous
Not applicable
Author

Thank you, for answering. But this method works for me only with .. In all other cases I get only strange results, like those below :lol: