@Categories(categories="transform") public class MaskNumber extends Object implements Directive, Lineage
Substitution masking is generally used for masking credit card or SSN numbers. This type of masking is fixed masking, where the pattern is applied on the fixed length string.
Executor step = new MaskNumber(lineno, line, "ssn", "XXX-XX-####", 1);
Executor step = new MaskNumber(lineno, line, "amex", "XXXX-XXXXXX-X####", 1);
| Modifier and Type | Field and Description |
|---|---|
static int |
MASK_NUMBER |
static int |
MASK_SHUFFLE |
static String |
NAME |
| Constructor and Description |
|---|
MaskNumber() |
| Modifier and Type | Method and Description |
|---|---|
UsageDefinition |
define() |
void |
destroy() |
List<Row> |
execute(List<Row> rows,
ExecutorContext context) |
void |
initialize(Arguments args) |
Mutation |
lineage() |
public static final String NAME
public static final int MASK_NUMBER
public static final int MASK_SHUFFLE
public UsageDefinition define()
public void initialize(Arguments args) throws DirectiveParseException
initialize in interface Executor<List<Row>,List<Row>>DirectiveParseExceptionpublic List<Row> execute(List<Row> rows, ExecutorContext context) throws DirectiveExecutionException
Copyright © 2020 CDAP Licensed under the Apache License, Version 2.0.