ordt.redactEmail( column as String, options as object? ) as columnBinding
This function redacts a column with email address string that conforms to the pattern name@domain. 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. |
The options consist of the following properties:
full
(the default), name
,
or domain
;
the full
level masks both the name and domain;
the name
level masks only the name but not the domain;
the domain
level masks only the domain but not the name.const op = require('/MarkLogic/optic'); const ordt = require('/MarkLogic/optic/optic-redaction.sjs'); op.fromView('main', 'employees') .bind([ ordt.redactEmail(op.schemaCol('main', 'employees', 'contact'), {level:'name'}) ]) .result();
const op = require('/MarkLogic/optic'); const ordt = require('/MarkLogic/optic/optic-redaction.sjs'); op.fromView('main', 'employees') .select([ ordt.redactEmail(op.schemaCol('main', 'employees', 'contact'), {level:'name'}) ]) .result();
Stack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.