Loading TOC...

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 XQuery code, include an import statement similar to following line in your code:

                   import module namespace ordt="http://marklogic.com/optic/redaction"
                       at "/MarkLogic/optic/optic-redaction.xqy";
               
9 functions
Function name Description
ordt:mask-deterministic This function redacts a column with string values by replacing each value with deterministic masking text.
ordt:mask-random This function redacts a column with string values by replacing each value with random masking text.
ordt:redact-datetime 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:redact-email This function redacts a column with email address string that conforms to the pattern name@domain.
ordt:redact-ipv4 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:redact-number 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:redact-regex This function redacts a string column by applying a regular expression.
ordt:redact-us-phone 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:redact-us-ssn 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.