Loading TOC...

MarkLogic Server 11.0 Product Documentation
ordt functions (Optic Redaction)

This is the Optic Redaction module, which provides functions for redacting the values of a column. In your Optic query, you can replace the existing column values with altered or randomly generated values, by using op.bind . Or you can directly select the redacted columns with op.select . You can also hide a column by binding the column to the null value or by projecting other columns.

To use this module in your Server-Side JavaScript code, include an require() call similar to following line in your code:

                   const ordt = require('/MarkLogic/optic/optic-redaction.sjs');
               
9 functions
Function name Description
ordt.maskDeterministic This function redacts a column with string values by replacing each value with deterministic masking text.
ordt.maskRandom This function redacts a column with string values by replacing each value with random masking text.
ordt.redactDatetime This function redacts a column with date or datetime values either by masking part of the existing value or by generating a random value.
ordt.redactEmail This function redacts a column with email address string that conforms to the pattern name@domain.
ordt.redactIpv4 This function redacts a column with IPv4 address string that conforms to a pattern with four blocks of 1-3 decimal digits separated by period (.) where the value of each block of digits is less than or equal to 255 as in 123.201.098.112 and 123.45.678.0.
ordt.redactNumber This function redacts a column by generating a random number within a configurable range either as a numeric data type or as a formatted string.
ordt.redactRegex This function redacts a string column by applying a regular expression.
ordt.redactUsPhone This function redacts a column with a 10-digit US phone number string by generating random numbers or replacing numbers with a masking character.
ordt.redactUsSsn This function redacts a column with a 9-digit US SSN (Social Security Number) string by generating random numbers or replacing numbers with a masking character.