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)) {
To delete a table in the Node.js OJAI client, call the Connection.deleteStore() method:
    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.

To delete a table in the C# OJAI client, call the connection.DeleteStore(string storePath) method:
connection.DeleteStore(string storePath);
To delete a table in the Go OJAI client, call the connection.DeleteStore() function:
err := connection.DeleteStore("/store_path")

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.