<?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>JSON Path Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/json-path/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/json-path/</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:18 +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>JSON Path Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/json-path/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Read MongoDB data from array (extract nested sub documents)</title>
		<link>https://zappysys.com/blog/read-mongodb-data-from-array-extract-nested-sub-documents/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 25 Jan 2016 17:23:29 +0000</pubDate>
				<category><![CDATA[SSIS MongoDB Source]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[JSON Path]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">http://zappysys.com/blog/?p=333</guid>

					<description><![CDATA[<p>Introduction In this post you will learn how to read MongoDB data from Array. We recently introduced new JSON Path expression feature in SSIS MongoDB Source Connector to extract nested information from MongoDB documents. &#160; Read documents from Array in MongoDB By default SSIS MongoDB Source Connector doesn&#8217;t support extracting data using JSON Path expression. So if [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-mongodb-data-from-array-extract-nested-sub-documents/">Read MongoDB data from array (extract nested sub documents)</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" />In this post you will learn how to read MongoDB data from Array. We recently introduced new <strong>JSON Path expression</strong> feature in <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/">SSIS MongoDB Source Connector</a> to extract nested information from MongoDB documents.</p>
<p>&nbsp;</p>
<h2>Read documents from Array in MongoDB</h2>
<p>By default <a href="//zappysys.com/products/ssis-powerpack/ssis-mongodb-source/">SSIS MongoDB Source Connector</a> doesn&#8217;t support extracting data using <strong>JSON Path expression</strong>. So if you want to read nested data from sub-document or array then you have enable that option.</p>
<p>Consider following sample Document stored in MongoDB. Lets say you want to extract all orders for each customer.</p>
<p>For that you have enter <strong>$.Orders[*]</strong> in the JSON Path expression as below screenshots. Notice it also brings parent columns of each Orders (By default parent columns prefixed with P_ ).</p>
<p>To exclude parent columns from your resultset got to Advanced JSON Filter Options tab -&gt; Uncheck &#8220;<strong>Include Parent Columns</strong>&#8221; option.</p>
<h3>Sample MongoDB Document</h3>
<pre class="crayon-plain-tag">{
    "_id" : ObjectId("56a2ae6369e0f137a449f58b"),
    "CustomerID" : "ALFKI",
    "CompanyName" : "Alfreds Futterkiste",
    "ContactName" : "Maria Anders",
    "ContactTitle" : "Sales Representative",
    "LocationInfo" : {
        "City" : "Berlin",
        "Address" : "Obere Str. 57",
        "Region" : null,
        "PostalCode" : "12209",
        "Country" : "Germany"
    },
    "Phone" : "030-0074321",
    "Fax" : "030-0076545",
    "OrdersIDList" : [ 
        10643, 
        10692, 
        10702
    ],
    "Orders" : [ 
        {
            "OrderID" : 10643,
            "EmployeeID" : null,
            "OrderDate" : "1997-08-25 00:00:00"
        }, 
        {
            "OrderID" : 10692,
            "EmployeeID" : 4,
            "OrderDate" : "1997-10-03 00:00:00"
        }, 
        {
            "OrderID" : 10702,
            "EmployeeID" : 4,
            "OrderDate" : "1997-10-13 00:00:00"
        }
    ]
}</pre>
&nbsp;</p>
<div id="attachment_334" style="width: 720px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2016/01/mongodb-read-data-from-array-extract-nested-documents.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-334" class="size-full wp-image-334" src="//zappysys.com/blog/wp-content/uploads/2016/01/mongodb-read-data-from-array-extract-nested-documents.png" alt="Read MongoDB Data from array (extract nested sub documents)" width="710" height="521" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/mongodb-read-data-from-array-extract-nested-documents.png 710w, https://zappysys.com/blog/wp-content/uploads/2016/01/mongodb-read-data-from-array-extract-nested-documents-300x220.png 300w" sizes="(max-width: 710px) 100vw, 710px" /></a><p id="caption-attachment-334" class="wp-caption-text">Read MongoDB Data from array (extract nested sub documents)</p></div>
<h2>Server side Filtering using MongoDB Query</h2>
<p>JSON Path filtering happens on client side so first your selected set of documents fetched from MongoDB server and then transformation of happens on client side based on JSON Path you specified (de-normalization).</p>
<p>Below screenshots shows how to use MongoDB SQL Query Language (<a href="//zappysys.com/onlinehelp/ssis-powerpack/scr/mongodb-source.htm#A_QueryLanguage" target="_blank" rel="noopener">Read more here</a>) to filter data on server side and then apply <strong>JSON Path expression</strong> to extract sub-documents or array items from MongoDB documents.</p>
<div style="width: 667px" class="wp-caption alignnone"><img loading="lazy" decoding="async" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/mongodb-source/ssis-mongodb-source-settings.png" alt="MongoDB Server Side Filter - Extract MongoDB Data from Array or nested sub-documents using SQL Query and JSON Path" width="657" height="511" /><p class="wp-caption-text">MongoDB Server Side Filter &#8211; Extract MongoDB Data from Array or nested sub-documents using SQL Query and JSON Path</p></div>
<p>The post <a href="https://zappysys.com/blog/read-mongodb-data-from-array-extract-nested-sub-documents/">Read MongoDB data from array (extract nested sub documents)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
