Copy and paste

Copy values, fields, paths and whole documents in several formats, paste documents into a collection, and copy collections between servers.

Right-click a cell in Table View or a node in Tree View and open Copy. What you copy goes to the system clipboard, ready for a text editor, a spreadsheet, a script or another collection.

Copy values and fields

  1. Select one or more cells (click, Ctrl-click, Shift-click).
  2. Press the shortcut, or right-click > Copy and pick an entry:
EntryShortcutYou get (example on a customer)
Copy Value As TextCtrl+CThe value as displayed: Dana Brook
Copy ValueAlt+Shift+CThe typed value in shell syntax: NumberInt(3)
Copy FieldCtrl+Alt+CName and value: "name" : "Dana Brook"
Copy Field PathCtrl+Shift+Alt+CThe full dotted path: address.city
Copy Date (ObjectId values only)The creation date held in the ObjectId

With several cells selected, each row of the table becomes a line and cells are separated by tabs.

Copy whole documents

Right-click one or more selected documents > Copy:

EntryShortcutFormat
Copy Document / Copy Selected DocumentsShift+Ctrl+CShell syntax, lossless for every type. One document, or an array of them
Copy … as CSVA header line, then one row per document
Copy … as CSV (no headers)Rows only
Copy … for ExcelTab-separated rows that spreadsheet applications paste as cells, with a header line; hidden columns are left out
Copy … for Excel (no headers)Rows only

The entries read “Copy Document …” with one document and “Copy Selected Documents …” with several.

Paste documents into a collection

  1. Copy documents (from this application, a file or anywhere else) as shell syntax or Extended JSON: one document or an array.
  2. Open the target collection and press Ctrl+V in the result, or right-click > Paste Document(s)….
  3. Read the confirmation: it says how many documents will be pasted, into which collection, on which server.
  4. Confirm. The page reloads with the new documents.

Each document keeps its original _id. If a document with the same _id already exists, the pasted one gets a new ObjectId instead: pasting never overwrites an existing document.

Copy collections and databases

In the connection tree:

  1. Select a collection or a database and press Ctrl+C (Copy Collection / Copy Database), or right-click > Copy Collection / Copy Database. To copy every collection of a database instead, right-click it > Copy All Collections/Views/Buckets (no shortcut).
  2. Select the target database or connection, possibly on another server, and press Ctrl+V or right-click > Paste Collections.
  3. In the dialog, choose what to do when the target already exists. Pasting onto an existing collection appends by default and skips documents whose _id already exists; existing documents are overwritten only if you choose to overwrite them.

Copy Name (Ctrl+Alt+C) copies just the names of the selected nodes, one per line.

Tips

  • Copy Value is the right choice when you want to paste a value into a query: it keeps the type.
  • Copy Value As Text on a whole document in the JSON: Pure format warns you that types are lost.
  • For a large number of documents, use Export instead of the clipboard.

Troubleshooting

MessageWhat to do
The clipboard holds no documents to pasteThe clipboard text is not a document or an array of documents. Copy it again as JSON.
Paste is greyed out or refusedThe collection is locked with the padlock, the connection is read-only, or the tab shows a view.