MarkLogic 10 Product Documentation
ordt.redactDatetime

ordt.redactDatetime(
   column as String,
   options as object?
) as columnBinding

Summary

This function redacts a column with date or datetime values either by masking part of the existing value or by generating a random value. 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.viewCol, or op.schemaCol.
options The options for masking the value the column.

Usage Notes

The options consist of the following properties:

Example

const op   = require('/MarkLogic/optic');
const ordt = require('/MarkLogic/optic/optic-redaction.sjs');

op.fromView('main', 'expenses')
  .bind([
     ordt.redactDatetime(op.schemaCol('main', 'expenses', 'expenseDate'), {level:'parsed', format:'[M01]/[D01]/xx'})
     ])
  .result();

  

Example

const op   = require('/MarkLogic/optic');
const ordt = require('/MarkLogic/optic/optic-redaction.sjs');

op.fromView('main', 'expenses')
  .select([
     ordt.redactDatetime(op.schemaCol('main', 'expenses', 'expenseDate'), {level:'parsed', format:'[M01]/[D01]/xx'})
     ])
  .result();

  
Powered by MarkLogic Server | Terms of Use | Privacy Policy