<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>ssis connectors Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/ssis-connectors/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/ssis-connectors/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 14 Nov 2018 13:56:12 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>ssis connectors Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/ssis-connectors/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SSIS &#8211; Loading data into MongoDB (Upsert, Delete, Update)</title>
		<link>https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 26 Feb 2016 22:03:21 +0000</pubDate>
				<category><![CDATA[SSIS MongoDB Destination]]></category>
		<category><![CDATA[export json task]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis connectors]]></category>
		<category><![CDATA[SSIS Dummy Data Source]]></category>
		<category><![CDATA[SSIS Export JSON Task]]></category>
		<category><![CDATA[SSIS JSON Generator Transform]]></category>
		<category><![CDATA[SSIS MongoDB ExecuteSQL Task]]></category>
		<category><![CDATA[SSIS MongoDB Source]]></category>
		<category><![CDATA[ssis tasks]]></category>
		<category><![CDATA[upsert]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=374</guid>

					<description><![CDATA[<p>Introduction MongoDB is one of the most poplar NoSQL database out there. In this article you will learn how to use ZappySys MongoDB Destination Connector to perform various bulk operations on MongoDB such as Insert, Update, Delete and Upsert. If you wish to learn how to Update MongoDB Array items then check this blog post instread. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/">SSIS &#8211; Loading data into MongoDB (Upsert, Delete, Update)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img decoding="async" class="size-full wp-image-2115 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/08/mongodb-logo.png" alt="" width="88" height="88" />MongoDB is one of the most poplar <strong>NoSQL database</strong> out there. In this article you will learn how to use <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/">ZappySys MongoDB Destination Connector</a> to perform various bulk operations on MongoDB such as Insert, Update, Delete and Upsert. If you wish to learn <a href="//zappysys.com/blog/update-mongodb-array-items-using-ssis/" target="_blank" rel="noopener">how to Update MongoDB Array items then check this blog post instread</a>.</p>
<p>&nbsp;</p>
<h2>MongoDB data read/write Example SSIS Package</h2>
<p>Before we talk more about loading data into MongoDB lets look at screenshot and steps involved in our sample package for this tutorial. Below sample SSIS package uses 4 <strong>Custom SSIS Tasks</strong></p>
<ol>
<li><a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/">SSIS MongoDB Source Connector</a> (Used to read data from MongoDB Collection)</li>
<li><a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/">SSIS MongoDB Destination Connector</a> (Used to write data into MongoDB Collection also you can do other bulk operations such as MongoDB update, MongoDB upsert and MongoDB delete)</li>
<li><a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/">SSIS MongoDB ExecuteSQL Task</a> (Used to call any MongoDB Shell commands including MongoDB DDL or DML type operations such as CREATE/DROP, Insert, Update, Delete, Read, you can also call server side JavaScript)</li>
<li><a href="//zappysys.com/products/ssis-powerpack/dummy-data-source-free/">Dummy Data Source</a> (Used to generate sample JSON Documents which can be loaded in MongoDB)</li>
</ol>
<h2>MongoDB Examples</h2>
<p>Here is the list of various MongoDB examples included in attached sample package (see at the end for download links)</p>
<ul>
<li>MongoDB example &#8211; How to <em>read data from MongoDB</em> collection using SQL query language</li>
<li>MongoDB example &#8211; How to <em>load raw JSON document</em> into MongoDB Collection (<strong>Bulk Insert with Reload</strong>)</li>
<li>MongoDB example &#8211; How to do <em>MongoDB Upsert</em> (<strong>Bulk Update</strong> or Insert) for specific fields or entire document</li>
<li>MongoDB example &#8211; How to perform MongoDB Delete ( <strong>Bulk Delete</strong> based on Matching Rows)</li>
<li>MongoDB example &#8211; How to <strong>create new MongoDB collection</strong> (Only if not exist &#8211; Use safe option)</li>
<li>MongoDB example &#8211; How to fetch MongoDB collection <strong>record count</strong> and save to SSIS variable</li>
<li>MongoDB example &#8211; How to fetch MongoDB <strong>collection size</strong> and save to SSIS variable</li>
<li>MongoDB example &#8211; How to <strong>get collection names</strong> and loop through them using ForEach Loop Task</li>
<li>MongoDB example &#8211; How to <strong>save query output</strong> into Recordset variable and loop though records using ForEach Loop Task</li>
</ul>
<h2>Video Tutorial &#8211; Update/Delete/Write/Bulk Load data into MongoDB from SQL Server/ORACLE</h2>
<p>In below video tutorial you will see how easy it is to load data into MongoDB from any Datasource such as SQL Server, Oracle, MySQL, Flatfile etc. You will also learn how to product nested JSON from multiple tables using <a href="//zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a>. You can also use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> with Output as Document Mode to load raw JSON data.</p>
<div><a href="https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FFkQjUahzMJQ%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></div>
<h2>Video Tutorial &#8211; Read data from MongoDB</h2>
<p>In the following video tutorial you will learn how to consume data from MongoDB Collection using <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/" target="_blank" rel="noopener">SSIS MongoDB Source Connector</a>. You will notice that it uses <strong>SQL query syntax</strong> rather than MongoDB specific native query syntax (JSON query). This makes it super easy to query data without any learning curve. Data stored in MongoDB is in JSON document format but Data coming out from <strong>MongoDB Source Connector</strong> is Flat table structure (It de-normalize nested nodes). You can also Query inner Hierarchy using <strong>JSON Path expression</strong> (e.g. query Orders from Customer Document using <strong>$.Customer.Orders[*]</strong> ) .</p>
<div><a href="https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FksvCA8FxOzI%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></div>
<div id="attachment_388" style="width: 362px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-loading-data-into-mongodb-read-from-mongodb-upsert-delete-insert-example.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-388" class="size-full wp-image-388" src="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-loading-data-into-mongodb-read-from-mongodb-upsert-delete-insert-example.png" alt="SSIS Example - Loading data into MongoDB, Read from MongoDB, Upsert, Upsert, Delete Insert JSON Documents, Execute Shell Commands" width="352" height="482" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-loading-data-into-mongodb-read-from-mongodb-upsert-delete-insert-example.png 352w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-loading-data-into-mongodb-read-from-mongodb-upsert-delete-insert-example-219x300.png 219w" sizes="(max-width: 352px) 100vw, 352px" /></a><p id="caption-attachment-388" class="wp-caption-text">SSIS Example &#8211; Loading data into MongoDB, Read from MongoDB, Upsert, Upsert, Delete Insert JSON Documents, Execute Shell Commands</p></div>
<h2>MongoDB Insert &#8211; Bulk Loading data into MongoDB</h2>
<p>Using MongoDB Destination Connector you can easily Insert JSON documents in Bulk. There are two input modes for inserting records into MongoDB.</p>
<h3>Simple Mode &#8211; Loading data in simple mode (array not allowed)</h3>
<p>In simple loading mode you can map source columns to target column in MongoDB destination. If you Insert data using this mode then you cant load complex documents with array.</p>
<h3>Document Mode &#8211; Loading JSON documents into MongoDB</h3>
<p>In this mode you can insert/update/delete documents by mapping inbuilt __DOCUMENT__ input column which appears on mapping tab (Target columns). When you perform Insert you have two options (Insert (i.e. Append) and Reload (Truncate + Insert). When you select Operation=Reload in that case Collection is first Truncated and then new records are loaded.</p>
<p>In JSON document load mode if you don&#8217;t supply _id column part of your input JSON then new _id is automatically generated by MongoDB for newly inserted document.</p>
<div id="attachment_392" style="width: 589px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-load-json-documents-into-mongodb-collection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-392" class="size-full wp-image-392" src="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-load-json-documents-into-mongodb-collection.png" alt="Loading JSON Documents into MongoDB Collection (Map Raw Document Column)" width="579" height="669" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-load-json-documents-into-mongodb-collection.png 579w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-load-json-documents-into-mongodb-collection-260x300.png 260w" sizes="(max-width: 579px) 100vw, 579px" /></a><p id="caption-attachment-392" class="wp-caption-text">Loading JSON Documents into MongoDB Collection (Map Raw Document Column)</p></div>
<h3>Loading JSON files into MongoDB</h3>
<p>Another scenario could be loading JSON files into MongoDB. You can load JSON Files into MongoDB two ways.</p>
<ul>
<li>Use Flat File Source with just one column with DT_NTEXT datatype (use this method when you each JSON documents in one line and they are separated by new line as below screenshot)</li>
<li>Use <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON Source Connector</a> with Output as Document option checked. You can map __DOCUMENT__ source column to Target MongoDB collection as below. Advantage of this method is you extract JSON from array too and specify many other advanced options.
<div id="attachment_393" style="width: 733px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-extract-raw-json-documents-from-json-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-393" class="size-full wp-image-393" src="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-extract-raw-json-documents-from-json-file.png" alt="SSIS Extract JSON Documents or Sub Documents from JSON file or JSON Array" width="723" height="605" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-extract-raw-json-documents-from-json-file.png 723w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-extract-raw-json-documents-from-json-file-300x251.png 300w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-393" class="wp-caption-text">SSIS Extract JSON Documents or Sub Documents from JSON file or JSON Array</p></div></li>
</ul>
<h2>Specifying LoadOptions</h2>
<p><a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/">MongoDB Destination Connector</a> supports following <strong>LoadOptions</strong> property (see Component Properties Tab on UI) which controls how target data gets modified. <strong>LoadOptions</strong> property is ignored for <strong>Reload</strong> and <strong>Insert</strong> operations.</p>
<ul>
<li><strong>op</strong> : this option specify update operators (Valid for <strong>Update, Replace</strong> and <strong>Upsert</strong> operation (i.e. <strong>UpdateOrInsert</strong>) ).  See <a href="https://docs.mongodb.org/manual/reference/operator/update/" target="_blank" rel="noopener">this link</a> for more information on various Update operators available in MongoDB. Most common operators listed below. Refer official MongoDB <a href="https://docs.mongodb.org/manual/reference/operator/update/" target="_blank" rel="noopener">help</a> for more information.
<ul>
<li><strong>op=none</strong> : Replace entire document</li>
<li><strong>op=$set</strong>  : Update only those fields specified in mapping. If Specified mapping field not available in target then its added to target document.</li>
<li><strong>op=$push</strong> : Adds new item to destination array. See following examples (How to insert single or multiple documents into MongoDB Array by supplying JSON into  __DOCUMENT__ column<br />
<pre class="crayon-plain-tag">/* Insert single item into array - Construct input JSON as below */
{YourArrayField : 111 }

/* Insert multiple items into array - Construct document as below */
{YourArrayField : { $each: [ 111, 222, 333 ] } }

/* Insert multiple documents into array */
{YourArrayField : { $each: [ {OrderID:1, Total:20.00}, {OrderID:2, Total:12.00} ] } }</pre>
</li>
</ul>
</li>
<li><strong>multi</strong> : This option controls if you want to Update or Delete multiple records for matching condition for each upstream input record.  For example if you joining by Country and City columns for update and target system finds 5 records then by default they all will be updated if <strong>multi=true</strong> is set in <strong>LoadOptions</strong> property. If you don&#8217;t want to update multiple records</li>
</ul>
<h2>MongoDB Update</h2>
<p>MongoDB Destination Connector supports Batch Update and Batch Upsert Operations. There are few things to remember how Update operation works with MongoDB Destination Connector.</p>
<ul>
<li>To perform Update operation you have to specify Join Criteria for record lookup on target (see <strong>ColumnsForLookup</strong> property).</li>
<li>Specify JOIN columns in <strong>ColumnsForLookup</strong> property. Use comma to specify multiple columns (e.g. CustomerID,OrderID). If you dont specify columns in this property then any columns mapped other than __DOCUMENT__ will be considered as JOIN column.</li>
<li>With MongoDB destination you can only specify simple Update condition by mapping JOIN input columns. Behind the scene it will construct search query for update. For example if you Map 3 input columns (__DOCUMENT__ , Country, State) and you specify <strong>LoadOptions :</strong> <strong>op=$set;multi=true</strong> then its similar as below SQL Statement.<br />
<pre class="crayon-plain-tag">UPDATE MyCollection
SET [properties specified in __DOCUMENT__]
WHERE Country=[input value] AND State=[input value]</pre>
</li>
<li>Join columns can be individually mapped or can be supplied as part of JSON document mapped to __DOCUMENT__ column.</li>
<li>If __DOCUMENT__ column is not mapped then you must specify at least one column name in ColumnsForLookup property to identify search column.</li>
<li>If __DOCUMENT__ column is mapped and column name is not specified in <strong>ColumnsForLookup</strong> property then you must map at least one more input column which can treated as JOIN column</li>
</ul>
<h2>Update specific fields  ($set operator)</h2>
<p>To update specific fields in target MongoDB collection you can map JOIN column(s) and then map fields you want to update or map __DOCUMENT__ if you suppling JSON document with fields you want to update.</p>
<p>See below screenshot where its updating Customers record with new coordinates  based on City and Country information.</p>
<div id="attachment_397" style="width: 758px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-update-json-document-specified-fields-set-operator.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-397" class="size-full wp-image-397" src="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-update-json-document-specified-fields-set-operator.png" alt="SSIS MongoDB Update Bulk - $set update operator - Update specific fields - Update single or multiple documents" width="748" height="527" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-update-json-document-specified-fields-set-operator.png 748w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-update-json-document-specified-fields-set-operator-300x211.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></a><p id="caption-attachment-397" class="wp-caption-text">SSIS MongoDB Update Bulk &#8211; $set update operator &#8211; Update specific fields &#8211; Update single or multiple documents</p></div>
<h3>Update single or multiple target records for single input row</h3>
<p>If you want to update all matching records in target then set <strong>LoadOptions</strong> property to <strong>op=$set,multi=true</strong><br />
If you want to update only one record per matching criteria in target then set <strong>LoadOptions</strong> property to <strong>op=$set,multi=false</strong></p>
<h3>Update entire document (i.e. Overwrite/Replace documents)</h3>
<p>If you like to replace entire target document then you can do two ways. Few things you have to change for MongoDB Destination.</p>
<p><strong>Approach#1 </strong></p>
<ol>
<li>Select <strong>Operation</strong>=Replace (Rather than Update or Upsert)</li>
<li>Specify Join column in <strong>ColumnsForLookup</strong></li>
<li>On the mapping tab Map __DOCUMENT__ (Assuming you have Raw JSON coming from Upstream)</li>
</ol>
<p><strong>Approach#2</strong></p>
<p>Another approach is use $set operator in LoadOptions property then it will only update specified fields in mappings. But if you want to overwrite entire document (Replace document) then set <strong>LoadOptions</strong> property to <strong>op=none,multi=true</strong> or <strong>op=none,multi=false</strong> (If you want to update one record for matching condition)</p>
<h3>Insert single item into MongoDB Array using $push operator</h3>
<p>If you want to insert new items into array then set <strong>LoadOptions</strong> property to <strong>op=$push,multi=true</strong> or <strong>op=$push,multi=false</strong> (If you want to update one record for matching condition). You have to map __DOCUMENT__ column on target mappings tab to supply item(s) or document(s) you want to insert into target array.</p><pre class="crayon-plain-tag">/* Insert single number or string into MongoDB array - Construct input JSON as below */
{YourArrayField : 111 }

/* Insert single document into MongoDB array - Construct input JSON as below */
{YourArrayField : {OrderID:1, Total:20.00} }</pre><p>
<h3>Insert multiple items into MongoDB Array using $push operator along with $each</h3>
<p>Inserting multiple items into array requires use of <strong>$each</strong> modifier as below. Use above instructions except input document (e.g. data passed to __DOCUMENT__ column) will look like below (see how $each used).</p><pre class="crayon-plain-tag">/* Insert multiple items into MongoDB array - Construct document as below */
{YourArrayField : { $each: [ 111, 222, 333 ] } }

/* Insert multiple documents into MongoDB array */
{YourArrayField : { $each: [ {OrderID:1, Total:20.00}, {OrderID:2, Total:12.00} ] } }</pre><p>
<h3>Other MongoDB Update Operators</h3>
<p>So far we have seen <strong>$set</strong> and <strong>$push</strong> update operators. To learn more about other operators see <a href="https://docs.mongodb.org/manual/reference/operator/update/" target="_blank" rel="noopener">this link</a></p>
<h2>MongoDB Update Array Items ($pull, $push, $addToSet)</h2>
<p>If you wish to update items found inside nested array of document then <a href="//zappysys.com/blog/update-mongodb-array-items-using-ssis/" target="_blank" rel="noopener">Check this full length article</a></p>
<h2>MongoDB Upsert &#8211; Bulk Update or Insert JSON documents</h2>
<p>If you wish to perform Bulk Upsert using MongoDB Destination connector then select Upsert Action from dropdown (Action=UpdateOrInsert). In Upset if document is not found for matching criteria then new document is inserted in MongoDB Collection. If document is found then Update operation occurs. To set specific fields use <strong>op=$set</strong> in LoadOptions   and if you wish to overwrite entire document then use <strong>$op=none</strong> in <strong>LoadOptions </strong></p>
<div id="attachment_400" style="width: 488px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-upsert-json-document-update-or-insert-bulk.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-400" class="size-full wp-image-400" src="//zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-upsert-json-document-update-or-insert-bulk.png" alt="SSIS MongoDB Upsert - Bulk Update or Insert JSON documents" width="478" height="605" srcset="https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-upsert-json-document-update-or-insert-bulk.png 478w, https://zappysys.com/blog/wp-content/uploads/2016/02/ssis-mongodb-upsert-json-document-update-or-insert-bulk-237x300.png 237w" sizes="(max-width: 478px) 100vw, 478px" /></a><p id="caption-attachment-400" class="wp-caption-text">SSIS MongoDB Upsert &#8211; Bulk Update or Insert JSON documents</p></div>
<h2>MongoDB Delete &#8211; Bulk delete MongoDB JSON documents</h2>
<p>To delete documents from collection you can set operation=Delete on Component properties page. For delete you can simply map _id column on target or just supply columns based on you want to search records you want to delete.</p>
<p>To delete maximum one record for each input row set <strong>LoadOptions</strong> property to <strong>op=none,multi=false</strong> or set <strong>op=none,multi=false</strong> if you want to delete more than one record for matching condition.</p>
<h2>MongoDB Collection Reload &#8211; Remove All (Truncate collection)</h2>
<p>To reload collection set operation to Reload on Component properties page. <strong>Reload</strong> operation first clears target collection and perform <strong>bulk Insert</strong> operation</p>
<h2>Generate JSON for MongoDB data load</h2>
<p>Now lets talk about different ways to produce simple or complex JSON using ZappySys components.  There are 3 ways you can produce JSON which can be loaded into MongoDB Collection. Following section will describe each approach and you can select which one best suited for you.</p>
<h3>Generate JSON &#8211; Using Export JSON Task</h3>
<p>Export JSON Task can export JSON to File or variable which you can consume via <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON Source Connector</a> (Check Output as Document option) and supply to MongoDB Destination Connector (map to __DOCUMEN__).</p>
<p>Check this link for more info :  <a href="//zappysys.com/blog/export-json-from-sql-server-using-ssis/" target="_blank" rel="noopener">Export Json from sql server using ssis</a></p>
<h3>Generate JSON &#8211; Using JSON Generator Transform</h3>
<p>JSON generator transform is useful when you want to Produce JSON inside pipeline from single or multiple input.</p>
<p>Check this link for more info :  <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON generator Transform (Watch Video on this page)</a></p>
<div style="width: 600px" class="wp-caption alignnone"><img decoding="async" title="JSON Generator Transform - Generate JSON and Load into MongoDB" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-generator-transform/ssis-json-generator-load-documents-mongodb.png" alt="JSON Generator Transform - Test JSON Path Settings" width="590" /><p class="wp-caption-text">JSON Generator Transform &#8211; Generate JSON documents and load into MongoDB</p></div>
<h3>Generate JSON &#8211; Using Dummy Data Source (Fake JSON for Testing)</h3>
<p>If you need to produce JSON for testing purpose then use <a href="//zappysys.com/products/ssis-powerpack/dummy-data-source-free/" target="_blank" rel="noopener">Dummy Data Source</a> (Select JsonDocuments Template from dropdown and click ok)</p>
<h2>Query/Read data from MongoDB</h2>
<p>Visit following links to learn more about reading data from MongoDB.</p>
<p><a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/">SSIS MongoDB Source Homepage</a><br />
<a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/mongodb-source.htm#A_QueryLanguage">MongoDB SQL Query Reference</a><br />
<a href="//zappysys.com/blog/read-mongodb-data-from-array-extract-nested-sub-documents/">MongoDB data extract &#8211; from nested sub documents and array</a></p>
<h2>Execute MongoDB Shell commands in SSIS (e.g. Create/Drop collection)</h2>
<p>MongoDB SOurce and Destination Connectors are great for read/write data. But what if you want to issue ad-hoc MongoDB shell command such as create collection/drop collection ? No worry.. <a href="//zappysys.com/products/ssis-powerpack/">SSIS PowerPack v2.0</a> released new Task called <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/">SSIS MongoDB ExecuteSQL Task</a> This task comes with many examples listed on the UI itself (Look for Examples dropdown menu on UI). You can use <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/">SSIS MongoDB ExecuteSQL Task</a> to perform many operations such as</p>
<ul>
<li>Create/Drop MongoDB collections</li>
<li>Get collection list as ADO.net recordset so you can loop through using ForEachLoop task</li>
<li>Call serverside JavaScript</li>
<li>Fetch data as ADO.net recordset and store in SSIS variable so you can loop using ForEachLoop task</li>
<li>Drop database</li>
<li>Call many shell commands</li>
</ul>
<h2>Download MongoDB Example Files used in this tutorial</h2>
<p>To test this package you first need to <a href="//zappysys.com/products/ssis-powerpack/">download SSIS PowerPack</a><br />
Once SSIS PowerPack installed you can download following SSIS sample project file(s).</p>
<p><a title="MongoDB Examples - Loading data into MongoDB - SSIS 2008" href="//zappysys.com/downloads/files/ssis/MongoDB_Load_Demo_2008.zip">Download sample files &#8211; SSIS 2008</a><br />
<a title="MongoDB Examples - Loading data into MongoDB - SSIS 2012" href="//zappysys.com/downloads/files/ssis/MongoDB_Load_Demo_2012.zip">Download sample files &#8211; SSIS 2012</a><br />
<a title="MongoDB Examples - Loading data into MongoDB - SSIS 2014" href="//zappysys.com/downloads/files/ssis/MongoDB_Load_Demo_2014.zip">Download sample files &#8211; SSIS 2014</a><br />
<a title="MongoDB Examples - Loading data into MongoDB - SSIS 2016" href="//zappysys.com/downloads/files/ssis/MongoDB_Load_Demo_2016.zip">Download sample files &#8211; SSIS 2016</a></p>
<h2>Conclusion</h2>
<p>MongoDB makes it super easy to store <strong>JSON documents</strong> and gives you whole new way of manipulating documents with ease of use. ZappySys SSIS Connectors and Tasks for MongoDB makes it possible to implement various data integration scenarios with MongoDB. <a href="//zappysys.com/products/ssis-powerpack/">Click here to Download SSIS PowerPack</a> and try it your self.</p>
<p><b>Keywords:</b><br />
<em>Loading data into MongoDB</em> | <em>mongodb upsert array</em> | <em>mongodb upsert example</em> | <em>mongodb insert or update</em> | <em>mongo insert or update</em> | <em>mongo upsert</em> | <em>mongo insert JSON</em> | <em>mongo upsert JSON | update data into MongoDB</em></p>
<p>The post <a href="https://zappysys.com/blog/ssis-loading-data-into-mongodb-upsert-update-delete-insert/">SSIS &#8211; Loading data into MongoDB (Upsert, Delete, Update)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
