-
-
Notifications
You must be signed in to change notification settings - Fork 839
Invoke-DbaDbDataMasking - fix up decimal & bit support #9664
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have the time to test this, but I left some comments. Will try to test this in the next days.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix, just tested this in my lab. Looks good to me.
I would suggest to merge this now and then after that have a look at #9671 |
Bug #9180
Type of Change
Invoke-ManualPester
)Purpose
Fix up Invoke-DbaDbDatamasking to improve bit & decimal value support
Approach
There was a missing check if a data type was a decimal and the value came back blank instead of with an actual value. I changed this to make sure that if blank is returned, it is set to 0.00 instead. I also encountered errors with bit values as in the open item, and was able to track down the error to Convert-DbaMaskingValue using Claude Code & my error message. It made the recommendations to improve the RegEx search string and to add the additional checks for boolean values to convert to 1 & 0 for a bit column in the database. I also updated the tests to test for decimal and bit values & masking them as well.