We need to mask fields from conditions specified by us.
For example, the phone will be masked according to the following conditions. And we would need it to be reusable for all our projects regardless of the connection.
IF ((SUBSTR(TELEPHONE,1,1) ='6') OR (SUBSTR(TELEPHONE, 1,1) ='7')) THEN
IF ((SUBSTR(TELEPHONE,1,1) ='+') AND ((SUBSTR(TELEPHONE, 4,1) ='6') OR (SUBSTR(TELEPHONE, 4,1) ='7'))) THEN
IF (SUBSTR(TELEPHONE,1,1) ='+') THEN
How can we do it with Fast Data Masker?
Thanks and regards.
So the first thing I thought of was the fact we do not have if statements available in our Fast Data Masker product. What do we have? Reading the documentation at:
Fast Data Masker Best Practices -> Add WHERE Clause to a Table
Didn't get me where I wanted to be. But, it provided a place to start. I looked further in the documentation to:
Define Masking Rules -> Select a Column to Mask
Select a Column to Mask
After you select a table to mask, select a column to mask for the table.
You have successfully selected a column that you want to mask for the selected table.
Note: For regular flat-file masking, the same column cannot be masked twice in a given masking map. You can now select the mask type.
This is something we could work with. Relooking at your if statements, could they be reconfigured to be where clauses that would accomplish the same task? My initial answer was yes. I asked Development to confirm, and this is their response:
Correct, where clauses is the only way I know to achieve it, unless there is a SQL function on the database to do the same
Multiple where clauses on the table - so something like
WHERE SUBSTR(TELEPHONE,1,1) ='6' OR SUBSTR( TELEPHONE, 1,1) ='7'
And the last where clause
WHERE SUBSTR( TELEPHONE,1,1) <> '6' AND SUBSTR( TELEPHONE, 1,1) <> '7' AND SUBSTR( TELEPHONE, 1,1) <> '+'
and not (SUBSTR(TELEPHONE,1,1) ='+') AND ((SUBSTR(TELEPHONE, 4,1) ='6') OR (SUBSTR(TELEPHONE, 4,1) ='7'))
Please be sure and note these restrictions: Fast Data Masker currently supports the following operators: <,<=,=, =>, > and LIKE (LIKE is not supported for flat files. It is only used for database masking).