Editing Tables
Explains how to edit binary and JSON tables using either the Control System, the CLI, or the REST API.
About this task
You can use the Control System, the CLI, or the REST API to edit the attributes of a HPE Data Fabric Database binary or JSON table. You can also use the HBase shell to edit a binary table. To edit a table, you must have the following permissions:
readAceandwriteAceon the volumelookupdiron directories in the pathadminaccesspermon the table
Editing Tables 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 Data > Tables from the top of the page. The Tables page appears.
- Select the table needing to be edited (under the Recently Viewed Tables pane or in the bottom pane) or enter the path to the needed table in the available field, and then click Edit Table to display the Edit Table page.
-
Make changes to the following Properties, where
necessary:
Property Property Description Metrics Interval Select 10 sec, 1 min or 10 min to update the interval of time for logging metrics. Auto Split Enable (Yes) or disable (No) auto-splitting of table. If enabled, the table is split automatically into regions as the table grows. If disabled, the table can be split manually into regions. By default, this is enabled. Bulkload Enable (Yes) or disable (No) full bulk load of the table. -
Define Default Data Access Control for Column Family
settings:
-
Select either Basic or
Advanced:
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.- If you select Basic from the
Security pane of the
Create New Table page, then
select a user type, enter a name in the
Name field, and check associated
permissions for the settings, as needed. NOTEYou cannot specify User, Group, or Role individually if access is granted to all users (Public).
Selected permissions become the default table permissions after creating column families under this table and are displayed under the DEFAULT DATA ACCESS CONTROL FOR COLUMN FAMILIES pane of the Create New Table page.
- JSON Table Security Permission Options
- Binary Table Security Permission Options
Permission Permission Description Read Data Can do column reads. Reads require permission both at the column-family level and at the field level. This permission is inherited by fields within the column family. Write Data Can do column writes. Writes require permission both at the column-family level and at the field level. This permission is inherited by fields within the column family. Traverse Data Can 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{ "_id" : "ID", "a" : { "b" : "value", "c" : "value" } }a.b, but not ona. For sjohnson to reada.b, the user needs the traverse permission ona. The user can then pass over fieldatoa.b. This permission is inherited by fields within the column family.Set Compression Can set or change the compression setting for the column family. Unmasked Data Leaving the Unmask Data checkbox unchecked hides table column family data from the selected user. Checking the box allows the selected user to see all table data, based on and in coordination with other security and data access settings. Permission Permission Description Read Data Can do column reads. Reads require permission both at the column-family level and at the field level. This permission is inherited by fields within the column family. Write Data Can do column writes. Writes require permission both at the column-family level and at the field level. This permission is inherited by fields within the column family. Append Data Can do column appends. Column appends require permission both at the column-family level and at the column level. Set Version Can set or change the maximum and minimum number of versions of column values to keep. Set Compression Can set or change the compression setting for the column family. - If you select Advanced from the
Security pane of the
Create New Table page, then
specify public (
p) or user (u), group (g), and/or role (r) and indicate, if required, user access options with 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).NOTEBy default, all table permissions are given to the user creating the table.Alternatively, click
associated with the type of access to use the selected
Access Control Expression
window to define access for
Public or
User,
Group, and/or
Role.
- If you select Basic from the
Security pane of the
Create New Table page, then
select a user type, enter a name in the
Name field, and check associated
permissions for the settings, as needed.
-
Opt to:
- Create a copy of permission settings for a listed public,
user, group, or role type by clicking
,
which you can then modify. - Delete permission settings for a listed public, user, group,
or role type by clicking
.
- Create a copy of permission settings for a listed public,
user, group, or role type by clicking
-
Select either Basic or
Advanced:
-
Make changes as needed to Table Administration
Control settings:
-
Modify the list of users, groups, and/or roles that have and/or do
not have the following types of administration permissions on the
table, as applicable:
- JSON Table
- Binary Table
Field Field Description Admin Can view and edit the permissions for the table. Index Can create an index 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. Field Field Description Admin 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. -
Opt to:
- Grant access to a new user, group, or role by clicking Add Another, selecting the Type entity, entering the Name entity, and selecting the permissions to grant the entity.
- Create a copy of permission settings for a listed public,
user, group, or role type by clicking
. You can then modify the copied
settings, if necessary. - Delete permission settings for a listed public, user, group,
or role type by clicking
.
-
Modify the list of users, groups, and/or roles that have and/or do
not have the following types of administration permissions on the
table, as applicable:
- Click Save Changes for the changes to take effect.
Editing Tables Using the CLI or the REST API
About this task
- CLI
- REST
maprcli table edit -path <path>curl -k -X POST 'https://<hostname>:8443/rest/table/edit?path=<path>' --user <username>:<pwd>- For a path on the local cluster, start the path at the volume mount point. For
example, for a table named
testunder 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
customerundervolume1in thesanfranciscocluster, specify the following path:/mapr/sanfrancisco/volume1/customerTo 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 '/"設備^=#;{}&()/'
When you edit a table, you can change a number of properties including:
- Enable or disable auditing, autosplitting, and bulkloading
- Set permissions on table
- Set permissions for default column families
For full reference for this command, see the table edit
command.
Editing Binary Tables Using HBase Shell
About this task
After starting the HBase shell, run the alter command. Type
help to see a list of commands and their syntax.