Listing JSON Tables

This topic describes how to list the JSON tables by using either the MapR Database JSON Client API or MapR Database Shell.

Permission Required

The readAce permission on the volumes where the JSON tables are located. Setting Whole Volume ACEs

The table is listed by calling MapR Database JSON Client API Admin object's listTables() method and passing, as an argument, the path of the folder.

Use a conditional loop to iterate through the returned list and retrieve the names of the tables.

public void listTables(String parentFolder) throws DBException {
    try (Admin admin = MapRDB.newAdmin()) {
        for(Path tablePath : admin.listTables(parentFolder)) {
Note: The parameter parentFolder provides a path to a folder that is in the MapR file system. See "Table Paths" in MapR Database JSON Tables for examples.
# mapr dbshell
maprdb root:> list /demo
5 table(s) found.

See dbshell list for further details.