Introduction
This article will show examples of inserting, updating, and deleting data in MongoDB using SSIS.
Prerequisites
- SSIS PowerPack: Download and install the ZappySys SSIS PowerPack from this site.
- MongoDB database
Steps
-
Add an SSIS MongoDB ExecuteSQL Task: Drag and drop a SSIS MongoDB ExecuteSQL Task task into your SSIS package.
-
Create a MongoDB Connection:
- Set up the host, username, password, and database.
- Check the other tabs for additional configuration options.
- Test the connection to ensure it is working.
-
Check Our Examples: You can check our examples for some commands for MongoDB.
-
Insert One or More Rows: For this example, we will use this command to insert one row into our collection, then press Test/Preview to see the result.
-
Update One or More Rows: We will update the inserted row. We will select the fields we want to modify and the ID from the collection.
-
Remove One or More Rows: Now, we will use the delete command and a conditional for the ID. You can use another condition, like Company Name or other fields.
-
Use MongoDB Destination: Inside our MongoDB destination, we have these options so you can use them with a source table. You can check our example here with an SQL server source table.
Video Tutorial
Watch a detailed video tutorial on this process:
Conclusion
This tutorial shows examples of inserting, updating, and deleting in MongoDB. If any issues arise, please get in touch with our support via chat on our website.