<?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>BSON Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/bson/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/bson/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 22 Oct 2025 22:58:58 +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>BSON Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/bson/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to create MongoDB documents (JSON, BSON) for loading in SSIS</title>
		<link>https://zappysys.com/blog/create-mongodb-documents-ssis-json-bson-load-update-insert-upsert-collection/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 30 Aug 2016 15:07:22 +0000</pubDate>
				<category><![CDATA[SSIS JSON Generator Transform]]></category>
		<category><![CDATA[BSON]]></category>
		<category><![CDATA[ISODate]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS MongoDB Destination]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=742</guid>

					<description><![CDATA[<p>Introduction In our previous article, we discussed how to load data into MongoDB (Insert, Update, or Upsert Mode) with various options. In this post, we will focus on creating a MongoDB Document for the load process. We will see how to produce BSON (MongoDB-specific JSON that may include functions such as ObjectID and ISODate). This article assumes you have [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/create-mongodb-documents-ssis-json-bson-load-update-insert-upsert-collection/">How to create MongoDB documents (JSON, BSON) for loading in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2017/08/mongodb-logo.png"><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" /></a><span style="box-sizing: border-box; margin: 0px; padding: 0px;">In our previous article, we discussed how to <a target="_blank" rel="noopener">load data into MongoDB (Insert, Update, or Upsert Mode)</a> with various options. </span>In this post, we will focus on creating a MongoDB Document for the load process. We will see how to produce BSON (MongoDB-specific JSON<span style="box-sizing: border-box; margin: 0px; padding: 0px;"> that may include functions such as <em>ObjectID and</em></span> <em>ISODate</em>).</p>
<p>This article assumes you have installed <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> and watched the introduction videos of <a href="//zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">SSIS JSON Generator Transform</a> and <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/" target="_blank" rel="noopener">MongoDB Destination Connector</a></p>
<h2>Create MongoDB document Example (Produce JSON, BSON for Load)</h2>
<p>Here is the screenshot, which shows how to fetch SQL Server data &gt; create a MongoDB document in JSON / BSON format, and load it into a MongoDB collection</p>
<p>The high-level steps we performed are</p>
<ol>
<li>Used OLEDB Source to fetch data from SQL Server. Used a query like below<br />
<pre class="crayon-plain-tag">select CustomerID, 'ISODate("' + convert(varchar(30),getdate(),126) + '")' as DOB from Customers</pre>
In the above query, you will notice that we are building some BSON fragments, which will be treated as raw values in the JSON generator. Also, we are using the convert function from SQL Server to produce an ISO date format (Style=126 will produce an ISO date)</li>
<li>Used the <a href="//zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">SSIS JSON Generator Transform</a> to produce a JSON document for each customer. Define a custom layout using the drag-and-drop interface. You can control how many documents you want to output using settings on Transform (Single document for all input rows or one document per row in the Main dataset)</li>
<li>Load JSON documents coming from upstream into MongoDB using the <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-destination/" target="_blank" rel="noopener">SSIS MongoDB Destination Connector</a>. We changed Action=Upsert and set ColumnsForLookup to CustomerID (Consider this as Primary Key or your Join Column to find existing document)</li>
<li>On Target, we mapped __DOCUMENT__ rather than individual columns, so that we can load the full document.
<div id="attachment_11582" style="width: 775px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/08/Sample-SSIS-Package-Create-MongoDB-Document-in-BSON-format-JSON-with-functions.-Update-or-Insert-Mode.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-11582" class="size-full wp-image-11582" src="https://zappysys.com/blog/wp-content/uploads/2016/08/Sample-SSIS-Package-Create-MongoDB-Document-in-BSON-format-JSON-with-functions.-Update-or-Insert-Mode.png" alt="" width="765" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2016/08/Sample-SSIS-Package-Create-MongoDB-Document-in-BSON-format-JSON-with-functions.-Update-or-Insert-Mode.png 765w, https://zappysys.com/blog/wp-content/uploads/2016/08/Sample-SSIS-Package-Create-MongoDB-Document-in-BSON-format-JSON-with-functions.-Update-or-Insert-Mode-300x245.png 300w" sizes="(max-width: 765px) 100vw, 765px" /></a><p id="caption-attachment-11582" class="wp-caption-text">Sample SSIS Package &#8211; Create MongoDB Document in BSON format (JSON with functions). Update or Insert Mode</p></div></li>
</ol>
<h2>Configure JSON Generator Transform &#8211; Create JSON Document</h2>
<p>If you want to learn how to configure the <a target="_blank" rel="noopener">SSIS JSON Generator Transform,</a> then watch the video <a target="_blank" rel="noopener">here.</a> Important thing to remember in the configuration is to check the <strong>Treat value of this column as Raw JSON</strong></p>
<div id="attachment_11581" style="width: 938px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/08/Create-MongoDB-Document-in-JSON-or-BSON-format-Load-into-Collection-Upsert-Update-or-Insert.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11581" class="size-full wp-image-11581" src="https://zappysys.com/blog/wp-content/uploads/2016/08/Create-MongoDB-Document-in-JSON-or-BSON-format-Load-into-Collection-Upsert-Update-or-Insert.png" alt="" width="928" height="652" srcset="https://zappysys.com/blog/wp-content/uploads/2016/08/Create-MongoDB-Document-in-JSON-or-BSON-format-Load-into-Collection-Upsert-Update-or-Insert.png 928w, https://zappysys.com/blog/wp-content/uploads/2016/08/Create-MongoDB-Document-in-JSON-or-BSON-format-Load-into-Collection-Upsert-Update-or-Insert-300x211.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/08/Create-MongoDB-Document-in-JSON-or-BSON-format-Load-into-Collection-Upsert-Update-or-Insert-768x540.png 768w" sizes="(max-width: 928px) 100vw, 928px" /></a><p id="caption-attachment-11581" class="wp-caption-text">Create MongoDB Document in JSON or BSON format &#8211; Load into Collection (Upsert &#8211; Update or Insert)</p></div>
<h2>Configure MongoDB Destination &#8211; For Upsert (Update or Insert Mode)</h2>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">By default, the <a target="_blank" rel="noopener">SSIS MongoDB Destination Connector</a> performs an insert, but if you want to perform an Upsert (i.e., insert if not found, else update), you have to change a few settings.</span></p>
<ol>
<li>Change Operation to UpdateOrInsert</li>
<li>Set ColumnsForLookup (e.g., in our case, it was just one CustomerID). If you have multiple columns for join, then use a comma-separated list (e.g., City, State, Zip)</li>
<li>If you want to affect various documents if more than one match is found for the join criteria, then use multi=true as shown in the screenshot below (see LoadOptions )
<div id="attachment_11580" style="width: 1003px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/08/Configure-SSIS-MongoDB-destination-for-Upsert-operation.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11580" class="size-full wp-image-11580" src="https://zappysys.com/blog/wp-content/uploads/2016/08/Configure-SSIS-MongoDB-destination-for-Upsert-operation.png" alt="" width="993" height="528" srcset="https://zappysys.com/blog/wp-content/uploads/2016/08/Configure-SSIS-MongoDB-destination-for-Upsert-operation.png 993w, https://zappysys.com/blog/wp-content/uploads/2016/08/Configure-SSIS-MongoDB-destination-for-Upsert-operation-300x160.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/08/Configure-SSIS-MongoDB-destination-for-Upsert-operation-768x408.png 768w" sizes="(max-width: 993px) 100vw, 993px" /></a><p id="caption-attachment-11580" class="wp-caption-text">Configure the SSIS MongoDB destination for the Upsert operation</p></div></li>
</ol>
<div class="mceTemp"></div>
<h2>Conclusion</h2>
<p>In this post, you have seen how easy it is to create MongoDB Documents in JSON / BSON format and load them into a MongoDB collection using <a target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. This innovative drag-and-drop approach can simplify the entire ETL process if you are in a time crunch and don&#8217;t know scripting languages.</p>
<p>The post <a href="https://zappysys.com/blog/create-mongodb-documents-ssis-json-bson-load-update-insert-upsert-collection/">How to create MongoDB documents (JSON, BSON) for loading in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Insert Multiple Documents into MongoDB using SSIS</title>
		<link>https://zappysys.com/blog/insert-multiple-documents-mongodb-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 28 Jun 2016 00:55:05 +0000</pubDate>
				<category><![CDATA[SSIS MongoDB ExecuteSQL]]></category>
		<category><![CDATA[BSON]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[nosql]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS MongoDB ExecuteSQL Task]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=634</guid>

					<description><![CDATA[<p>Introduction In this post you will learn how to use MongoDB ExecuteSQL Task for SSIS to insert multiple documents into MongoDB collection using SSIS. This task can be used to perform any DDL or DML operations for MongoDB natively inside SSIS without using any command line utilities. It gives you flexibility and security of SSIS. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/insert-multiple-documents-mongodb-using-ssis/">How to Insert Multiple Documents into MongoDB using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><img loading="lazy" 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" />In this post you will learn how to use <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/" target="_blank" rel="noopener">MongoDB ExecuteSQL Task for SSIS</a> to <em>insert multiple documents into MongoDB collection</em> using SSIS. This task can be used to perform any DDL or DML operations for MongoDB natively inside SSIS without using any command line utilities. It gives you flexibility and security of SSIS.</p>
<p>&nbsp;</p>
<h2>Step-By-Step &#8211; Insert Multiple Documents into MongoDB Collection using SSIS</h2>
<p>Lets look at how to insert multiple MongoDB documents into</p>
<ol>
<li>Download SSIS PowerPack from here</li>
<li>Create new SSIS Package</li>
<li>Drag ZS MongoDB ExecuteSQL Task from SSIS Toolbox</li>
<li>Double click task to configure</li>
<li>Create new MongoDB connection by clicking on [New] button next to connection dropdown</li>
<li>Click OK to close connection UI</li>
<li>Now you can enter following Command in MongoDB ExecuteSQL Task to insert multiple documents into MongoDB. If you want to pass json stored inside SSIS variable then use variable placeholders (e.g. {{User::varMyJson}}  ) anywhere inside below command.<br />
<pre class="crayon-plain-tag">{
 scope: 'database',
 db: 'DemoDB',
 command: 'eval',
 args: { code: 'db.MyCollection.insert( [ {ID:1,Name:"AAA"}, {ID:2,Name:"BBB"} ] )' } 
}</pre>
</li>
</ol>
<div id="attachment_686" style="width: 814px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/06/ssis-insert-multiple-documents-in-mongodb-collection-json.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-686" class="size-full wp-image-686" src="//zappysys.com/blog/wp-content/uploads/2016/06/ssis-insert-multiple-documents-in-mongodb-collection-json.png" alt="Insert multiple documents in MongoDB Collection (JSON or BSON format)" width="804" height="567" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/ssis-insert-multiple-documents-in-mongodb-collection-json.png 804w, https://zappysys.com/blog/wp-content/uploads/2016/06/ssis-insert-multiple-documents-in-mongodb-collection-json-300x212.png 300w" sizes="(max-width: 804px) 100vw, 804px" /></a><p id="caption-attachment-686" class="wp-caption-text">Insert multiple documents in MongoDB Collection (JSON or BSON format)</p></div>
<h2>Conclusion</h2>
<p>Using <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-executesql-task/" target="_blank" rel="noopener">MongoDB ExecuteSQL Task for SSIS</a> you can execute ad-hoc MongoDB Shell commands without installing any command line tools. This is totally native SSIS approaching. You can Try <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack for FREE</a> to find out many more MongoDB features not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/insert-multiple-documents-mongodb-using-ssis/">How to Insert Multiple Documents into MongoDB using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
