Skip to content

Commit

Permalink
fixup! MongoDB: Improve timestamp parsing by using python-dateutil
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 8, 2024
1 parent 9a264ab commit 10d4c3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cratedb_toolkit/io/mongodb/export.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def collection_to_json(collection: pymongo.collection.Collection, file: t.IO[t.A
a file-like object (stream); defaults to the current sys.stdout.
"""
file = file or sys.stdout.buffer
for document in collection.find().limit(10):
for document in collection.find():
bson_json = bsonjs.dumps(document.raw)
json_object = json.loads(bson_json)
file.write(json.dumps(convert(json_object)))
Expand Down

0 comments on commit 10d4c3d

Please sign in to comment.