Data Mask SQL

 
 

Transform.NumericVariance

Sample SQL...

/*===================================================================================
 Mask Type: Transform.NumericVariance =====================================================================================*/
/*---------------------------------------------------------------------
Table: [dbo].[DimCustomer]
Column: [NumberChildrenAtHome]
Mask:
* Type: 'Transform: Numeric Variance...'
* Params: '0.05'
* Category: 'Transform' - Overwrite all rows with an "obsfucated" original value
* Descrip: This mask transforms each row by randomly adjusting the numeric value up
           or down by the percent specified in the parameter.
---------------------------------------------------------------------*/
UPDATE [dbo].[DimCustomer]
SET [NumberChildrenAtHome]
  = [NumberChildrenAtHome]
    * (1+(CAST(ABS(CHECKSUM(NEWID())) AS FLOAT) / 2147483648)
    * 0.05 * 2 - 0.05); 

 

eXTReMe Tracker