Listing JSON Tables

This topic describes how to list the JSON tables by using either the HPE Ezmeral Data Fabric Database JSON Client API or HPE Ezmeral Data Fabric 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 HPE Ezmeral Data Fabric 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)) {
            System.out.println(tablePath);
        }
    }
}
NOTE The parameter parentFolder provides a path to a folder that is in the MapR filesystem. See "Table Paths" in HPE Ezmeral Data Fabric Database JSON Tables for examples.
# mapr dbshell
maprdb root:> list /demo
/demo/user
/demo/checkin
/demo/review
/demo/business
/demo/tip
5 table(s) found.

See dbshell list for further details.