Skip to content

Non-default dynamic data masking operations not supported for date #476

@Thorium

Description

@Thorium
  • SqlPackage or DacFx Version: 162.1.167.1
  • .NET Framework (Windows-only) or .NET Core: dotnet 6.0.424 and 8.0.303
  • Environment (local platform and source/target platforms): net6.0

I'm having a database table with data-masking of day so that data-analyst can see person's age but not private information like full date of birth. ("XX May 2024")

Specification:
https://learn.microsoft.com/en-us/sql/relational-databases/security/dynamic-data-masking?view=sql-server-ver16#define-a-dynamic-data-mask

This standard says it should be datetime("D") and it does exist and works in SQL-server, but compiling that with DacFx crashes.

Steps to Reproduce:

  1. Have any table with such masking function, for example:
CREATE TABLE [Person] (
[DateOfBirth]  DATE MASKED WITH (FUNCTION = 'datetime("D")') NOT NULL
)
  1. Try to run the tool. It fails for:

error SQL70630: The data masking function provided for column BirthDate is invalid.

**Did this occur in prior versions? Yes, not a regression issue. **

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions