dataclassification

package
v0.119.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration resource that controls scanning behavior and auto-tagging rules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AutoTaggingConfig

type AutoTaggingConfig struct {
	// Whether auto-tagging is enabled or disabled for this classification tag.
	AutoTaggingMode AutoTaggingConfigAutoTaggingMode `json:"auto_tagging_mode"`
	// The Classification Tag (e.g., "class.name", "class.location")
	ClassificationTag string `json:"classification_tag"`
}

Auto-tagging configuration for a classification tag. When enabled, detected columns are automatically tagged with Unity Catalog tags.

type AutoTaggingConfigAutoTaggingMode

type AutoTaggingConfigAutoTaggingMode string

Auto-tagging mode.

const AutoTaggingConfigAutoTaggingModeAutoTaggingDisabled AutoTaggingConfigAutoTaggingMode = `AUTO_TAGGING_DISABLED`
const AutoTaggingConfigAutoTaggingModeAutoTaggingEnabled AutoTaggingConfigAutoTaggingMode = `AUTO_TAGGING_ENABLED`

func (*AutoTaggingConfigAutoTaggingMode) Set

Set raw string value and validate it against allowed values

func (*AutoTaggingConfigAutoTaggingMode) String

String representation for fmt.Print

func (*AutoTaggingConfigAutoTaggingMode) Type

Type always returns AutoTaggingConfigAutoTaggingMode to satisfy [pflag.Value] interface

func (*AutoTaggingConfigAutoTaggingMode) Values

Values returns all possible values for AutoTaggingConfigAutoTaggingMode.

There is no guarantee on the order of the values in the slice.

type CatalogConfig

type CatalogConfig struct {
	// List of auto-tagging configurations for this catalog. Empty list means no
	// auto-tagging is enabled.
	AutoTagConfigs []AutoTaggingConfig `json:"auto_tag_configs,omitempty"`
	// Schemas to include in the scan. Empty list is not supported as it results
	// in a no-op scan. If `included_schemas` is not set, all schemas are
	// scanned.
	IncludedSchemas *CatalogConfigSchemaNames `json:"included_schemas,omitempty"`
	// Resource name in the format: catalogs/{catalog_name}/config.
	Name string `json:"name,omitempty"`

	ForceSendFields []string `json:"-" url:"-"`
}

Data Classification configuration for a Unity Catalog catalog. This message follows the "At Most One Resource" pattern: at most one CatalogConfig exists per catalog. - Full CRUD operations are supported: Create enables Data Classification, Delete disables it - It has no unique identifier of its own and uses its parent catalog's identifier (catalog_name)

func (CatalogConfig) MarshalJSON

func (s CatalogConfig) MarshalJSON() ([]byte, error)

func (*CatalogConfig) UnmarshalJSON

func (s *CatalogConfig) UnmarshalJSON(b []byte) error

type CatalogConfigSchemaNames

type CatalogConfigSchemaNames struct {
	Names []string `json:"names"`
}

Wrapper message for a list of schema names.

type CreateCatalogConfigRequest

type CreateCatalogConfigRequest struct {
	// The configuration to create.
	CatalogConfig CatalogConfig `json:"catalog_config"`
	// Parent resource in the format: catalogs/{catalog_name}
	Parent string `json:"-" url:"-"`
}

type DataClassificationAPI

type DataClassificationAPI struct {
	// contains filtered or unexported fields
}

Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration resource that controls scanning behavior and auto-tagging rules.

func NewDataClassification

func NewDataClassification(client *client.DatabricksClient) *DataClassificationAPI

func (*DataClassificationAPI) CreateCatalogConfig

func (a *DataClassificationAPI) CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)

func (*DataClassificationAPI) DeleteCatalogConfig

func (a *DataClassificationAPI) DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error

func (*DataClassificationAPI) GetCatalogConfig

func (a *DataClassificationAPI) GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)

func (*DataClassificationAPI) UpdateCatalogConfig

func (a *DataClassificationAPI) UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)

type DataClassificationInterface

type DataClassificationInterface interface {

	// Create Data Classification configuration for a catalog.
	//
	// Creates a new config resource, which enables Data Classification for the
	// specified catalog. - The config must not already exist for the catalog.
	CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)

	// Delete Data Classification configuration for a catalog.
	DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error

	// Get the Data Classification configuration for a catalog.
	GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)

	// Update the Data Classification configuration for a catalog. - The config must
	// already exist for the catalog. - Updates fields specified in the update_mask.
	// Use update_mask field to perform partial updates of the configuration.
	UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)
}

type DataClassificationService deprecated

type DataClassificationService interface {

	// Create Data Classification configuration for a catalog.
	//
	// Creates a new config resource, which enables Data Classification for the
	// specified catalog. - The config must not already exist for the catalog.
	CreateCatalogConfig(ctx context.Context, request CreateCatalogConfigRequest) (*CatalogConfig, error)

	// Delete Data Classification configuration for a catalog.
	DeleteCatalogConfig(ctx context.Context, request DeleteCatalogConfigRequest) error

	// Get the Data Classification configuration for a catalog.
	GetCatalogConfig(ctx context.Context, request GetCatalogConfigRequest) (*CatalogConfig, error)

	// Update the Data Classification configuration for a catalog. - The config
	// must already exist for the catalog. - Updates fields specified in the
	// update_mask. Use update_mask field to perform partial updates of the
	// configuration.
	UpdateCatalogConfig(ctx context.Context, request UpdateCatalogConfigRequest) (*CatalogConfig, error)
}

Manage data classification for Unity Catalog catalogs. Data classification automatically identifies and tags sensitive data (PII) in Unity Catalog tables. Each catalog can have at most one configuration resource that controls scanning behavior and auto-tagging rules.

Deprecated: Do not use this interface, it will be removed in a future version of the SDK.

type DeleteCatalogConfigRequest

type DeleteCatalogConfigRequest struct {
	// Resource name in the format: catalogs/{catalog_name}/config
	Name string `json:"-" url:"-"`
}

type GetCatalogConfigRequest

type GetCatalogConfigRequest struct {
	// Resource name in the format: catalogs/{catalog_name}/config
	Name string `json:"-" url:"-"`
}

type UpdateCatalogConfigRequest

type UpdateCatalogConfigRequest struct {
	// The configuration to apply to the catalog. The name field in
	// catalog_config identifies which resource to update.
	CatalogConfig CatalogConfig `json:"catalog_config"`
	// Resource name in the format: catalogs/{catalog_name}/config.
	Name string `json:"-" url:"-"`
	// Field mask specifying which fields to update.
	UpdateMask fieldmask.FieldMask `json:"-" url:"update_mask"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL