table create

Creates a HPE Ezmeral Data Fabric Database binary or JSON table.

Permissions Required

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

NOTE
The 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

/opt/mapr/bin/maprcli table create
  -path <path> 
  [ -copymetafrom <path to source table> ]
  [ -copymetatype all|cfs|aces|splits|attrs ]
  [ -regionsizemb <region size in MB> ]
  [ -autosplit true|false ]
  [ -bulkload true|false ]
  [ -audit true|false ] 
  [ -tabletype <Table Type - json or binary> default: binary ]
  [ -packperm <Pack Permission settings> ]
  [ -bulkloadperm <Bulk load Permission settings> ]
  [ -splitmergeperm <Split and Merge Permission settings> ]
  [ -createrenamefamilyperm <Add/Rename Family Permission settings>]
  [ -deletefamilyperm <Delete Family Permission settings> ]
  [ -adminaccessperm <ACE Admin Permission settings> ]
  [ -replperm <Replication Admin Permission settings> ]
  [ -indexperm <ACE Admin Permission settings> ]
  [ -defaultversionperm <CF Versions Default Permission setting>]
  [ -defaultcompressionperm <CF Compression Default Permission setting> ]
  [ -defaultmemoryperm <CF Memory Default Permission setting>]
  [ -defaultreadperm <CF Read Default Permission setting> ]
  [ -defaultwriteperm <CF Write Default Permission setting> ]
  [ -defaulttraverseperm CF Traverse Default Permission ]
  [ -defaultappendperm <CF Append Default Permission setting>]
  [ -defaultunmaskedreadperm CF Unmasked Read Default Permission ]
  [ -metricsinterval <metric interval setting> ]
[ -securitypolicy <comma-delimited list of policies> ]
REST
curl -k -X POST 
  'http[s]://<host>:<port>/rest/table/create?path=<path>&<parameters>'
  -u <username>:<password>

Parameters

Parameter

Description

path

The path to the new 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
    NOTE
    You cannot use the following characters in the table name:
     < > ? % \
    To use the following characters in the table name, enclose them either in single or double quotes:
    ; | ( ) / 
    For example:
    maprcli table create -path "/設備^=#;{}&()/"  (or)
    maprcli table create -path '/設備^=#;{}&()/'
    To use either the ' or the " character in the table name, enclose:
    • the ' character within double quotes (")
    • the " character within single quote (')
    For example:
    maprcli table create -path "/'設備^=#;{}&()/"  (or)
    maprcli table create -path '/"設備^=#;{}&()/'
copymetafrom

The path to a table that contains the metadata that should be used to create the table.

  • For a path on the local cluster, start the path at the volume mount point. For example, if you want to copymetadata from 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, if you want to copymetadata from a table named test under volume1 in the sanfrancisco cluster, specify the following path: /mapr/sanfrancisco/volume1/customer
copymetatype

The type of metadata to copy from the table identified in the copymetafrom parameter. You can specify one or more of the following options in a comma separated list:

  • all. Copy all metadata. This is the default.
  • cfs. Copy column family metadata.
  • aces. Copy ACE permissions.
  • splits. Copy split keys.
  • attrs. Copy table attributes.
regionsizemb

The average size of the regions into which HPE Ezmeral Data Fabric Database tries to split the table as the table grows. The default is 4096 MB. This value is ignored if autosplit is set to false.

If autosplit is set to true, HPE Ezmeral Data Fabric Database splits a region when the size of the region exceeds 150% of the average value. For example, if the average value is 4096 MB, HPE Ezmeral Data Fabric Database splits a region that is larger than 6144 MB.

Although splits are automatic, merges are not. For example, if the value of regionsizemb is changed from 8 GB to 4 GB, all regions that are eligible are split automatically, if autosplit is set to true. However, if the value of regionsizemb is changed from 2 GB to 4 GB, regions smaller than 4 GB are not automatically merged.

NOTE
When a table has less than 4 regions, HPE Ezmeral Data Fabric Database ignores the regionsizemb parameter and splits regions at a lower threshold.
autosplit

A Boolean value that specifies whether to split the table into regions automatically as the table grows. The average size of each region is determined by the regionsizemb parameter.

The default value is true. If you set the value to false, you can manually split tables into regions by using the table region split command.

bulkload

A Boolean value that specifies whether to allow a full bulk load of the table. The default is false. For more information, see Loading Data into Binary Tables and Loading Documents into JSON Tables.

