Write a query to insert bulk data to MongoDB.

devquora
devquora

Posted On: Feb 22, 2018

 

query:

var huge= db.IoTCollection.initializeUnorderedBulkOp();

huge.insert({location:”India”, count:456, polls:456});

huge.insert({location:”Russia:, count:567, polls:567});

huge.insert({location:”China”, count:789, polls:789});

huge.insert({location:”USA”, count:123, polls:123});

huge.execute()

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    IoT Interview Questions

    What do you you understand by IoT ?

    IoT is an abbreviated form of 'Internet Of Things'. It is all about the connectivity of day to day gadgets and devices to the internet such that those gadgets and objects can communicate with each oth...

    IoT Interview Questions

    How will the Internet Of Things (IoT) impact our lives? Explain with example.

    When objects will be capable of communicating with each other, they will help in making our lives simpler and smarter. It will save our time by allowing devices to be automated. Taking an example, whe...

    IoT Interview Questions

    Explain the main components of the system of IoT ?

    There are three major components of IoT systems : 1)-Sensors Devices 2)-Connectivity 3)-Data Processing Sensors: Sensors have the crucial task of collecting very tiny data in its range. The data c...