MarkLogic Server 11.0 Product Documentation
ordt:redact-ipv4

ordt:redact-ipv4(
   $column as item(),
   $options as map:map?
) as map:map

Summary

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. This function can be used with op:bind or op:select.

Parameters
$column The name of the column to be redacted. This can be either a string or the return value from op:col, op:view-col, or op:schema-col.
$options The options for masking the value the column.

Usage Notes

The options consist of the following properties:

Example

xquery version "1.0-ml";

import module namespace op="http://marklogic.com/optic"
     at "/MarkLogic/optic.xqy";

import module namespace ordt="http://marklogic.com/optic/redaction"
     at "/MarkLogic/optic/optic-redaction.xqy";

op:from-view("b2b", "edi")
   => op:bind((
      ordt:redact-ipv4(op:schema-col("b2b", "edi", "server"),  map:entry("character","1"))
      ))
   => op:result()
  

Example

xquery version "1.0-ml";

import module namespace op="http://marklogic.com/optic"
     at "/MarkLogic/optic.xqy";

import module namespace ordt="http://marklogic.com/optic/redaction"
     at "/MarkLogic/optic/optic-redaction.xqy";

op:from-view("b2b", "edi")
   => op:select((
      ordt:redact-ipv4(op:schema-col("b2b", "edi", "server"),  map:entry("character","1"))
      ))
   => op:result()
  
Powered by MarkLogic Server | Terms of Use | Privacy Policy