SQL Data Catalog

Set-Classification

Bulk update columns with tags supplied.

Syntax

Set-Classification [[-Columns] <Object[]>] [-Categories] <hashtable> [[-FreeTextAttributes] <hashtable>] [<CommonParameters>]

Description

Bulk assigns a collection of tags to a collection of columns, clearing or overwriting any existing tags.

Parameters

-Columns <Object[]>

Array of columns to bulk update.

Aliases None
Required? false
Position? 1
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-Categories <Hashtable>

Hashtable of categories with their tags e.g. $categories = @{ "Sensitivity" = @("Confidential - GDPR") "Information Type" = @("Contact Info") }

Aliases None
Required? true
Position? 2
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-FreeTextAttributes <Hashtable>

Hashtable of free text attributes with their text. $freeTextAttributes = @{ "Regulatory Notes" = "GDPR compliance" }

Aliases None
Required? false
Position? 3
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

-ProgressAction <ActionPreference>

{{ Fill ProgressAction Description }}

Aliases None
Required? false
Position? named
Default Value None
Accept Pipeline Input False
Accept Wildcard Characters false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see http://technet.microsoft.com/en-us/library/hh847884.aspx.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • None.
    You cannot pipe input to this cmdlet.

Examples

-------------------------- EXAMPLE 1 --------------------------

$allColumns = Get-ClassificationColumn -instanceName "sqlserver\sql2016" -databaseName "WideWorldImporters"
$peopleTableColumns = $allColumns | Where-Object {$_.SchemaName -eq "Application" -and $_.TableName -eq "People" }
$tagCategories = @{
  "Sensitivity" =  @("Confidential - GDPR")
  "Information Type" = @("Contact Info")
}
$freeTextAttributes = @{
    "Regulatory Notes" = "GDPR compliance"
}
Set-Classification -columns $peopleTableColumns -categories $tagCategories -freeTextAttributes $freeTextAttributes

Overwrites all tag categories for given columns.


Didn't find what you were looking for?