Using the mapr dbshell Utility

This section assumes that you performed the following tasks described earlier in this document:

  • Downloaded the MapR 5.1 Sandbox.
  • Installed the VM.
  • Connected to the MapR host using a terminal.
Assuming you are connected to your MapR host using a terminal, you can run the following command to launch the shell:
mapr dbshell

You can list all the commands of the shell by using help. Use the shell as shown in the following examples.

Create a table:
create /apps/my_users
Add a new document in the table:
insert /apps/my_users --id "001" --value '{"first_name":"John", "last_name":"Doe", "age" : 34 }'
Get one document by ID:
findbyid /apps/my_users --id 001
Get all documents:
find /apps/my_users
Delete a document:
delete /apps/my_users --id "001"
Drop a table:
drop /apps/my_users