audit Specifies whether to turn auditing on for the table. If auditing is also enabled at the cluster level with the maprcli audit data command and enabled for the current volume, setting this value to true causes auditing to start for the table.
tabletype Specifies whether the table will be a binary table or a JSON table. The values are binary and json. The default is binary.
packperm The Access Control Expression (ACE) that controls who can pack table regions. By default, permission is given to the user ID that is used to create the table.
bulkloadperm The ACE that controls who can load this table with bulk loads if the table was created with bulk load support. By default, permission is given to the user ID that is used to create the table.
splitmergeperm

The ACE that controls who can take the following actions:

  • Run the table region split and table region merge commands to split the table into regions or to merge regions of the table together.
  • Change the value of regionsizemb.

By default, permission is given to the user ID that is used to create the table.

createrenamefamilyperm The ACE that controls who can create column families for this table or rename existing column families. By default, permission is given to the user ID that is used to create the table.
deletefamilyperm The ACE that defines access to delete column families for this table. Delimit the expression with single-quotation marks. By default, permission is given to the user ID that is used to create the table.
adminaccessperm The ACE that controls who can view and edit the permissions for this table. By default, permission is given to the user ID that is used to create the table.
replperm The ACE that controls who can set up replication either to or from a table. By default, permission is given to the user ID that is used to create the table
indexperm The secondary index Admin permissions setting that controls who can create an index associated with this table. By default, permission is given to the user ID that is used to create the table.

defaultversionperm

The default ACE for the version permission on new column families that are created in this table. If no value is specified, the default is u:<username of the table creator>. This value of the parameter versionperm in the table cf create and table cf edit commands overrides this value.
NOTE
This permission is not applicable to JSON tables. Versioning is not supported for JSON documents.
defaultcompressionperm Applies to binary tables only: The default ACE for the compression permission on new column families that are created in this table. If no value is specified, the default is u:<username of the table creator>. This value of the parameter compressionperm in the table cf create and table cf edit commands overrides this value.

defaultmemoryperm

The default ACE for the memory permission on new column families that are created in this table. If no value is specified, the default is u:<username of the table creator>. This value of the parameter memoryperm in the table cf create and table cf edit commands overrides this value.

defaultreadperm The default ACE for the read permission on new column families that are created in this table. If no value is specified, the default is u:<username of the table creator>. This value of the parameter readperm in the table cf create and table cf edit commands overrides this value. See table cf create and table cf edit
defaultwriteperm The default ACE for the write permission on new column families that are created in this table. If no value is specified, the default is u:<username of the table creator>. This value of the parameter writeperm in the table cf create and table cf edit commands overrides this value. See table cf create and table cf edit
defaulttraverseperm Applies to JSON tables only: The default Access Control Expression for the traverse permission on new column families. For more information about this permission, see Permission Types for Fields and Column Families in JSON Tables.
defaultappendperm Applies to binary tables only: The default ACE for the append permission on new column families that are created in this table. If no value is specified, the default is u:<username of the table creator>. This value of the parameter appendperm in the table cf create and table cf edit commands overrides this value.
defaultunmaskedreadperm The defaultunmaskedreadperm permission on table creation is set to the table creator. This setting takes effect for all new column families (and therefore also all columns/fields within all column families) unless otherwise overridden by the maprcli table cf or the maprcli table cf colperm command. This permission allows the user to read the data unmasked. Users without this permission have the masked data returned.
metricsinterval

The metrics collection interval, in seconds, for the table.

Possible values: 10, 60, 600

Default: 60 seconds

When configured to 10 seconds, under normal workloads, the metrics are available in OpenTSDB in about 30 seconds. At an interval of 60 seconds, the metrics are available in about 90 seconds.

NOTE
You cannot disable metrics collection for a table by setting the interval to 0.
securitypolicy The security policy or policies that apply to the table. If the parameter is not specified during table creation, the default value is uninitialized ("[-]"), and there is no security policy for the table.

Example

Creates a HPE Ezmeral Data Fabric Database table named newtable in volume1:

CLI

/opt/mapr/bin/maprcli table create -path /volume1/newtable

REST

curl -k -X POST \
  'https://r1n1.sj.us:8443/rest/table/create?path=%2Fvolume1%2Fnewtable' \
  -u mapr:mapr