Sunday, November 14, 2010

Data Masking for Demonstrations

Dashboards / Answers demonstrations happen frequently. Data privacy is important, so masking data is a common request. Run demonstrations for any audience and mask data using:
  • Presentation variables and
  • Answers functions to manipulate request columns (strings and numbers)
Brief steps listed here:

1. Create a dashboard / page prompt with a Presentation Variable. Set masking on by default for privacy reasons...
MASK, or @{MASK}{'Mask'}
From DR. OBI
2. Answers request columns respond to the presentation variable value, example below:
CASE '@{MASK}' = 'Mask'
THEN FUNCTION MASK(FOLDER.COLUMN)
ELSE FOLDER.COLUMN
END
3. Mask data in any way you imagine, still a good demonstration ensures even masked data makes some sense. For example:
  • Numbers - easily masked by introducing variation
  • CONSTANT + - / * "Sales Facts"."Amount Sold"
  • PERCENT * "Sales Facts"."Amount Sold"
  • Strings - masked by replacing characters (simple and more complex examples)
REPEAT('x', 5)||RIGHT(Customers."Cust Last Name", 5)
REPEAT('x', (LENGTH(Customers."Cust Last Name")/2))||RIGHT(Customers."Cust Last Name",(LENGTH(Customers."Cust Last Name")-LENGTH(Customers."Cust Last Name")/2))
4. Add the functions into a CASE statement, example:
CASE WHEN '@{MASK}' = 'Mask' THEN (5 * "Sales Facts"."Amount Sold")
ELSE "Sales Facts"."Amount Sold"
END
5. Add sophistication to your data masking capabilities by ensuring the 'Mask' prompt is available only to 'Power Users' on the dashboard page.
 

From DR. OBI
Complex string replacement routines in Answers can increase processing time, so keep this in mind. This is a simple alternative to masking routines at the data source and can get your demonstrations up and running quickly.