Skip to content
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

New Feature - Data Masking Export Dictionary #6028

Merged
merged 14 commits into from Sep 10, 2019

Conversation

@sanderstad
Copy link
Contributor

commented Sep 9, 2019

Type of Change

  • Bug fix (non-breaking change, fixes #)
  • New feature (non-breaking change, adds functionality)
  • Breaking change (effects multiple commands or functionality)
  • Ran manual Pester test and has passed (`.\tests\manual.pester.ps1)
  • Adding code coverage to existing functionality
  • Pester test is included
  • If new file reference added for test, has is been added to github.com/sqlcollaborative/appveyor-lab ?
  • Nunit test is included
  • Documentation
  • Build system

Purpose

In some cases, especially running testing, you want the data to be masked consistently between masking actions. Before you would get different values for the masked columns every time.

Approach

It's now possible to export and import dictionaries to make the masking consistent.

The command will export all the values and keys to a CSV file.

Commands to test

Invoke-DbaDbDataMasking -SqlInstance [instance]-Database [database] -FilePath [pathtomaskingfile] -DictionaryExportPath [exportdirectory]
Invoke-DbaDbDataMasking -SqlInstance [instance]-Database [database] -FilePath [pathtomaskingfile] -DictionaryFilePath [pathtodictionary]

Screenshots

Export the dictionary

image

The result of the export
image

The result of the masking
image

Look up a specific value
image

Run the masking with importing the dictionary file
image

The result after using the dictionary
image

Learning

.PARAMETER DictionaryFilePath
Import the dictionary to be used in in the database masking
.PARAMETER DictionaryExportPath

This comment has been minimized.

Copy link
@potatoqualitee

potatoqualitee Sep 9, 2019

Member

Should this be an Export command instead?

This comment has been minimized.

Copy link
@sanderstad

sanderstad Sep 9, 2019

Author Contributor

The functionality to export the dictionary will, and can, only be used in the Invoke-DbaDbDataMasking command.

@potatoqualitee potatoqualitee merged commit 91829ec into development Sep 10, 2019

5 checks passed

Module imports on all platforms (ubuntu-latest)
Details
Module imports on all platforms (windows-latest)
Details
Module imports on all platforms (macOS-latest)
Details
continuous-integration/appveyor/branch AppVeyor build succeeded
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details

@potatoqualitee potatoqualitee deleted the new-feature-datamasking-exportdictionary branch Sep 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.