Creating a New Table
Explains how to create both binary tables and JSON tables using either the Control System, the CLI, or the REST API.
About this task
Different methods can be used to create HPE Ezmeral Data Fabric Database tables, such as maprcli, hbase shell, mapr dbshell commands, and the Control System. The following procedures describe how to create tables using these methods.
Creating a Table Using the Control System
Procedure
-
Log into the Control System using your login credentials. The Control
System Overview page appears.
NOTEThis option is not available on the Kubernetes version of the Control System.
- Click Tables page appears. from the top of the page. The
- Click Create Table. The Create New Table page appears.
-
From the Properties pane of the Create
New Table page, choose the table type:
- JSONNOTEYou must select JSON for the table type to enable dynamic data masking.
- Binary
- JSON
-
Specify values for fields displayed under Properties
pane of the Create New Table page, as
appropriate:
-
(Optional) Configure the following Security
settings:
-
For the Enable Auditing field, either enable
(Yes) or disable (No)
auditing to audit table operations.
If auditing is enabled at the cluster and volume levels, it causes auditing to start for the table operations.
-
Define Default Data Access Control for Column Family
settings:
- Optionally, repeat the above step to add another user type, as needed. Otherwise, proceed to the next step.
-
Do one of the following to specify settings under the Table
Administration Control pane of the Create New
Table page:
- Click Basic under the Table
Administration Control pane, select
Public (to grant access to all users) or
User, Group, or
Role. Then, enter a name for the current
permission set in the Name field, and apply
table permissions as described in the table below.
Permission Permission Description Administration Can view and edit the permissions for the table. Force Pack Can pack table regions. Split Merge Can take the following actions: - Split the table into regions or merge regions of the table together.
- Change the size of the region.
Index Can create index for this table. Bulkload Can load this table with bulk loads if the table was created with bulk load support. Replication Access Can set up replication either to or from a table. Create/Rename Column Family Can create column families for this table or rename existing column families. Delete Column Family Can delete column families associated with the table. Permission Permission Description Administration Can view and edit the permissions for the table. Force Pack Can pack table regions. Split Merge Can take the following actions: - Split the table into regions or merge regions of the table together.
- Change the size of the region.
Bulkload Can load this table with bulk loads if the table was created with bulk load support. Replication Access Can set up replication either to or from a table. Create/Rename Column Family Can create column families for this table or rename existing column families. Delete Column Family Can delete column families associated with the table. - Click Advanced, and then apply user
permissions.
Specify public (
p
) or user (u
), group (g
), and/or role (r
) who have or do not have the type of access using the following boolean expressions and subexpressions:!
— Negation operator.&
— AND operation.|
— OR operation.
()
, parentheses, for subexpressions.NOTEYou cannot specify user, group, or role individually if access is granted to all users (public).Alternatively, click associated with the type of access to use the selected Access Control Expression window to define access for public or users, groups, and/or roles.
NOTEIf you switch from Basic to Advanced, the basic settings, if any, are carried over to the advanced settings. If you switch from Advanced to Basic, all the settings are lost because the subexpressions and AND (&
) and negation (!
) operations that are supported by advanced settings are not supported in the basic settings.
- Click Basic under the Table
Administration Control pane, select
Public (to grant access to all users) or
User, Group, or
Role. Then, enter a name for the current
permission set in the Name field, and apply
table permissions as described in the table below.
- Optionally, click Add Another from the Table Administration Control pane of the Create New Table page, and repeat the above step to assign security permissions for another user type. Otherwise, proceed to the next step.
- Review and update your selections, as needed.
- Click Create Table at the bottom of the Create New Table page to create the table.
- Opt to do the following:
Creating a Table Using the CLI or the REST API
About this task
maprcli table create -path <path>
-tabletype
parameter and set it to
json
:maprcli table create -path <path> -tabletype json
The
-tabletype
parameter is set to binary
by default.- Binary table:
curl -X POST 'https://<hostname>:8443/rest/table/create?path=<path>' --user <username>:<password>
- JSON table:
curl -X POST 'https://<hostname>:8443/rest/table/create?path=<path>&tabletype=json' --user <username>:<password>
The format of the value of the -path
parameter depends on whether you
are creating a table on a local cluster or a remote cluster:
- 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
undervolume1
in thesanfrancisco
cluster, specify the following path:/mapr/sanfrancisco/volume1/customer
To use the following characters in the table name, enclose them either in single or double quotes:NOTEYou cannot use the following characters in the table name:< > ? % \
For example:; | ( ) /
maprcli table create -path "/設備^=#;{}&()/" (or) maprcli table create -path '/設備^=#;{}&()/'
To use either the ' or the " character in the table name, enclose:For example:- the ' character within double quotes (")
- the " character within single quote (')
maprcli table create -path "/'設備^=#;{}&()/" (or) maprcli table create -path '/"設備^=#;{}&()/'
If you create a table, you can set a number of properties. Refer to the
table create
command..
Creating Tables Using shell Command
About this task
The HPE Ezmeral Data Fabric Database shell command is used on JSON tables only. To run this command, execute the following:
mapr dbshell
After starting the shell, run the create
command.
The HBase shell command is used on binary tables only. To run this command, execute the following:
hbase shell
After starting the HBase shell, run the create
command. Type help
to see a list of commands and
their syntax.