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

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
jmontoya
Contributor
Contributor

Column [header__] change_mask

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?

Labels (1)
2 Solutions

Accepted Solutions
avidary_qlik
Support
Support

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

 

 

View solution in original post

Heinvandenheuvel
Specialist III
Specialist III

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

 

View solution in original post

5 Replies
avidary_qlik
Support
Support

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

 

 

Heinvandenheuvel
Specialist III
Specialist III

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

 

Dana_Baldwin
Support
Support

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!

jmontoya
Contributor
Contributor
Author

Thanks, It works for me. I completed with https://docs.python.org/3/library/struct.html#struct.unpack

yonatanyamin
Employee
Employee

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.