Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to interpret [header__] change_mask column when create a replication?
How to know what does every byte means?
How to translate to varchar or another data type?
Hi @jmontoya
Please find a link to replicate's user guide re change_tables
https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/Change%20Tables/read_change_tab....
In case you have any replicate version or endpoint-specific questions please open a support case.
Thank you
Avidar
The change_mask datastructure is tricky to interpret, be sure to carefuly read and re-read the description as pointed to.
It may help to know that this structure (and the which CDC changes table) is made to mimic the SQL Server CDC mechanisme and you may want to study articles for that, to see how to possibly use the data.
For example: https://stackoverflow.com/questions/14607325/howto-interpret-the-mssql-cdc-update-mask-field and perhpas https://www.youtube.com/watch?v=4seL-ffeXtM . mind you, I didn't actually study those links, but they look like they may help.
And on you system(s) you may find: "Enumerate Net Changes Using All With Mask.sql" for example in the directory C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\SqlWorkbenchProjectItems\Sql\Change Data Capture\Enumeration
fwiw,
Hein
Hi @jmontoya
Please find a link to replicate's user guide re change_tables
https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/Change%20Tables/read_change_tab....
In case you have any replicate version or endpoint-specific questions please open a support case.
Thank you
Avidar
The change_mask datastructure is tricky to interpret, be sure to carefuly read and re-read the description as pointed to.
It may help to know that this structure (and the which CDC changes table) is made to mimic the SQL Server CDC mechanisme and you may want to study articles for that, to see how to possibly use the data.
For example: https://stackoverflow.com/questions/14607325/howto-interpret-the-mssql-cdc-update-mask-field and perhpas https://www.youtube.com/watch?v=4seL-ffeXtM . mind you, I didn't actually study those links, but they look like they may help.
And on you system(s) you may find: "Enumerate Net Changes Using All With Mask.sql" for example in the directory C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\SqlWorkbenchProjectItems\Sql\Change Data Capture\Enumeration
fwiw,
Hein
Hi @jmontoya
If one of the replies helped to resolve the issue, please mark it as a solution & like it to make it easier for others to find.
Thanks in advance!
Thanks, It works for me. I completed with https://docs.python.org/3/library/struct.html#struct.unpack
Hey there,
While there are great solutions in this post, here is just another option which is to provide an example on how to unpack the bitmap using sql queries.
https://github.com/Yoniyaminhub/change_mask
please review the readme.md in the repository to understand how it works.