Deleting JSON Tables

This topic describes how to delete MapR Database 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)) {
            admin.deleteTable(tablePath);
        }
    }
}
To delete a table in the Node.js OJAI client, call the Connection.deleteStore() method:
connection.deleteStore(table_path)
    then((deleteResponse) => {
        // Process deleteReponse
        ... 
    });
To delete a table in the Python OJAI client, call the Connection.delete_store() method:
rc = connection.delete_store(store_path=table_path)
# 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.