Deleting JSON Tables

This topic describes how to delete MapR-DB JSON tables using either programmatic APIs or dbshell.

To delete a table in the Java OJAI client, call an Admin object's deleteTable() method and pass, as an argument, the path of the table to delete:

public void deleteTable(String tablePath) throws DBException {
    try (Admin admin = MapRDB.newAdmin()) {
        if (admin.tableExists(tablePath)) {
# mapr dbshell
maprdb root:> drop <table path>

See dbshell drop for additional details.

Permissions Required

You must have both the readAce and writeAce permissions on the volumes where the JSON tables are located to delete it. For information about how to set permissions on volumes, see Setting Whole Volume ACEs.