table cf column datamask set

Sets the data mask on one or more JSON table columns.

To set a dynamic data mask for a column within a column family (CF) of a JSON table, use the maprcli table cf column datamask set command. For columns with existing data, the dynamic data masks will apply to all future SCAN and GET queries for that table column without any client-side or application changes.

Syntax

CLI
maprcli table cf column datamask set 
  -path <table-path>
  -cfname <column family name>
  -name <column-name>
  -datamask <mask-name> 
REST
http[s]://<host>:<port>/rest/table/cf/column/datamask/set?<parameters>

Parameters

Parameter

Description

path

The path to the HPE Ezmeral Data Fabric Database table.

  • For a path on the local cluster, start the path at the volume mount point. For example, for a table named test under a volume with a mount point at /volume1, specify the following path: /volume1/test
  • For a path on a remote cluster, you must also specify the cluster name in the path. For example, for a table named customer under volume1 in the sanfrancisco cluster, specify the following path:/mapr/sanfrancisco/volume1/customer
cfname The name of the column family of the JSON table field to which the data mask will be added.
name The JSON table field.

datamask

The name of the data mask. This must be one of the predefined data masks. At most one dynamic data mask can be set for a specific column at a time. Obtain supported mask names using the maprcli security datamask list command.
NOTE
Using an empty string for a datamask removes all datamasks from the column family. For example:
maprcli table cf column datamask set -path /mytable -cfname default -nam
e a -datamask ""

Example

CLI
maprcli table cf column datamask set -path /table1 -cfname default \
 -name Creditcard -datamask mrddm_last4 
REST
curl -X POST \
  'https://r1n1.sj.us:8443/rest/table/cf/column/datamask/set?path=/table1 \
  &cfname=default&name=Creditcard&datamask=mrddm_last4' -u <username>:<password>