table cf list
Lists the column families for a HPE Ezmeral Data Fabric table.
Permissions Required
To run this command, your user ID must have the following permissions:
mapr
user is not treated as a superuser.
HPE Ezmeral Data Fabric Database does not allow the mapr
user to
run this command unless that user is given the relevant permission or permissions with
access-control expressions.Syntax
- CLI
-
maprcli table cf list -path <path> [ -cfname <name>] [ -showcol [true|false]]
- REST
-
curl -k -X GET \ 'http[s]://<host>:<port>/rest/table/cf/list? \ path=<path>&cfname=<name>&showcol=[true|false]' \ -u <username>:<password>
Parameters
Parameter |
Description |
---|---|
path |
The path to the table.
|
cfname |
The name of the column family. |
showcol | Set to false by default. If set to
true , then all column-level attributes for this column
family are displayed. |
Output Fields
Verbose Field Name |
Terse Field Name |
Field Value |
---|---|---|
inmemory |
inmem |
Whether or not this column value resides in memory |
cfname |
n |
The column family name |
maxversions |
vmax |
Maximum number of versions for this column family |
minversions |
vmin |
Minimum number of versions for this column family |
compression |
comp |
Compression scheme used for this column family |
ttl |
ttl |
Time to live for this column family |
compressionperm | pcomp | Applies to binary tables only:
Access Control Expression (ACE) for
changing the value of the compression parameter. By
default, permission is given to the value of
defaultcompressionperm for the table. |
memoryperm | pmem | ACE for
changing the value of the inmemory parameter. Use single
quotation marks around the ACE. By default, permission
is given to the value of defaultmemoryperm for the
table. |
readperm | pread |
The ACE for column reads. Use single quotation marks around the ACE. Reads require permission both at the column-family level and at the column level (for binary tables) or field level (for JSON tables). In JSON tables, this permission is inherited by fields within the column family. By default, permission is given to the value of
|
traverseperm | ptraverse | Applies to JSON tables only: The Access Control
Expressions that specifies who has permission to pass over fields in JSON
documents. For example, suppose that a JSON table contains documents of this
general structure:
Suppose
further that the user sjohnson has read permission on
a.b , but not on a . For sjohnson to
read a.b , the user needs the traverse permission on
a . The user can then pass over field a to
a.b . This permission is inherited by fields within the column family. By default, this permission is given to the value of defaulttraverseperm for the JSON table. |
writeperm | pwrite |
The ACE for column writes (puts and deletes). Use single quotation marks around the ACE. Writes require permission both at the column-family level and at the column level (for binary tables) or field level (for JSON tables). In JSON tables, this permission is inherited by fields within the column family. By default, permission is given to the value of
|
unmaskedreadperm | punmasked | The unmaskedreadperm permission, when applied to a
column of a JSON table with a dynamic data
mask set, allows the user to read the data unmasked. Users without
this permission have the masked data returned. Default
|
Example
This example lists all column families for the table newtable
.
- CLI
-
maprcli table cf list -path /my.cluster.com/volume1/newtable
- REST
-
curl -X GET \ 'https://r1n1.sj.us:8443/rest/table/cf/list?path=%2Fmy.cluster.com%2Fvolume1%2Fnewtable' \ -u <username>:<password>
Example Output
[user@node]# maprcli table cf list -path /mapr/default/user/user/newtable
comp inmem vmax n ttl vmin
lz4 false 3 dine 2147483647 0
lz4 false 3 nahashchid 2147483647 0
lz4 false 3 wollachee 2147483647 0
This example shows the security policies for the default
column family
of the JSON table, jtable
.
- CLI
-
maprcli table cf list -path /my.cluster.com/volume1/jtable -cfname default -json
- REST
-
curl -X GET \ 'https://r1n1.sj.us:8443/rest/table/cf/list?path=%2Fmy.cluster.com%2Fvolume1%2Fjtable' &cfname=default \ -u <username>:<password>
Example Output
{
"timestamp":1539674179277,
"timeofday":"2018-10-16 12:16:19.277 GMT-0700 AM",
"status":"OK",
"total":1,
"data":[
{
"cfname":"default",
"maxversions":1,
"minversions":0,
"ttl":2147483647,
"inmemory":false,
"compression":"lz4",
"securitypolicy":"[Lab_Security_Policy,Sensitive_Data]",
"compressionperm":"u:root",
"memoryperm":"u:root",
"readperm":"u:root",
"traverseperm":"u:root",
"writeperm":"u:root",
"unmaskedreadperm":"u:mapr",
}
]
}
In the following example, only user mapr
can read column
Creditcard
from the default CF of table /table1
unmasked. User user1
can read the Creditcard
column, but it will be masked: .
- CLI
-
maprcli table cf list -path /table1 -cfname default -json -showcol true
- REST
-
curl -X GET \ 'https://r1n1.sj.us:8443/rest/table/cf/list?path=%2Ftable1&cfname=default \ &showcol=true' -u <username>:<password>