KeplerGrid guide

Convert a MongoDB BSON dump to JSON Lines

Decode a MongoDB BSON file with bsondump, import its Extended JSON in KeplerGrid, and verify the original BSON types.

Decode one collection’s BSON file

Use bsondump from MongoDB Database Tools to convert a collection’s .bson file. The path below matches the fixture in the dump and export walkthrough. If your dump is an archive, use the archive restore workflow in MongoDB Database Tools.

bsondump --outFile=./decoded-orders.jsonl   ./practice-dump/keplergrid_transfer/orders.bson

For the practice order, the JSON line includes $oid for _id and $numberDecimal for total. Treat the resulting file as sensitive if the original contained real data.

Import into an empty practice collection

Create keplergrid_bson.orders on your practice instance. In KeplerGrid, right-click the destination, choose Import documents…, select decoded-orders.jsonl, and review the import before starting. Then open the document and inspect its fields.

For this fixture the import adds one row. Collection indexes and other dump metadata travel through the backup and restore workflow described above.

Verify the imported BSON types

In mongosh, verify that the imported identifier, date and total kept their types.

const orders = db.getSiblingDB("keplergrid_bson").orders;
orders.aggregate([
  { $project: {
    _id: 0,
    idType: { $type: "$_id" },
    dateType: { $type: "$orderedAt" },
    totalType: { $type: "$total" }
  } }
]).toArray();

Expected values are objectId, date and decimal.

KeplerGrid shows the imported practice order with a BSON date and Decimal128 total.
The imported collection contains the practice order with typed values.

Preserve BSON types when exporting · Import a JSON Lines file · MongoDB bsondump reference