table cf list

Lists the column families for a MapR table.

Permissions Required

To run this command, your user ID must have the following permissions:

  • readAce on the volume
  • lookupdir on directories in the path
  • adminaccessperm on the table
NOTE The mapr user is not treated as a superuser. MapR 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>]
  
REST
curl -k -X GET \
  'http[s]://<host>:<port>/rest/table/cf/list? \
   path=<path>&cfname=<name>' \
  -u <username>:<password>

Parameters

Parameter

Description

path

The path to the table.

  • For a path on the local cluster, start the path at the volume mount point. For example, for a table named test under volume1 which has 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 test under volume1 in the sanfrancisco cluster, specify the following path:/mapr/sanfrancisco/volume1/customer
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 defaultreadperm for the table.

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:
{
     "_id" : "ID",
     "a" :
          {
               "b" : "value",
               "c" : "value"
          }
}
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 defaultwriteperm for the table.

Example

This example lists all column families for the table newtable.

CLI
maprcli table cf list -path /my.cluster.com/volume1/newtable 
REST
curl -k -X GET \
  'https://r1n1.sj.us:8443/rest/table/cf/list?path=%2Fmy.cluster.com%2Fvolume1%2Fnewtable' \
  -u mapr:mapr

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