Synapse deployment failing on default constraint

Copper Contributor

I have a table that is modified structurally and has some existing data. Through Devops deployment, dacpac is identifying change but resulting in following error. Strangely the default keyword relates to dynamic masking. If I drop the table manually and redeploy through devops it picks the table not available and creates it without any issues.

 

##[error]Error SQL72014: Framework Microsoft SqlClient Data Provider: Msg 104338, Level 16, State 1, Line 1 An expression cannot be used with a default constraint. Specify only constants for a default constraint.
##[error]Error SQL72045: Script execution error. The executed script:
##[error]CREATE TABLE [CIM_People].[tmp_ms_xx_employee_leave_request] (
##[error] [requested_for_employee_profile_id] VARCHAR (100) MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [leave_start_dt] DATE MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [leave_end_dt] DATE MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [successfactors_leave_account_type_cd] VARCHAR (255) MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [successfactors_leave_request_status_nm] VARCHAR (255) MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [leave_payroll_calculation_cd] VARCHAR (10) MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [leave_request_last_modified_dt_utc] DATETIME MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [leave_request_external_cd] VARCHAR (255) MASKED WITH (FUNCTION = 'default()') NOT NULL,
##[error] [requestor_employee_profile_id] VARCHAR
##[error]System.Management.Automation.RemoteException
##[error]The Azure SQL DACPAC task failed. SqlPackage.exe exited with code 1
 
Here is actual table script. Any thoughts what could be the issue?
CREATE TABLE [CIM_People].[employee_leave_request]
(
    [requested_for_employee_profile_id] varchar (100) MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [leave_start_dt] date MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [leave_end_dt] date MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [successfactors_leave_account_type_cd] varchar (255) MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [successfactors_leave_request_status_nm] varchar (255) MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [leave_payroll_calculation_cd] varchar (10) MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [leave_request_last_modified_dt_utc] datetime MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [leave_request_external_cd] varchar (255) MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [requestor_employee_profile_id] varchar (100) MASKED WITH (FUNCTION = 'default()')  NULL,
    [workflow_request_id] varchar (255) MASKED WITH (FUNCTION = 'default()')  NULL,
    [leave_day_qty] decimal (18, 2) MASKED WITH (FUNCTION = 'default()')  NULL,
    [leave_hour_qty] decimal (10, 2) MASKED WITH (FUNCTION = 'default()')  NULL,
    [leave_comment_desc] varchar (2000) MASKED WITH (FUNCTION = 'default()')  NULL,
    [leave_request_create_dt_utc] datetime MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [leave_last_modified_by_employee_profile_id] varchar (100) MASKED WITH (FUNCTION = 'default()')  NULL,
    [source_deleted_ind] varchar (1) MASKED WITH (FUNCTION = 'default()')  NOT NULL,
    [InsertedLoadId] INT NOT NULL,
    [InsertedLoadDate] DATETIME NOT NULL,
    [UpdatedLoadId] INT NULL,
    [UpdatedLoadDate] DATETIME NULL,
    [Type1SCDHash] VARCHAR(256) NOT NULL,    
    [BusinessKeyHash] VARCHAR(256) NOT NULL
)
WITH
(
    DISTRIBUTION = HASH([BusinessKeyHash]),
    CLUSTERED COLUMNSTORE INDEX
)
0 Replies