项目作者: aofdev

项目描述 :
Insert JSON file to mongo and a support parsing field DateTime insert field type date in MongoDB.
高级语言: Python
项目地址: git://github.com/aofdev/insert-jsonfile-to-mongodb.git
创建时间: 2020-12-30T08:35:52Z
项目社区:https://github.com/aofdev/insert-jsonfile-to-mongodb

开源协议:

下载


insert-jsonfile-to-mongodb

A support parsing field DateTime insert field type date in MongoDB.

Argument Description
mongo_uri a URI which can be used to connect a Mongo. example mongodb://root:root!@localhost:27017/
mongo_db Mongo Database example testdb
mongo_collection Mongo Collection example test_collection
jsonfile a path json file

Example

  1. docker run --rm -it -v $(pwd):/tmp aofdev/insert-jsonfile-to-mongodb:latest bash -c "python main.py --mongo_uri='mongodb://root:!@localhost:27017/?authSource=admin' --mongo_db='testdb' --mongo_collection='test_collection' --jsonfile='/tmp/example/test_data.json'"