dbshell replace


The dbshell replace command replaces a document in a JSON table. You can specify a condition with the command.


replace Options Description

*, --t, --table


Table path



ID of the document to replace

If the specified ID does not exist, the command inserts a new document with the values provided in the command.

Note: You can specify this parameter only once.

--v, --value


JSON document to insert or replace
--c, --where

OJAI condition, in JSON format

The condition must qualify to perform the replace. See OJAI Query Condition Syntax for a description of the syntax.


replace /tbl --id <id> --v {<document to replace>} [--c <condition>]


replace /tables/users --id user002 --value '{"first_name":"Jane", "last_name":"Doe"}'