<?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>api Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/api/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/api/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 11 Dec 2025 13:03:13 +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>api Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/api/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Read data from SharePoint List in SSIS (On-Premises SOAP API)</title>
		<link>https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 18 Feb 2022 13:26:38 +0000</pubDate>
				<category><![CDATA[SSIS XML Source (File / SOAP)]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[web service]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9545</guid>

					<description><![CDATA[<p>Introduction In this article, we learn how to call SharePoint (on-premises) SOAP API Service in SSIS. If you intend to call SharePoint Online (part of Office 365), we suggest reading SSIS SharePoint Online Connector article. Using SOAP API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint on-premises is a nice Microsoft [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/">Read data from SharePoint List in SSIS (On-Premises SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/">API Connector for SharePoint Online</a> which makes it much simpler to <strong>Read/Write SharePoint Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
In this article, we learn how to call SharePoint (on-premises) SOAP API Service in SSIS. If you intend to call SharePoint Online (part of Office 365), we suggest reading <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/ssis" target="_blank" rel="noopener">SSIS SharePoint Online Connector</a> article.</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg"><img loading="lazy" decoding="async" class="alignleft wp-image-3731 " src="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg" alt="icon SharePoint" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg 225w" sizes="(max-width: 86px) 100vw, 86px" /></a>Using SOAP API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint on-premises is a nice Microsoft application used to share documents and collaborate with the company. You can have schedules, projects, documents, and more shared using a Web platform.</p>
<p>In addition, it is a very useful tool that your company may need. It is also possible to automate, administer tasks using SOAP API.<br />
In this article, we will learn how to create SOAP API queries to SharePoint on-premises.</p>
<p>Also, we will show our ZappySys SSIS PowerPack that includes very powerful tools to export SharePoint data from REST API to any other source.<br />
<div class="su-table su-table-alternate">
<table style="width: 494px" width="300">
<tbody>
<tr style="line-height: 0px">
<td style="width: 48.0625px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="REST API Web Service Task SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;width: 429.938px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener">SSIS REST API Web Service Task<br />
</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 50px;width: 48.0625px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener"><br />
</a><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/images/SSIS-PowerPack/ssis-xml-source.png" alt="SSIS XML Source (File, SOAP, REST Connector) " width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px;width: 429.938px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" rel="noopener">SSIS XML Source (File, REST, SOAP Web Service)</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Requirements</h2>
<ol>
<li>Firstly, you will need SSDT installed.</li>
<li>Secondly, <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> installed.</li>
<li><a href="https://www.soapui.org/downloads/soapui/" target="_blank" rel="noopener">SoapUI installed</a>.</li>
</ol>
<h2>Getting started</h2>
<p>We will start with SoapUI application. It will help us to get all the possible methods SharePoint SOAP API allows. Also, it will show the inner workings of how the requests should look, which we will later replicate on XML Source. SoapUI will be our polestar.</p>
<h2>How to call SharePoint SOAP API (On-Premises)</h2>
<p>To call SOAP API in SSIS you have to perform the following steps at a high level. Detailed steps are described in the next section</p>
<ol>
<li>Import WSDL file or URL for your Service in SoapUI for testing.
<ol>
<li>File &gt; New SOAP Project.</li>
<li>In the <em>Initial WSDL</em> field enter<br />
<em>http://your.domain.com/_vti_bin/Lists.asmx?wsdl<br />
or<br />
http://your.domain.com/my-site/_vti_bin/Lists.asmx?wsdl</em></li>
</ol>
</li>
<li>Add credentials for SOAP Web service (Basic Auth or WSS)</li>
<li>Create SOAP Request XML (Edit default parameters) and <strong>Click Play Button </strong>to test your request. Associative photo:
<div id="attachment_2543" style="width: 745px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2543" class="size-full wp-image-2543" src="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png" alt="Create SOAP Request Body from WSDL (Using SoapUI tool)" width="735" height="451" srcset="https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body.png 735w, https://zappysys.com/blog/wp-content/uploads/2016/01/create-workday-soap-request-using-soapui-api-xml-body-300x184.png 300w" sizes="(max-width: 735px) 100vw, 735px" /></a><p id="caption-attachment-2543" class="wp-caption-text">Create SOAP Request Body from WSDL (Using SoapUI tool)</p></div></li>
<li>If your test works in SoapUI then you are ready to move to SSIS part.</li>
<li>Copy Service URL, Request Body and Headers to Notepad &#8212; we will use it in SSIS.<br />
For Header see <strong>Raw</strong> Tab on SoapUI &gt; Copy two lines <strong>Content-Type</strong> and <strong>SOAPAction.</strong></p>
<div id="attachment_7355" style="width: 638px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7355" class="size-full wp-image-7355" src="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png" alt="Get ContentType and SOAPAction Headers from SoapUI Raw tab" width="628" height="457" srcset="https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab.png 628w, https://zappysys.com/blog/wp-content/uploads/2016/06/soapui-get-contenttype-soapaction-raw-tab-300x218.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a><p id="caption-attachment-7355" class="wp-caption-text">Get ContentType and SOAPAction Headers from SoapUI Raw tab</p></div></li>
</ol>
<p>In the next section, we will see how to call SharePoint SOAP Web Service in SSIS.</p>
<h2>How to read data from a SharePoint List via SOAP Web Service</h2>
<p>Now let&#8217;s move onto SSIS and get some data from SharePoint using <em>XML Source</em>.</p>
<ol>
<li>Open SSIS, create a new Integration project and create a new SSIS package.</li>
<li>Drag and drop Data Flow onto the Control Flow from SSIS Toolbox.</li>
<li>Then drag and drop <a href="//zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">XML Source</a> onto Data Flow (you may also use other similar connectors such as <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a>).</li>
<li>Then configure <em>XML Source</em> in this way:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-9553" src="https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice.png" alt="" width="636" height="750" srcset="https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice.png 636w, https://zappysys.com/blog/wp-content/uploads/2022/02/how-to-read-data-from-sharepoint-via-soap-api-webservice-254x300.png 254w" sizes="(max-width: 636px) 100vw, 636px" /></p>
<ol>
<li>Enter URL:<br />
<span style="text-decoration: underline;">https://my.sharepoint.site.com/sites/mysite/_vti_bin/Lists.asmx</span><br />
or<br />
<span style="text-decoration: underline;">https://my.sharepoint.site.com/_vti_bin/Lists.asmx</span> (depends if you have many sites or just one).</li>
<li>Check <strong>Use Credentials</strong> checkbox and create <strong>ZS-HTTP</strong> connection. Use <strong>Basic</strong> or <strong>NTLM</strong> authorization scheme.</li>
<li>Then copy configuration from SoapUI to XML Source. E.g. <strong>HTTP Request Method</strong>, <strong>Body</strong>, <strong>Body Content-Type, HTTP Headers </strong>(e.g. SOAPAction header).</li>
<li>Use <strong>$.soap:Envelope.soap:Body.GetListItemsResponse.GetListItemsResult.listitems.rs:data.z:row[*]</strong> as filter. If it doesn&#8217;t work, use <strong>Select Filter</strong> button to select the path manually and select <strong>row</strong> node.</li>
</ol>
</li>
<li>What&#8217;s left is to connect XML Source with OLEDB Destination or a similar destination component:<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-9554" src="https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database.png" alt="" width="351" height="289" srcset="https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database.png 351w, https://zappysys.com/blog/wp-content/uploads/2022/02/sharepoint-on-premises-load-list-using-soap-webservice-api-into-database-300x247.png 300w" sizes="(max-width: 351px) 100vw, 351px" /></li>
</ol>
<h2>Conclusion</h2>
<p>To conclude, we can say that using SSIS PowerPack component XML Source and SoapUI we could achieve our goal of getting data from SharePoint On-Premises. The next step could be writing data to SharePoint via the same SOAP API interface, but this time using <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> component.</p>
<p>The post <a href="https://zappysys.com/blog/ssis-read-data-sharepoint-premises-soap-api/">Read data from SharePoint List in SSIS (On-Premises SOAP API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to make Web API Destination dynamic (URL, Body, Headers)</title>
		<link>https://zappysys.com/blog/make-web-api-destination-dynamic-url-body-headers/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 06 Mar 2020 03:51:19 +0000</pubDate>
				<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[Web]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8806</guid>

					<description><![CDATA[<p>Introduction In this article, we will show how to work with the Web API Destination and create a dynamic URL, Body or header. For this purpose, we will use the following components: ZappySys SSIS PowerPack component to make things work: &#160; In these examples, we are going to show different examples of how to send a dynamic URL, dynamic [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-web-api-destination-dynamic-url-body-headers/">How to make Web API Destination dynamic (URL, Body, Headers)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we will show how to work with the Web API Destination and create a dynamic URL, Body or header. For this purpose, we will use the following components:</p>
<p><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> component to make things work:<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="SSIS Web destination" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">SSIS Web API Destination (POST data to URL)</a></td>
</tr>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-json-generator-transform.png" alt="JSON Generator Transform" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">SSIS JSON Generator Transform</a></td>
</tr>
</tbody>
</table>
</div>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<p>In these examples, we are going to show different examples of how to send a dynamic URL, dynamic body and dynamic headers.</p>
<h2>How to make Web API Destination dynamic URL with the OLEDB Source</h2>
<ol>
<li>First of all, in this example, we are going to create a dynamic URL, we will use need the following URLs: <a href="https://jsonplaceholder.typicode.com/posts"><br />
https://jsonplaceholder.typicode.com/posts</a>, <a href="https://jsonplaceholder.typicode.com/comments">https://jsonplaceholder.typicode.com/comments</a>,<br />
<a href="https://jsonplaceholder.typicode.com/todos">https://jsonplaceholder.typicode.com/todos</a>, <a href="https://jsonplaceholder.typicode.com/users">https://jsonplaceholder.typicode.com/users</a>, and other similar URLs.</li>
<li>So, we will set the last part of the URL as a variable.</li>
<li>Also, will have a table with the values of the variable (posts, users, comments, etc):<br />
<pre class="crayon-plain-tag">CREATE TABLE [dbo].[webApiDest](
	[id] [smallint] NOT NULL,
	[type] [nchar](10) NULL,
 CONSTRAINT [PK_webApiDest] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (1, N'posts     ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (2, N'comments  ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (3, N'todos     ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (4, N'albums    ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (5, N'photos    ')
INSERT [dbo].[webApiDest] ([id], [type]) VALUES (6, N'users     ')</pre>
&nbsp;</li>
<li>In addition, we are going to create a Data Flow with the following components as follows:<a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-8828" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination.png" alt="" width="302" height="249" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination.png 302w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-rest-api-web-destination-300x247.png 300w" sizes="(max-width: 302px) 100vw, 302px" /></a></li>
<li>Secondly, we will connect to the table created in the previous section<br />
using the OLEDB Source component:</p>
<div id="attachment_8829" style="width: 829px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8829" class="size-full wp-image-8829" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table.png" alt="OLEDB-list-links" width="819" height="416" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table.png 819w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table-300x152.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-oledb-table-768x390.png 768w" sizes="(max-width: 819px) 100vw, 819px" /></a><p id="caption-attachment-8829" class="wp-caption-text">OLEDB-Source-Data</p></div></li>
</ol>
<h2>How to make Web API Destination dynamic URL in SSIS with the ZS JSON Generator Transform</h2>
<ol>
<li>Also, in the JSON Generator transform, right-click on Mapping and select add elements:
<div id="attachment_8831" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8831" class="size-full wp-image-8831" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1.png" alt="convert-tsql-json" width="736" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1.png 736w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-generator-transform-add-1-300x254.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-8831" class="wp-caption-text">add-elements-JSON</p></div></li>
<li>Check the add multiple bound options and check the two columns:
<div id="attachment_8832" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8832" class="size-full wp-image-8832" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound.png" alt="SSIS Multiple bound" width="395" height="482" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound.png 395w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-json-add-multiple-bound-246x300.png 246w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-8832" class="wp-caption-text">Add JSON elements</p></div></li>
<li>Pay attention to this step because this and the next one are the most important steps. Right-click the type element and select edit.
<div id="attachment_8833" style="width: 743px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8833" class="size-full wp-image-8833" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type.png" alt="Edit-ssis-outstream" width="733" height="612" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type.png 733w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-edit-type-300x250.png 300w" sizes="(max-width: 733px) 100vw, 733px" /></a><p id="caption-attachment-8833" class="wp-caption-text">Edit JSON element</p></div></li>
<li>The hide from output will hide the type from the output but will be present as a variable. Also, when we want to hide in the JSON created that element.
<div id="attachment_8834" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8834" class="size-full wp-image-8834" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream.png" alt="column-downstream" width="395" height="482" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream.png 395w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-hide-output-include-downstream-246x300.png 246w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-8834" class="wp-caption-text">Column downstream</p></div></li>
<li>In addition, the include columns in the downstream option are the option that will allow sending the type as a variable from the JSON Generator Transform to the Web API destination.</li>
</ol>
<h2>How to make Web API Destination dynamic URL in SSIS with the ZS JSON Generator Transform</h2>
<ol>
<li>First of all, we will add the input column for the body. This will send the ZSON generator into the body.
<div id="attachment_8835" style="width: 708px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8835" class="size-full wp-image-8835" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body.png" alt="Body-ssis-JSON" width="698" height="307" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body.png 698w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-input-column-body-300x132.png 300w" sizes="(max-width: 698px) 100vw, 698px" /></a><p id="caption-attachment-8835" class="wp-caption-text">Body input</p></div></li>
<li>In connections, we will create a ZS-HTTP connection to the <a href="https://jsonplaceholder.typicode.com/">https://jsonplaceholder.typicode.com/</a> site:
<div id="attachment_8837" style="width: 736px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8837" class="size-full wp-image-8837" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection.png" alt="http connection" width="726" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection.png 726w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-http-zs-connection-300x270.png 300w" sizes="(max-width: 726px) 100vw, 726px" /></a><p id="caption-attachment-8837" class="wp-caption-text">SSIS HTTP Connection</p></div></li>
<li>In the URL we will create a dynamic part with the type as a variable that gets the values from the SQL Server table and the type column.</li>
<li>You can write &lt;%type%&gt; manually, or edit the URL to use placeholders and get the type variable from the columns folder:
<div id="attachment_8839" style="width: 706px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8839" class="size-full wp-image-8839" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic.png" alt="ssis dynamic link" width="696" height="380" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic.png 696w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-url-type-dynamic-300x164.png 300w" sizes="(max-width: 696px) 100vw, 696px" /></a><p id="caption-attachment-8839" class="wp-caption-text">SSIS web api dynamic link</p></div></li>
<li>The Web API configuration will be something like this:
<div id="attachment_8840" style="width: 711px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8840" class="size-full wp-image-8840" src="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final.png" alt="SSIS-configuration-web-api" width="701" height="673" srcset="https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final.png 701w, https://zappysys.com/blog/wp-content/uploads/2020/03/ssis-web-api-destination-final-300x288.png 300w" sizes="(max-width: 701px) 100vw, 701px" /></a><p id="caption-attachment-8840" class="wp-caption-text">Final SSIS configuration</p></div></li>
<li>Finally, run the package.</li>
</ol>
<h2>Conclusion</h2>
<p>In this article, we learned how to send a dynamic URL to REST API. If you want to test the tool, you can download it here:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/download/">ZappySys PowerPack</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/make-web-api-destination-dynamic-url-body-headers/">How to make Web API Destination dynamic (URL, Body, Headers)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to write/update Google Sheet in SSIS</title>
		<link>https://zappysys.com/blog/write-update-google-sheet-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 11 Dec 2019 12:29:14 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[Connection]]></category>
		<category><![CDATA[Destination]]></category>
		<category><![CDATA[generator]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oledb]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[put]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[sheet]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[spreadsheet]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[transform]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[variable]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[write]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8475</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn How to write/update Google Sheet in SSIS. We will use drag and drop REST API connectors from SSIS PowerPack. No need to download any SDK or learn programming languages (e.g. JAVA, C#, Ruby, Python) when you use SSIS PowerPack Connectors. We will use the Google Drive API and Google Sheet API [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/">How to write/update Google Sheet in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/google-sheets-connector/">API Connector for Google Sheets Online</a> which makes it much simpler to <strong>Read/Write  Google Sheets Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2016/09/google-sheets-api-integration.png"><img loading="lazy" decoding="async" class="size-thumbnail wp-image-1670 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2016/09/google-sheets-api-integration-150x150.png" alt="" width="150" height="150" /></a>In this post, you will learn How to write/update Google Sheet in SSIS. We will use drag and drop REST API connectors from <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>. No need to download any SDK or learn programming languages (e.g. JAVA, C#, Ruby, Python) when you use SSIS PowerPack Connectors. We will use the Google Drive API and Google Sheet API to write and update Google Spreadsheet in a few clicks (using OAuth 2.0 connection in SSIS).</p>
<p>In this tutorial, we will use the <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task</a> to call some API. We will use the <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth connection</a> along the <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">REST API Task</a> to write / update data to Google Spreadsheet.</p>
<p>&nbsp;</p>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Credentials of Google API.</li>
</ol>
<h2>Component Mention in this article</h2>
<div class="su-table su-table-alternate">
<table style="height: 44px;width: 307px">
<tbody>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-generator-transform/ssis-json-generator-transform.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-generator-transform/ssis-json-generator-transform.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="Create_Google_API_Project">Create a Google API Project</span></h2>
<p>The first step to access any Google API is to create an API Project in Google Console. If you don’t want to go through this then Skip this Step-1 and in the next section select the Default OAuth App option on OAth Connection Manager (This is the easiest option for now unless you want to use your own OAuth App).</p>
<p><a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">Check this article</a> for step-by-step instructions. When you follow these instructions make sure you <a href="https://console.developers.google.com/apis/api/sheets.googleapis.com/overview?project=603281348663" target="_blank" rel="noopener">enable Google Sheet API.</a></p>
<h2><span id="Create_OAuth_Connection_Manager_in_SSIS">Create OAuth Connection Manager in SSIS</span></h2>
<p>Once you create a Google API project and obtained a Client ID and Client Secret your next step is to create <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> in SSIS. ZappySys OAuth connection manager comes with many predefined OAuth Providers (e.g. Facebook, Twitter, Google, etc) but you can also define custom OAuth settings for any OAuth enabled API.</p>
<p>To create SSIS OAuth 2.0 Connection for Google API perform the following steps.</p>
<ol>
<li>Download and Install SSIS PowerPack.</li>
<li>Create a new SSIS Package.</li>
<li>Right-click in Connection Manager Area and Click “New Connection”.</li>
<li>When prompted select ZS-OAUTH connection type, On the OAuth Connection Manager Select Provider=Google.</li>
<li>Click here to <a href="https://console.developers.google.com/apis/credentials" target="_blank" rel="noopener">create credentials.</a> Then select the “Use Custom OAuth App” option and enter your ClientID, ClientSecret.</li>
<li>In the Scopes <strong>enter below scopes</strong> (or click Select Scopes). This will allow read/write access to Drive Files or Sheet (E.g. Reading file content / Export file to CSV). You can use the Scope browser to see many other available permissions. For more information click <a href="https://developers.google.com/sheets/api/guides/authorizing#OAuth2Authorizing" target="_blank" rel="noopener">here.</a><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/drive.file
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/spreadsheets
https://www.googleapis.com/auth/spreadsheets.readonly</pre>
</li>
<li>Click on the Generate Token button.
<div id="attachment_8479" style="width: 1036px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8479" class="wp-image-8479 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file.png" alt="SSIS OAuth Connection Manager – Access Google Drive API using OAuth 2.0" width="1026" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file.png 1026w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file-768x489.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-google-oauth-connection-google-drive-api-access-file-1024x652.png 1024w" sizes="(max-width: 1026px) 100vw, 1026px" /></a><p id="caption-attachment-8479" class="wp-caption-text">SSIS OAuth Connection Manager – Access Google Drive API using OAuth 2.0</p></div></li>
<li>You will see UI as below… Click Allow (You may have to scroll to see that button sometimes).</li>
<li>Click on Test Connection to see the connection is working and click on the OK button to save configure setting UI.</li>
</ol>
<h2><span id="Find_Google_Sheet_ID_for_API_call">Find Google Sheet ID for API calls</span></h2>
<p>Before we can write or update Sheet data in SSIS we need to know Google Driver File ID. We will use this ID in the next few sections.</p>
<p>The easiest way to find File ID is to look at the URL like below. If you need to know ID at runtime dynamically then refer to the last section.</p>
<div id="attachment_8450" style="width: 806px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8450" class="wp-image-8450 size-full" src="https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call.png" alt="Get Google Drive File ID for API call (Sheet ID)" width="796" height="286" srcset="https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call.png 796w, https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call-300x108.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/09/obtain-google-sheet-id-for-api-call-768x276.png 768w" sizes="(max-width: 796px) 100vw, 796px" /></a><p id="caption-attachment-8450" class="wp-caption-text">Get Google Drive File ID for API call (Sheet ID)</p></div>
<h2>Create Variables to make dynamic URL</h2>
<ol>
<li>Here, we are going to make a Dynamic URL value.</li>
<li>In Visual Studio Project Right Click on Design Panel, Select Variables.
<div style="width: 426px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-create-variable.png" alt="Create Variables" width="416" height="294" /></a><p class="wp-caption-text">Create Variables</p></div></li>
<li>Let&#8217;s Create Variables with correct DataType and Value. In variable &#8220;<strong>varRange</strong>&#8221; set only the starting point(<strong>Sheet1!A2</strong>) of data if you don&#8217;t know the ending point and leave the first-row for giving header row later or click <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/#Update_Google_Sheet_header_cells_manually" target="_blank" rel="noopener">here.</a><br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="aligncenter wp-image-8547 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable.png" alt="Create Variables with correct datatype and values" width="863" height="209" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable.png 863w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable-300x73.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-create-variable-768x186.png 768w" sizes="(max-width: 863px) 100vw, 863px" /></a></li>
</ol>
<h2>Write SQL Server data to Google Spreadsheet</h2>
<p>Now let’s look at a real-world example. How to write data from SQL Server table or other source and send to Google Sheet using Web API Destination.</p>
<ol>
<li>Drag and Drop SSIS Data Flow Task from SSIS Toolbox.
<div id="attachment_8028" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8028" class="wp-image-8028 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png" alt="Dragging and dropping Data Flow Task into Control Flow" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/02/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-8028" class="wp-caption-text">Dragging and dropping Data Flow Task into Control Flow</p></div></li>
<li>Double click on the Data Flow task to see the Data Flow designer surface.</li>
<li>Here, In Visual Studio, drag and drop the OLE DB Source, JSON Generator Transform and Web API Destination in the design surface and join the components with the blue arrow.
<div id="attachment_8491" style="width: 611px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8491" class="wp-image-8491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination.png" alt="Drag and Drop OLE DB Source, JSON Generator Transform and Web API Destination" width="601" height="369" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination.png 601w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-drag-drop-json-generator-web-api-destination-300x184.png 300w" sizes="(max-width: 601px) 100vw, 601px" /></a><p id="caption-attachment-8491" class="wp-caption-text">Drag and Drop OLE DB Source, JSON Generator Transform, and Web API Destination</p></div></li>
<li>Here, you can use our Free ZS Dummy Data Source too. Click <a href="https://zappysys.com/products/ssis-powerpack/dummy-data-source-free/" target="_blank" rel="noopener">here</a> for more information.</li>
<li>But, we are going through OLE DB Source so we need OLEDB Connection.</li>
</ol>
<h3>Create OLE DB Connection</h3>
<ol>
<li>Lets, create the OLE DB Connection.</li>
<li>Let&#8217;s, Right-click on Connection Managers Panel to Create OLEDB Connection, so you can use Source and Context Menu will appear, Select New OLEDB Connection from the Context Menu.
<div style="width: 485px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-1.png" alt="Create OLE DB Connection" width="475" height="353" /></a><p class="wp-caption-text">Create OLE DB Connection</p></div></li>
<li>Now, click on New Button to create Connection.
<div style="width: 665px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-2.png" alt="Create New Connection" width="655" height="558" /></a><p class="wp-caption-text">Create New Connection</p></div></li>
<li>Let&#8217;s Configure Connection Manager, just Follow steps one by one as we have created.
<div style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-3.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/oledb-connection-manager/ssis-new-oledb-connection-step-3.png" alt="Configure OLE DB Connection" width="720" height="625" /></a><p class="wp-caption-text">Configure OLE DB Connection</p></div></li>
<li>Click on Test Connection to see correct configure it.</li>
<li>Click on the OK button to save connection configure setting UI.</li>
</ol>
<h3>Configure JSON Generator Transform</h3>
<ol>
<li>Double click on JSON Generator Transform to configure it.</li>
<li>Set Output Mode to <strong>Single Dataset Array</strong>. Right-click on Mappings, select Add Static Element then enter Name: &#8220;<strong>range</strong>&#8221; and Select variable we have created for value.
<div id="attachment_8492" style="width: 929px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8492" class="wp-image-8492 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value.png" alt="Configure JSON Generator Transform - Add Static Value" width="919" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value.png 919w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-768x610.png 768w" sizes="(max-width: 919px) 100vw, 919px" /></a><p id="caption-attachment-8492" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Static Value</p></div></li>
<li>Again, Right-click on Mappings, select Add Static Element then enter Name: &#8220;<strong>majorDimension</strong>&#8221; and Value: &#8220;<strong>ROWS</strong>&#8220;.
<div id="attachment_8493" style="width: 946px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8493" class="wp-image-8493 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2.png" alt="Configure JSON Generator Transform - Add Static Value" width="936" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2.png 936w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2-300x234.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-static-value-2-768x599.png 768w" sizes="(max-width: 936px) 100vw, 936px" /></a><p id="caption-attachment-8493" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Static Value</p></div></li>
<li>Now, Right-click on Mappings, select Add Document Array, Check to Treat as <strong>2D array</strong> option and enter Element Name as &#8220;<strong>values</strong>&#8220;.
<div id="attachment_8494" style="width: 1047px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8494" class="wp-image-8494 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array.png" alt="Configure JSON Generator Transform - Add Document Array" width="1037" height="764" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array.png 1037w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array-768x566.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-document-array-1024x754.png 1024w" sizes="(max-width: 1037px) 100vw, 1037px" /></a><p id="caption-attachment-8494" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Document Array</p></div></li>
<li>Then, right-click on Document Array, select <strong>Add elements</strong> &gt; Select <strong>Add Multiple Columns</strong> and check on columns you like to add.
<div id="attachment_8495" style="width: 1047px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8495" class="wp-image-8495 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement.png" alt="Configure JSON Generator Transform - Add Element" width="1037" height="764" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement.png 1037w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement-768x566.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-json-generator-addelement-1024x754.png 1024w" sizes="(max-width: 1037px) 100vw, 1037px" /></a><p id="caption-attachment-8495" class="wp-caption-text">Configure JSON Generator Transform &#8211; Add Element</p></div></li>
<li>Click on the OK button to save JSON Generator Transform configure setting UI.</li>
</ol>
<h3>Configure Web API Destination</h3>
<ol>
<li>Double click on Web API Destination to configure it.</li>
<li>Select the OAuth connection manager created in an earlier section (Assuming you had all scopes with write permission).</li>
<li>In the Setting tab,
<ol>
<li>In URL, Generate Dynamic URL like below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}:{{User::varSpreadsheetValues}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A2:B4:append?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>POST.</strong></li>
<li>Select JSON Generator variable into <strong>Body (Request Data)</strong> or you can select <strong>Input column</strong> for <strong>Body </strong>(JSON Generator Output).</li>
<li>Set <strong><strong><strong>application/JSON </strong></strong></strong>to Body Content-type.
<div id="attachment_8497" style="width: 1214px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8497" class="wp-image-8497 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination.png" alt="Configure Web API Destination" width="1204" height="725" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination.png 1204w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination-300x181.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination-768x462.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-configure-web-api-destination-1024x617.png 1024w" sizes="(max-width: 1204px) 100vw, 1204px" /></a><p id="caption-attachment-8497" class="wp-caption-text">Configure Web API Destination</p></div></li>
</ol>
</li>
<li>Click on the OK button to save Web API Destination configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet. Now update header row values for click <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/#Update_Google_Sheet_header_cells_manually">here.</a>
<div id="attachment_8530" style="width: 1147px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8530" class="wp-image-8530 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1.png" alt="Run or Execute Package and verify data into Google Spreadsheet" width="1137" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1.png 1137w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1-300x147.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1-768x376.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-execute-1-1024x501.png 1024w" sizes="(max-width: 1137px) 100vw, 1137px" /></a><p id="caption-attachment-8530" class="wp-caption-text">Run or Execute Package and verify data into Google Spreadsheet</p></div></li>
</ol>
<h2><span id="Write_data_to_Google_Spread_Sheet">Append data to Google SpreadSheet using REST API Task</span></h2>
<p>Now let&#8217;s look at how to write to Google SpreadSheet. To write multiple rows in a single request. Also, check this link to <a href="https://developers.google.com/sheets/api/guides/values" target="_blank" rel="noopener">learn more</a>.</p>
<p>For more information, you can see the <a href="https://developers.google.com/sheets/api/samples/writing" target="_blank" rel="noopener">example here</a>. For parameter, detail review this API documentation.</p>
<p>You can use<a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener"> SSIS REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> to achieve the Spreadsheet write scenario. For a simple example, let&#8217;s use the REST API Task.</p>
<ol>
<li>Drag and Drop ZS REST API Task on the control flow designer.
<div id="attachment_3777" style="width: 577px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3777" class="wp-image-3777 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png" alt="Drag and Drop REST API Task" width="567" height="297" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin.png 567w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task-share-post-on-linkedin-300x157.png 300w" sizes="(max-width: 567px) 100vw, 567px" /></a><p id="caption-attachment-3777" class="wp-caption-text">Drag and Drop REST API Task</p></div></li>
<li>Double click on ZS REST API Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>set Request URL Access Mode to Url from a connection. Select OAuth Connection from the dropdown (Same connection we created in the previous section).</li>
<li>Enter the URL below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}:{{User::varSpreadsheetValues}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A1:append?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>POST.</strong></li>
<li>Enter Request Body as below<br />
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note:</strong> For example purpose, we included header line in data cells but in the real-world header may already exist in the sheet.</div></div>
<pre class="crayon-plain-tag">{
  "range": "{{User::varRange}}",
  "majorDimension": "ROWS",
  "values": [
    ["Item", "Cost", "Stocked", "Ship Date"],
    ["Wheel", "$20.50", "4", "3/1/2016"],
    ["Door", "$15", "2", "3/15/2016"],
    ["Engine", "$100", "1", "3/20/2016"],
    ["Totals", "=SUM(B2:B4)", "=SUM(C2:C4)", "=MAX(D2:D4)"]
  ]
}</pre>
</li>
<li>Change Request Content type to <strong><strong><strong>application/JSON.</strong></strong></strong>
<div id="attachment_8482" style="width: 1335px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8482" class="wp-image-8482 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth.png" alt="Write data to Google SpreadSheet using REST API Task (OAuth 2.0 Connection)" width="1325" height="762" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth.png 1325w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth-300x173.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth-768x442.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-post-google-spreadsheet-using-rest-api-oauth-1024x589.png 1024w" sizes="(max-width: 1325px) 100vw, 1325px" /></a><p id="caption-attachment-8482" class="wp-caption-text">Write data to Google SpreadSheet using REST API Task (OAuth 2.0 Connection)</p></div></li>
</ol>
</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet.
<div id="attachment_8481" style="width: 1390px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8481" class="wp-image-8481 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute.png" alt="Execute REST API Task and verify Google Spreadsheet data " width="1380" height="671" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute.png 1380w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute-300x146.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute-768x373.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-google-spreadsheet-using-rest-api-oauth-post-execute-1024x498.png 1024w" sizes="(max-width: 1380px) 100vw, 1380px" /></a><p id="caption-attachment-8481" class="wp-caption-text">Execute REST API Task and verify Google Spreadsheet data</p></div></li>
</ol>
<h2><span id="Update_Google_Sheet_Cells_8211_Single_Range_Set_Values_for_multiple_cells">Update Google Sheet Cells</span></h2>
<p>Now let’s look at the below example of updating multiple cells in google Spreadsheet. For more information, you can see the <a href="https://developers.google.com/sheets/api/samples/writing" target="_blank" rel="noopener">example here</a>. For parameter, detail review this API documentation.</p>
<p>You can use<a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener"> SSIS REST API Task</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> to achieve the Spreadsheet Update scenario. For a simple example, let&#8217;s use the REST API Task.</p>
<h3>Update Google Sheet header cells manually</h3>
<ol>
<li>Drag and drop ZS REST API Tasks on the control flow designer.</li>
<li>Double click on the First REST API Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Range designator(including Sheet name: <strong>Sheet1!A1</strong>) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A1?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>PUT.</strong></li>
<li>Enter Request Body as below<br />
<pre class="crayon-plain-tag">{
  "range": "{{User::varRange}}",
  "majorDimension": "ROWS",
  "values": [
    ["CustomerID", "CustomerName"]
  ]
}</pre>
</li>
</ol>
</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-8532" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth.png" alt="" width="1318" height="677" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth.png 1318w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth-300x154.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth-768x394.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-update-put-google-spreadsheet-using-rest-api-oauth-1024x526.png 1024w" sizes="(max-width: 1318px) 100vw, 1318px" /></a></li>
</ol>
<h3><span id="Update_Google_Sheet_Cells_8211_Single_Range_Set_Values_for_multiple_cells">Single Range (Set Values for multiple cells)</span></h3>
<ol>
<li>Follow the previous section(write data to Google Spreadsheet) to update sheet data.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A2:B4?valueInputOption=USER_ENTERED</pre>
</li>
<li>Change Request Method to <strong>PUT.</strong></li>
<li>Enter Request Body as below<br />
<pre class="crayon-plain-tag">{
  "range": "{{User::varRange}}",
  "majorDimension": "ROWS",
  "values": [
    ["Laptop", "$2000.50"],
    ["Mobile", "$1150"]
  ]
}</pre>
</li>
</ol>
</li>
<li>That&#8217;s all, click on the Test Request/Response button and verify data into Google spreadsheet.
<div id="attachment_8485" style="width: 1610px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8485" class="wp-image-8485 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth.png" alt="Calling Google Sheet API to Update Multiple Cell Values" width="1600" height="860" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth.png 1600w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth-768x413.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-write-put-google-spreadsheet-using-rest-api-oauth-1024x550.png 1024w" sizes="(max-width: 1600px) 100vw, 1600px" /></a><p id="caption-attachment-8485" class="wp-caption-text">Calling Google Sheet API to Update Multiple Cell Values</p></div></li>
</ol>
<h2><span id="Write_data_to_Google_Spread_Sheet">Clear data to Google SpreadSheet using REST API Task</span></h2>
<h3 id="clear_a_sheet_of_all_values_while_preserving_formats">Clear a sheet of all values while preserving formats</h3>
<p>Lets clear a sheet of all values by REST API Task, Before processed we need sheet Id. So let&#8217;s get the SheetId by API Call. For more information about click <a href="https://developers.google.com/sheets/api/samples/sheet#clear_a_sheet_of_all_values_while_preserving_formats" target="_blank" rel="noopener">here.</a></p>
<ol>
<li>Drag and Drop two ZS REST API Tasks on the control flow designer and rename(Get Sheet ID and Clear Google Sheet of all values) it.</li>
<li>Double click on the First REST API(Get Sheet ID) Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Sheet ID and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc</pre>
</li>
<li>Change Request Method to <strong><strong>GET.<br />
</strong></strong><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-8515 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid.png" alt="REST API Task - Get Google Sheet ID" width="923" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid.png 923w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid-300x215.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-getsheetid-768x550.png 768w" sizes="(max-width: 923px) 100vw, 923px" /></a>REST API Task &#8211; Get Google Sheet ID</li>
</ol>
</li>
<li>Now go to Response Settings Tab, Select Response content Type Json and Write Response Content Filter Expression. Check on Save Response Content. Select Save Mode to Variable and Create a New variable or select it.<br />
<strong>Example of Response Content Filter Expression for the first Sheet : </strong><br />
<pre class="crayon-plain-tag">$.sheets.[0].properties.sheetId</pre>
<div id="attachment_8517" style="width: 757px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8517" class="wp-image-8517 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid.png" alt="REST API Task - Save Google Sheet ID into Variable" width="747" height="613" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid.png 747w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-savesheetid-300x246.png 300w" sizes="(max-width: 747px) 100vw, 747px" /></a><p id="caption-attachment-8517" class="wp-caption-text">REST API Task &#8211; Save Google Sheet ID into Variable</p></div></li>
<li>Now, click on the Test Request/Response to check configures are ok.</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>Double click on the second REST API(Clear Google Sheet of all values) Task to configure it.</li>
<li>In the Request Settings tab,
<ol>
<li>Enter the URL below. Change Sheet ID and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}:batchUpdate</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc:batchUpdate</pre>
</li>
<li>Change Request Method to <strong>POST. </strong>Enter Request Body as below and change a variable parameter as per your need.<br />
<pre class="crayon-plain-tag">{
  "requests": [
    {
      "updateCells": {
        "range": {
          "sheetId": {{User::varGoogleSheetID}}
        },
        "fields": "userEnteredValue"
      }
    }
  ]
}</pre>
</li>
<li>Change Request Content type to <strong>application/JSON.<br />
</strong></p>
<div id="attachment_8518" style="width: 1109px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8518" class="wp-image-8518 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth.png" alt="REST API Task Configure - Clear sheet of all values" width="1099" height="763" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth.png 1099w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-300x208.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-768x533.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-clear-google-spreadsheet-using-rest-api-oauth-1024x711.png 1024w" sizes="(max-width: 1099px) 100vw, 1099px" /></a><p id="caption-attachment-8518" class="wp-caption-text">REST API Task Configure &#8211; Clear sheet of all values</p></div></li>
</ol>
</li>
<li>Click on the OK button to save REST API Task configure setting UI.</li>
<li>That&#8217;s all, You are ready to Run or Execute Task and verify data into Google spreadsheet.</li>
</ol>
<h3>Clears range cell values from a spreadsheet</h3>
<ol>
<li>Double click on REST API Task to configure it. Then, follow the way just like the previous section configures REST API Task.</li>
<li>Here you need to set the value of Variable &#8220;<strong>varSpreadsheetValues</strong>&#8221; to &#8220;<strong>clear</strong>&#8221; or you can change it directly in URL <strong>append to clear </strong>and value of variable &#8220;<strong>varRange</strong>&#8221; (Change cell range and sheet name) as per your need. For more information about it click <a href="https://developers.google.com/sheets/api/reference/rest/v4/spreadsheets.values/clear" target="_blank" rel="noopener">here.</a>
<ol>
<li>Enter the URL below. Change Sheet ID, Range designator(including Sheet name) and API URL Parameters as per your need.<br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/{{User::varGoogleSpreadsheetID}}/values/{{User::varRange}}:{{User::varSpreadsheetValues}}?valueInputOption={{User::varValueInputOption}}</pre>
<strong>Example URL without variables (some part masked with xxxxxxxx):</strong><br />
<pre class="crayon-plain-tag">https://sheets.googleapis.com/v4/spreadsheets/1tuGO3_-2JlSmyiHwX6xxxxxxxxCHrORJc/values/Sheet1!A2:B4:clear?valueInputOption=USER_ENTERED</pre>
</li>
</ol>
</li>
<li>Change Request Method to <strong>POST.</strong></li>
<li>Enter Request Body as below<br />
<pre class="crayon-plain-tag">{}</pre>
</li>
<li>Change Request Content type to <strong><strong><strong>application/JSON.</strong></strong></strong></li>
<li>That&#8217;s all, click on the Test Request/Response button and verify data into Google spreadsheet.</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>Google Drive API and Google Sheets API provide a great way to automate file-related functionality. However, to call Google API  you have to use the SDK / coding approach (e.g. C#, Java, Python, Ruby). Luckily ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> provides a great way to integrate any Google API call via simple drag and drop approach without coding. Try out yourself see how long it takes to call virtually any REST API.</p>
<h2>References</h2>
<p>Finally, you can use the following links for more information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator Transform</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></li>
<li>Help File:
<ul>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-json-generator-transform.htm" target="_blank" rel="noopener">JSON Generator Transform</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-web-api-destination.htm" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-rest-api-web-service-task.htm" target="_blank" rel="noopener">REST API Task</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/write-update-google-sheet-ssis/">How to write/update Google Sheet in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read Walmart API data in SSIS / ODBC</title>
		<link>https://zappysys.com/blog/read-walmart-api-data-ssis-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 10 Jul 2019 12:45:13 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS Logging Task]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[Task]]></category>
		<category><![CDATA[Token]]></category>
		<category><![CDATA[Walmart]]></category>
		<category><![CDATA[ZappySys]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7380</guid>

					<description><![CDATA[<p>Introduction In this article, we will see how to read Walmart API data in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call Walmart APIs can be useful for any developer regardless of which programming language or toolset you use. Are you a Walmart.com Supplier or Marketplace [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-walmart-api-data-ssis-odbc/">How to read Walmart API data in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><img loading="lazy" decoding="async" class="alignnone size-full wp-image-7381 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/07/Walmart-150x150.jpg" alt="" width="128" height="128" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/Walmart-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2019/07/Walmart.jpg 200w" sizes="(max-width: 128px) 100vw, 128px" />In this article, we will see how to read Walmart API data in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call Walmart APIs can be useful for any developer regardless of which programming language or toolset you use.</p>
<p>Are you a Walmart.com Supplier or Marketplace Seller? Then you may need to <a href="https://developer.walmart.com/">click here</a> to visit the site that is focused on these profiles.</p>
<p>&nbsp;</p>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:</p>
<ol>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>).</li>
<li>Credentials of Walmart API. Click <a href="https://developer.walmartlabs.com/" target="_blank" rel="noopener">here</a> to create API.</li>
</ol>
<h2>Components Mentioned in this article</h2>
<div class="su-table su-table-alternate">
<table style="height: 44px;width: 307px">
<tbody>
<tr style="height: 22px">
<td style="width: 1px;height: 22px"><img loading="lazy" decoding="async" class="alignnone size-medium_large" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/logging-task/ssis-logging-task.png" width="40" height="40" /></td>
<td style="width: 247px;height: 22px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-logging-task.htm" target="_blank" rel="noopener">ZS Logging Task</a></td>
</tr>
<tr style="height: 22px">
<td style="height: 22px;width: 1px"><a href="https://zappysys.com/blog/wp-content/uploads/2016/01/SSIS-Json-Source-Adapter.png"><img loading="lazy" decoding="async" class="alignnone wp-image-3074" src="https://zappysys.com/blog/wp-content/uploads/2016/01/SSIS-Json-Source-Adapter.png" alt="" width="40" height="40" /></a></td>
<td style="height: 22px;width: 247px"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/json-source.htm" target="_blank" rel="noopener">JSON Source(REST API or File)</a></td>
</tr>
</tbody>
</table>
</div>
<h2><span id="What_is_WordPress">What is Walmart?</span></h2>
<p>Walmart is the world&#8217;s largest retailer, and the Walmart Open API provides access to our extensive product catalog, thus enabling digital distribution partners to earn substantial affiliate revenues from customer referrals.</p>
<h2><span id="Read_data_fromWordPressusing_SSIS_JSON_Source">Read Walmart API Data using SSIS JSON Source</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to Walmart API, we will read Walmart data and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<h3><span id="Step-1_GetDynamic_Token_Configure_ZS-HTTP_Connection">Get Dynamic Token (Configure ZS-HTTP Connection)</span></h3>
<p>To get API response data using SOAP / REST API call, you need to get an API Token from your login request URL. Follow the steps mentioned below to get API Token:</p>
<ol>
<li>Now, Right Click on Connection Managers Window, and one Context menu appears for creating a new connection manager.
<div style="width: 740px" class="wp-caption aligncenter"><a href="https://i2.wp.com/zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-create-new-connection-e1531164541889.png?w=730&amp;ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-create-new-connection-e1531164541889.png?w=730&amp;ssl=1" alt="Create a New HTTP Connection." width="730" height="444" /></a><p class="wp-caption-text">Create a New HTTP Connection.</p></div></li>
<li>Select ZS HTTP Connection Manager from the list of Connection Managers and, double-click on it or click on Add button to add a new Connection Manager. By Default, The created connection manager is of Package-Level. You can set Project Level Connection manager too If you want.
<div style="width: 597px" class="wp-caption aligncenter"><a href="https://i2.wp.com/zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-select-http-connection-manager-to-add.png?w=587&amp;ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i2.wp.com/zappysys.com/blog/wp-content/uploads/2018/07/ssis-connection-manager-select-http-connection-manager-to-add.png?w=587&amp;ssl=1" alt="Select ZS-HTTP Connection from SSIS Connection Manager." width="587" height="634" /></a><p class="wp-caption-text">Select ZS-HTTP Connection from SSIS Connection Manager.</p></div></li>
<li>In the SSIS ZS HTTP Connection Manager, Go to General Tab and Configure HTTP Connection Manager. Enter API URL, Set Credentials Type to Dynamic Token &#8211; Two-Step Auth, and configure some basic settings for the same. We used Login URL as just example but you can enter any valid API URL endpoint here. Actual Login URL goes on Dynamic Token Tab (see next step).<br />
<pre class="crayon-plain-tag">https://marketplace.walmartapis.com/v3/items?nextCursor=*&amp;offset=2000&amp;limit=20</pre>
<pre class="crayon-plain-tag">WM_SEC.ACCESS_TOKEN</pre>
<div id="attachment_7418" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7418" class="wp-image-7418 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-768x521.png" alt="ZS HTTP Connection - Configure General Tab" width="720" height="488" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-768x521.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-300x203.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token.png 814w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7418" class="wp-caption-text">ZS HTTP Connection &#8211; Configure General Tab</p></div></li>
<li>Now, In the Dynamic Token Tab do configure like below image. Please click <a href="https://developer.walmart.com/#/apicenter/marketPlace/latest#getToken" target="_blank" rel="noopener">here</a> to refer about Walmart API Token.<br />
<pre class="crayon-plain-tag">https://marketplace.walmartapis.com/v3/token</pre>
<pre class="crayon-plain-tag">grant_type=client_credentials</pre>
<pre class="crayon-plain-tag">Accept: application/json
Cache-Control: no-cache
WM_SVC.NAME: Walmart Marketplace
WM_QOS.CORRELATION_ID: TokenId_&lt;&lt;yyyy-MM-ddTHH:mm:ss.fffZ,FUN_GETDATE_UTC&gt;&gt;
Authorization: Basic &lt;&lt;[$userid$]:[$password$],FUN_BASE64ENC&gt;&gt;</pre>
<div id="attachment_7454" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-configure.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7454" class="wp-image-7454 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-configure-768x668.png" alt="ZS HTTP Connection - Dynamic Token Tab" width="720" height="626" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-configure-768x668.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-configure-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-http-connection-dynamic-token-configure.png 854w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7454" class="wp-caption-text">ZS HTTP Connection &#8211; Dynamic Token Tab</p></div></li>
<li>On the <strong>Response Settings</strong> tab configure as below
<div id="attachment_7706" style="width: 598px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/wallmart-api-extract-token-from-response.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7706" class="size-full wp-image-7706" src="https://zappysys.com/blog/wp-content/uploads/2019/07/wallmart-api-extract-token-from-response.png" alt="Walmart API - Extract Token - Response Settings" width="588" height="383" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/wallmart-api-extract-token-from-response.png 588w, https://zappysys.com/blog/wp-content/uploads/2019/07/wallmart-api-extract-token-from-response-300x195.png 300w" sizes="(max-width: 588px) 100vw, 588px" /></a><p id="caption-attachment-7706" class="wp-caption-text">Walmart API &#8211; Extract Token &#8211; Response Settings</p></div>
<ol>
<li>Extract Mode = <strong>Extract from Body </strong></li>
<li>Expression Type = <strong>Json</strong></li>
<li>Response Content Filter = <pre class="crayon-plain-tag">$.access_token</pre></li>
</ol>
</li>
<li>Click on OK button to save HTTP Connection configure settings.</li>
</ol>
<p>That’s it we have successfully configured Connection for Walmart API in SSIS. In the next section, we will see how to use this connection and read various data from Walmart API.</p>
<h3><span id="Read_YouTube_Playlists_in_SSIS">Read Walmart API Data in SSIS</span></h3>
<p>Once we have done creating HTTP Connection Manager we can move forward to read Walmart API data inside Data Flow. So lets Configure SSIS JSON / REST API Source.</p>
<ol>
<li>Now, Drag and drop Data Flow Task from SSIS Toolbox in the currently open project and double click it to edit.<br />
<img class="yoast-text-mark" /></p>
<div style="width: 470px" class="wp-caption aligncenter"><a href="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png?resize=460%2C155&amp;ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png?resize=460%2C155&amp;ssl=1" alt="Drag and Drop Data Flow Task." width="460" height="155" /></a><p class="wp-caption-text">Drag and Drop Data Flow Task.</p></div></li>
<li>Double click on the Data Flow task to see the Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface.
<div style="width: 551px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png?w=720&amp;ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png?w=720&amp;ssl=1" alt="Drag and Drop JSON Source(REST API or File)." width="541" height="144" /></a><p class="wp-caption-text">Drag and Drop JSON Source(REST API or File).</p></div></li>
<li>Double click JSON Source and enter the following URL as below.<br />
<pre class="crayon-plain-tag">https://marketplace.walmartapis.com/v3/items?nextCursor=*&amp;offset=2000&amp;limit=20</pre>
</li>
<li>Check Use Credentials and select existing HTTP connection we have created already it.</li>
<li>Enter Following HTTP Headers. If you prefer Raw edit .. Just click on Raw Edit (#6 in screenshot) and paste below headers. Make sure to replace <strong>YourClientIdGoesHere</strong> and <strong>YourSecretGoesHere</strong><br />
<pre class="crayon-plain-tag">Content-Type: application/xml
Accept: application/xml
Authorization: Basic &lt;&lt;YourClientIdGoesHere:YourSecretGoesHere,FUN_BASE64ENC&gt;&gt;
WM_SVC.NAME: Walmart Marketplace
WM_QOS.CORRELATION_ID: TokenId_&lt;&lt;yyyy-MM-ddTHH:mm:ss.fffZ,FUN_GETDATE_UTC&gt;&gt;</pre>
&nbsp;</li>
<li>Select Array Filter (ItemResponse node) or type $.ItemResponse[*]  as below.
<div id="attachment_7420" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-json-source-configure.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7420" class="wp-image-7420 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-json-source-configure-768x765.png" alt="ZS JSON Source - Configure" width="720" height="717" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-json-source-configure-768x765.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-json-source-configure-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-json-source-configure-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-json-source-configure.png 826w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7420" class="wp-caption-text">ZS JSON Source &#8211; Configure</p></div></li>
<li>That&#8217;s it, you are ready to load Wallmart API Data into SQL Server and you can use more <a href="https://zappysys.com//onlinehelp/ssis-powerpack/index.htm#page=ssis-format-specifiers.htm" target="_blank" rel="noopener">ZappySys Destination</a> components.</li>
<li>For pagination call please click <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">here</a> for reference to this link.</li>
</ol>
<h3>Load Walmart API data into SQL Server</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>Walmart API integration using ODBC Driver (Power BI, Excel, MS Access)</h2>
<p>So far we have seen how to access Walmart API using SSIS. However there will be a time when you like to access API data inside other Apps using ODBC Driver. ZappySys Provides JSON/XML/CSV drivers for virtually any API including Walmart API. Here is how to access Walmart API using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">XML ODBC Driver</a>.</p>
<ol>
<li>Type &#8220;ODBC&#8221; in Start menu. Open ODBC Data sources (64 bit)<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-3992" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png" alt="Open ODBC Data Sources from Startup menu" width="986" height="622" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen.png 986w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-data-sources-start-up-screen-768x484.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a></li>
<li>Click Add on User DSN tab (if you need to use DSN under different Account &#8230;i.e. Service Account then click on System DSN Tab)</li>
<li>Select <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener"><strong>ZappySys XML Driver</strong></a></li>
<li>When New DSN UI shows up, Change DSN name to anything you like (e.g. WalmartAPI)</li>
<li>Click on <strong>Load ConnectionString</strong> button and enter below connection. Make sure to replace few things<br />
First <strong>######YourClientId#######</strong> with your own clientid<br />
Second <strong>######YourSecret#######</strong> with your own secret<br />
Third <strong>######Base64OfClientIdAndSecret#######</strong> with base64 encoded string of <pre class="crayon-plain-tag">clientId:Secret</pre>    (both separated with colon). You can use any site <a href="https://www.base64encode.org/" target="_blank" rel="noopener">like this one</a> to generate base64 string of your clientid and secret (seperated by &#8220;:&#8221;)<br />
<pre class="crayon-plain-tag">DRIVER={ZappySys XML Driver};
ElementsToTreatAsArray='ns2:ItemResponse';
DataPath='https://marketplace.walmartapis.com/v3/items?nextCursor=*&amp;offset=2000&amp;limit=20';
DataConnectionType=HTTP;
AuthScheme='{none}';
Url='https://marketplace.walmartapis.com/v3/items?nextCursor=*&amp;offset=2000&amp;limit=20';
TokenUrl='https://marketplace.walmartapis.com/v3/token';
TokenRequestData='grant_type=client_credentials';
TokenRequestMethod='POST';
TokenResponseContentFilter='$.access_token';
TokenRequestHeaders='Accept:application/json||Cache-Control:no-cache||WM_SVC.NAME:Walmart Marketplace||WM_QOS.CORRELATION_ID:TokenId_&lt;&lt;yyyy-MM-ddTHH:mm:ss.fffZ,FUN_GETDATE_UTC&gt;&gt;||Authorization:Basic &lt;&lt;[$userid$]:[$password$],FUN_BASE64ENC&gt;&gt;';
TokenAuthHeader='WM_SEC.ACCESS_TOKEN';
TokenResponseContentType=Json;
UserName='######YourClientId#######';
CredentialType=TokenDynamic;
Password='######YourSecret#######';
Filter='$.ns2:ItemResponses.ns2:ItemResponse[*]';
RequestMethod='GET';
RequestHeaders='Content-Type: application/xml || Accept: application/xml || Authorization: Basic ######Base64OfClientIdAndSecret####### || WM_SVC.NAME: Walmart Marketplace || WM_QOS.CORRELATION_ID: TokenId_&lt;&lt;yyyy-MM-ddTHH:mm:ss.fffZ,FUN_GETDATE_UTC&gt;&gt;'</pre>
<div id="attachment_7712" style="width: 533px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/zappysys-driver-load-connection-string.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7712" class="size-full wp-image-7712" src="https://zappysys.com/blog/wp-content/uploads/2019/07/zappysys-driver-load-connection-string.png" alt="ZappySys Driver - Load Connection String" width="523" height="499" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/zappysys-driver-load-connection-string.png 523w, https://zappysys.com/blog/wp-content/uploads/2019/07/zappysys-driver-load-connection-string-300x286.png 300w" sizes="(max-width: 523px) 100vw, 523px" /></a><p id="caption-attachment-7712" class="wp-caption-text">ZappySys Driver &#8211; Load Connection String</p></div>
<p>&nbsp;</li>
<li>Now go to preview tab and enter below query and click Run below SQL.</p><pre class="crayon-plain-tag">select * from $</pre><p>
<strong>&#8211;OR&#8211;<br />
</strong>NOTE: Change <strong>YourClientId</strong> and <strong>YourSecret</strong> in below sql before running</p><pre class="crayon-plain-tag">SELECT * FROM $
WITH(
Src='https://marketplace.walmartapis.com/v3/items?nextCursor=*&amp;offset=2000&amp;limit=20'
,Header='Content-Type: application/xml
Accept: application/xml
Authorization: Basic &lt;&lt;YourClientid:YourSecret,FUN_BASE64ENC&gt;&gt;
WM_SVC.NAME: Walmart Marketplace
WM_QOS.CORRELATION_ID: TokenId_&lt;&lt;yyyy-MM-ddTHH:mm:ss.fffZ,FUN_GETDATE_UTC&gt;&gt;'
)</pre><p>
&nbsp;</li>
</ol>
<h2>Walmart API Integration with Other BI Tools (Power BI, Excel, SSRS, MS Access&#8230;)</h2>
<div class="content_block" id="custom_post_widget-7051">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools / Database Engines / ETL Tools already there will support native / 3rd party ODBC Drivers. Below is the small list of most popular tools / programming languages our Drivers support. If your tool / programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.

&nbsp;

<img loading="lazy" decoding="async" class="" src="//zappysys.com/images/odbc-powerpack/odbc-powerpack-integration.jpg" alt="ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio / WinForm / WCF, Python, C#, VB.net, PHP. PowerShell " width="750" height="372" />
<table style="valign: top;">
<tbody>
<tr>
<td>
<p style="text-align: center;"><strong>BI / Reporting Tools
Integration</strong></p>
</td>
<td style="text-align: center;"><strong>ETL Tools
Integration
</strong></td>
<td style="text-align: center;"><strong>Programming Languages</strong>
<strong>Integration</strong></td>
</tr>
<tr>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">Microsoft Power BI</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Tableau</a></li>
 	<li><a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">SSRS (SQL Reporting Services)</a></li>
 	<li><a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">QlikView /Qlik Sense</a></li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/" target="_blank" rel="noopener">MicroStrategy</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv/" target="_blank" rel="noopener">Google Sheet</a></li>
 	<li><a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/" target="_blank" rel="noopener">Microsoft Excel</a></li>
 	<li><a href="https://zappysys.com/api/integration-hub/rest-api-connector/access?context=connector" target="_blank" rel="noopener">Microsoft Access</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica PowerCenter</a> (Windows)</li>
 	<li>Informatica Cloud</li>
 	<li>SSIS (SQL Integration Services)</li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">SQL Server</a></li>
 	<li><a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/" target="_blank" rel="noopener">Talend Data Studio</a></li>
 	<li><a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/" target="_blank" rel="noopener">Pentaho Kettle</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li>Visual Studio</li>
 	<li><a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a></li>
 	<li>C++</li>
 	<li><a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a></li>
 	<li><a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a></li>
 	<li>PHP</li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-powershell-script-export-json-csv/" target="_blank" rel="noopener">PowerShell</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">T-SQL (Using Linked Server)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
&nbsp;</div>
<h2>How to encrypt Authorization Token as Base64Encode</h2>
<ol>
<li>If you want to directly pass Authorization header Token as Base64Encode(clientId:clientSecret) encrypted in the get token call, you can encrypted it using ZS Logging task and used it. Please refer to this <a href="https://zappysys.com//onlinehelp/ssis-powerpack/index.htm#page=ssis-format-specifiers.htm" target="_blank" rel="noopener">link</a> for the same.</li>
<li>In visual studio just Drag and Drop ZS Logging Task in the design panel.
<div style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/logging-task/ssis-logging-task-drag.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/logging-task/ssis-logging-task-drag.png" alt="Drag and Drop ZS Logging Task" width="395" height="80" /></a><p class="wp-caption-text">Drag and Drop ZS Logging Task</p></div></li>
<li>Double click on ZS Logging Task to configure it.</li>
<li>In the ZS Logging Task configure like the following image.
<div id="attachment_7453" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-encrypted-authorization-token-using-zs-logging-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7453" class="wp-image-7453 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-encrypted-authorization-token-using-zs-logging-task-768x426.png" alt="Logging Task : Base64Enocde " width="720" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-encrypted-authorization-token-using-zs-logging-task-768x426.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-encrypted-authorization-token-using-zs-logging-task-300x167.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-encrypted-authorization-token-using-zs-logging-task-1024x569.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/07/ssis-walmart-encrypted-authorization-token-using-zs-logging-task.png 1050w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7453" class="wp-caption-text">Logging Task : Base64Enocde</p></div></li>
<li>That&#8217;s all, Save Base64Encoded token for use in HTTP Connection.</li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as Walmart REST API using HTTP Connection and load into SQL Server. We also learned techniques like How to get Dynamic Token using HTTP Connection. To explore many other scenarios not discussed in this article download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack from here (includes 70+ Components)</a>.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information:</p>
<ul style="list-style-type: circle;">
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/json-source.htm" target="_blank" rel="noopener">JSON Source(REST API or File)</a>, <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-logging-task.htm" target="_blank" rel="noopener">ZS Logging Task</a></li>
<li>Walmart API: <a href="https://developer.walmart.com/#/apicenter/marketPlace/latest#getToken" target="_blank" rel="noopener">HTTP Connection</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-walmart-api-data-ssis-odbc/">How to read Walmart API data in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Write/Read WordPress data using SSIS and REST API</title>
		<link>https://zappysys.com/blog/write-read-wordpress-data-using-ssis-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 26 Apr 2019 23:03:36 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Generator Transform]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6864</guid>

					<description><![CDATA[<p>Introduction In this new article, we will show how to read WordPress data using REST API. REST API is a very popular software architectural style for Web Services. SSIS is a very popular ETL software used to integrate almost any data (SQL Server, Oracle, Excel, DB2, CSV files, Big Data, Facebook, Gmail, etc). Requirements For this example, we will use a [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/write-read-wordpress-data-using-ssis-rest-api/">Write/Read WordPress data using SSIS and REST API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this new article, we will show how to read WordPress data using REST API. REST API is a very popular software architectural style for Web Services.<br />
SSIS is a very popular ETL software used to integrate almost any data (SQL Server, Oracle, <a href="https://zappysys.com/products/ssis-powerpack/ssis-excel-file-source/">Excel</a>, DB2, <a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/">CSV files</a>, Big Data, <a href="https://zappysys.com/blog/get-data-from-facebook-in-ssis-using-rest-api/">Facebook</a>, <a href="https://zappysys.com/blog/calling-gmail-rest-api-using-ssis-read-emails/">Gmail</a>, etc).</p>
<h2>Requirements</h2>
<p>For this example, we will use a popular plug-in. The name is ZappySys PowerPack for SSIS which includes some nice generic connectors to REST API. You can download it here:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/download/">ZappySys PowerPack for SSIS Installer</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017">SSDT for Business Intelligence</a></li>
</ul>
<h2>Getting started</h2>
<p>We will be using this <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> component to make things work:<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="SSIS REST API Web Service Task" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Web Service Task<br />
</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/SSIS-Json-Source-Adapter.png" alt="JSON Source (File, REST API, OData Connector)" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON Source (File, REST API, OData Connector)</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-destination-connector/" target="_blank" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-file-destination/ssis-json-file-destination.png" alt="SSIS JSON File Destination (Create JSON File)" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-destination-connector/" target="_blank" rel="noopener">SSIS JSON File Destination (Create JSON File)<br />
</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Read WordPress data using SSIS with REST API</h2>
<p>REST API is also the name of one of the ZappySys components. These tools can connect to thousands of REST API Servers. In this example, we will connect to WordPress.</p>
<ol>
<li>First, drag and drop the <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/"><strong>REST API</strong></a> task to the design pane.</li>
<li>Secondly, write the following URL in the REST API task URL:<a href="http://demo.wp-api.org/wp-json/wp/v2/pages"><br />
</a><br />
<pre class="crayon-plain-tag">http://demo.wp-api.org/wp-json/wp/v2/pages</pre>
</li>
<li>After that, press <strong>Test Request/Response.</strong></li>
<li>That URL shows the page&#8217;s information in WordPress. This is a demo API. For more information about the WordPress links, check <a href="https://developer.wordpress.org/rest-api/reference/">here</a>.
<div id="attachment_6874" style="width: 696px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-wordpress.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6874" class="size-full wp-image-6874" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-wordpress.png" alt="ssis-wordpress" width="686" height="613" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-wordpress.png 686w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-wordpress-300x268.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></a><p id="caption-attachment-6874" class="wp-caption-text">Call WordPress in SSIS</p></div></li>
<li>Next, you can also check the Tags, Comments, Categories, Posts, Taxonomies, Media. Here you have some examples:
<ul>
<li>To get the tags in WordPress, use this URL:<br />
<pre class="crayon-plain-tag">http://demo.wp-api.org/wp-json/wp/v2/tags</pre>
</li>
<li>In order to read comments in WordPress using SSIS and REST API, use this URL:<br />
<pre class="crayon-plain-tag">http://demo.wp-api.org/wp-json/wp/v2/comments</pre>
</li>
<li>For the categories, use this URL to read WordPress data using SSIS:<br />
<pre class="crayon-plain-tag">http://demo.wp-api.org/wp-json/wp/v2/categories</pre>
</li>
</ul>
</li>
<li>In addition, for your blog, you need to add /wp-json/wp/v2/ and pages, posts or tags in your WordPress URL.</li>
<li>Finally, if you want to save the results, in Response Settings, enable save response content and select the option save to file, and specify a file path:
<div id="attachment_6877" style="width: 696px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-restp-api-wordpress-save-json.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6877" class="wp-image-6877 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-restp-api-wordpress-save-json.png" alt="Wordpress response into file" width="686" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-restp-api-wordpress-save-json.png 686w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-restp-api-wordpress-save-json-300x286.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></a><p id="caption-attachment-6877" class="wp-caption-text">Save response WordPress API</p></div></li>
</ol>
<h2>How to read WordPress data using SSIS and store it into a SQL Server database</h2>
<p>In the next example, we will use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON Source</a> component. This component is similar to the REST API, but this is used in the Data Flow to save the REST API results in any destination of your preference (SQL Server, PostgreSQL, MongoDB, etc). Also, this example will read WordPress data using SSIS and store it into a SQL Server database.</p>
<ol>
<li>First of all, in the Control flow, drag and drop the Data Flow:
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Insert Data Flow" width="460" height="155" /><p class="wp-caption-text">Data Flow Task</p></div></li>
<li>Drag and drop the JSON Source in the Data flow with this configuration:
<div id="attachment_6880" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-source-get-rest-api-wordpress.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6880" class="size-full wp-image-6880" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-source-get-rest-api-wordpress.png" alt="SSIS wordpress data" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-source-get-rest-api-wordpress.png 826w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-source-get-rest-api-wordpress-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-source-get-rest-api-wordpress-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-6880" class="wp-caption-text">JSON Source to WordPress API</p></div></li>
<li>Finally, you can save to an OLEDB Destination to save into a SQL Database:
<div id="attachment_6882" style="width: 834px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-to-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6882" class="size-full wp-image-6882" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-to-sql-server.png" alt="From WordPress into SQL Server" width="824" height="718" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-to-sql-server.png 824w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-to-sql-server-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-to-sql-server-768x669.png 768w" sizes="(max-width: 824px) 100vw, 824px" /></a><p id="caption-attachment-6882" class="wp-caption-text">Store WordPress into SQL Server</p></div></li>
</ol>
<h2>How to read WordPress data using SSIS and modify the JSON structure</h2>
<p>Sometimes we need to modify the WordPress JSON output to a custom output in SSIS. We will now use the JSON Generator Transform this time, which is a very powerful tool for this purpose.</p>
<ol>
<li>First of all, we will use the JSON Source connecting to the following<br />
<pre class="crayon-plain-tag">URL: http://demo.wp-api.org/wp-json/wp/v2/categories</pre>
</li>
<li>Secondly, we need to convert the JSON output to the following format:<br />
<pre class="crayon-plain-tag">{
   "id" : 
     {
         "count" : 1474359596826126768,
         "description" : 
          {
            "link" : "xxx"
          }
    }
}</pre>
</li>
<li>Next, we will add an element first:
<div id="attachment_6885" style="width: 744px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-static-value.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6885" class="size-full wp-image-6885" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-static-value.png" alt="Add custom JSON in SSIS" width="734" height="326" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-static-value.png 734w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-add-static-value-300x133.png 300w" sizes="(max-width: 734px) 100vw, 734px" /></a><p id="caption-attachment-6885" class="wp-caption-text">SSIS WordPress API</p></div></li>
<li>Also, we will select the id attribute:
<div id="attachment_6942" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-id-add-attribute.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6942" class="size-full wp-image-6942" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-id-add-attribute.png" alt="SSIS id JSON" width="395" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-id-add-attribute.png 395w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-id-add-attribute-271x300.png 271w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-6942" class="wp-caption-text">id attributes SSIS</p></div></li>
<li>In addition, we will add a static element to the id:
<div id="attachment_6944" style="width: 743px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-mapping-add-element.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6944" class="size-full wp-image-6944" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-mapping-add-element.png" alt="Increment an element in JSON with SSIS" width="733" height="267" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-mapping-add-element.png 733w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-json-mapping-add-element-300x109.png 300w" sizes="(max-width: 733px) 100vw, 733px" /></a><p id="caption-attachment-6944" class="wp-caption-text">Add JSON element</p></div></li>
<li>Furthermore, we will add the count element.
<div id="attachment_6943" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-count.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6943" class="size-full wp-image-6943" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-count.png" alt="SSIS generate JOSN" width="395" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-count.png 395w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-count-271x300.png 271w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-6943" class="wp-caption-text">Add element in JSON with SSIS</p></div></li>
<li>Finally, repeat the same process for the description and link. The JSON structure will be the following:</li>
</ol>
<h2>How to read WordPress data using SSIS and use pagination</h2>
<p>If it is a lot of data in REST API, pagination allows showing the results in pages. Let&#8217;s take a look at it.</p>
<ol>
<li>First of all, we will use page 2. To do it, we will use the following URL in the JSON Source task in the data flow:<br />
<pre class="crayon-plain-tag">http://demo.wp-api.org/wp-json/wp/v2/posts?per_page=2</pre>
<div id="attachment_6947" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6947" class="size-full wp-image-6947" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-pagination.png" alt="Wordpress Pagination SSIS" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-pagination.png 826w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-pagination-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-api-pagination-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-6947" class="wp-caption-text">SSIS URL pagination REST API</p></div></li>
<li>Secondly, there is a pagination tab that can be used to get the data using pagination. For more information about pagination, refer to our ZappySys <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/">Pagination article related</a>.
<div id="attachment_6949" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-per-page-pagination-wordpress.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6949" class="size-full wp-image-6949" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-per-page-pagination-wordpress.png" alt="Pagination handled in SSIS for WordPress" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-per-page-pagination-wordpress.png 826w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-per-page-pagination-wordpress-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-per-page-pagination-wordpress-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-6949" class="wp-caption-text">SSIS pagination in SSIS</p></div></li>
</ol>
<h2>How to write WordPress data using SSIS</h2>
<ol>
<li>In order to write WordPress data using SSIS, we will use the REST API task with the following URL:<br />
<pre class="crayon-plain-tag">POST http://demo.wp-api.org/wp-json/wp/v2/posts/</pre>
</li>
<li>Secondly, we have the post with id equal to 2 and we will use the body request as follows:<a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-write-data.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-6951" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-write-data.png" alt="" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-write-data.png 800w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-write-data-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-wordpress-write-data-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a></li>
</ol>
<h2>Conclusion</h2>
<p>To conclude, in this article, we learned how to write and read WordPress data using SSIS. In addition, we learned also how to get pagination and how to change the format of the JSON results. If you want to try it yourself, do not hesitate to <a href="https://zappysys.com/products/ssis-powerpack/download/">download ZappySys PowerPack</a>!</p>
<h2>References</h2>
<p>Finally, for more information about how to read WordPress Data using SSIS, refer to these links:</p>
<ul>
<li><a href="https://developer.wordpress.org/rest-api/reference/">REST API Handbook</a></li>
<li><a href="https://www.youtube.com/watch?v=rGObWtjxGBc&amp;t=296s">WordPress REST API Tutorial (Real Examples)</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/write-read-wordpress-data-using-ssis-rest-api/">Write/Read WordPress data using SSIS and REST API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read / Write Shopify data in SSIS (REST API)</title>
		<link>https://zappysys.com/blog/read-write-shopify-data-ssis-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 18 Jan 2019 18:03:12 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[Shopify]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6116</guid>

					<description><![CDATA[<p>Introduction In our previous article, we saw how to call REST API in SSIS. Now in let&#8217;s use that knowledge and learn how to read/write Shopify data in SSIS. If you are not aware of Shopify then its one of the most popular eCommerce platforms out there for small shops who sell online. Shopify provides [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-write-shopify-data-ssis-rest-api/">Read / Write Shopify data in SSIS (REST API)</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/2019/01/shopify-logo.jpg"><img loading="lazy" decoding="async" class="wp-image-6239 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-logo.jpg" alt="" width="169" height="148" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-logo.jpg 388w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-logo-300x263.jpg 300w" sizes="(max-width: 169px) 100vw, 169px" /></a>In our previous article, we saw how to <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">call REST API in SSIS</a>. Now in let&#8217;s use that knowledge and learn how to read/write Shopify data in SSIS. If you are not aware of <a href="https://www.shopify.com/" target="_blank" rel="noopener">Shopify</a> then its one of the most popular eCommerce platforms out there for small shops who sell online. Shopify provides a total framework to sell/fulfill orders online including tools to build/customize your own web store.</p>
<p>In this article we will see few examples on how to call basic REST API calls to read shopify data, delete shopify data and write shopify data using various SSIS Components.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Create Shopify Custom App for Shopify Admin API</h2>
<p>Before accessing Shopify API you must create Custom App (and then obtain Access Token)</p>
<h3>New approach (Custom App) to generate App Credentials for Rest API Call</h3>
<p>Before you call Shopify REST API, your first step is to obtain credentials. We will need Access Token or Storefront Access Token. We will use it in later section to call Shopify REST API.</p>
<ol>
<li>First, in Shopify, go to sore Settings (Click Gear Icon) &gt;  <strong>Apps and sales channels</strong> &gt; click <strong><strong><strong>Develop apps for your Store</strong><br />
</strong></strong> OR just navigate to URL<br />
<pre class="crayon-plain-tag">https://{your-store}.myshopify.com/admin/settings/apps/development</pre>
<div id="attachment_9873" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_apps_dev.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9873" class="wp-image-9873 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_apps_dev.png" alt="Shopify App and Sales Channel" width="1033" height="519" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_apps_dev.png 1033w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_apps_dev-300x151.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_apps_dev-768x386.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_apps_dev-1024x514.png 1024w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-9873" class="wp-caption-text">Shopify App and Sales Channel</p></div>
<p><strong> </strong></li>
<li>In <strong>App development</strong>, click on <strong><strong><strong><strong>Create an app<br />
</strong></strong></strong></strong></p>
<div id="attachment_9875" style="width: 986px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_create_app-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9875" class="size-full wp-image-9875" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_create_app-1.png" alt="" width="976" height="461" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_create_app-1.png 976w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_create_app-1-300x142.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_create_app-1-768x363.png 768w" sizes="(max-width: 976px) 100vw, 976px" /></a><p id="caption-attachment-9875" class="wp-caption-text">Shopify Create an App</p></div>
<p><strong><strong> </strong></strong></li>
<li>Provide the appropriate name for your custom app.
<div id="attachment_9876" style="width: 632px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_name.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9876" class="wp-image-9876 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_name.png" alt="" width="622" height="386" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_name.png 622w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_name-300x186.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_name-436x272.png 436w" sizes="(max-width: 622px) 100vw, 622px" /></a><p id="caption-attachment-9876" class="wp-caption-text">Shopify Custom App Name</p></div>
<p>&nbsp;</li>
<li>Once we created the app name, we have 2 options to create <strong>Admin API</strong> or <strong>Storefront API</strong> in the Overview tab.<a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_scope_configuration.png"><img loading="lazy" decoding="async" class="wp-image-9877 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_scope_configuration.png" alt="" width="976" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_scope_configuration.png 976w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_scope_configuration-300x182.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_app_scope_configuration-768x467.png 768w" sizes="(max-width: 976px) 100vw, 976px" /></a>                                                                               Shopify App Scopes and Configuration</li>
<li>Click on Configure Admin API scopes or Configure Storefront API scopes based on your need as shown in the above screenshot.</li>
<li>If click on Configure Admin API scopes, then select the appropriate scopes for your Admin API.</li>
<li>Also, change orders, transactions, and fulfilments permissions to read and write if you need to create, update and delete products.</li>
<li>In addition, change the products, variants, and collections to read and write if you need to create, update and delete products.
<div id="attachment_9878" style="width: 941px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_scope.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9878" class="wp-image-9878 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_scope.png" alt="" width="931" height="582" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_scope.png 931w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_scope-300x188.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_scope-768x480.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_scope-436x272.png 436w" sizes="(max-width: 931px) 100vw, 931px" /></a><p id="caption-attachment-9878" class="wp-caption-text">Shopify Admin Api Scope</p></div>
<p>&nbsp;</li>
<li>After saving it, it asks to install app and generate Shopify Access Token for your Admin API.
<div id="attachment_9879" style="width: 988px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_install_app.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9879" class="size-full wp-image-9879" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_install_app.png" alt="" width="978" height="845" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_install_app.png 978w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_install_app-300x259.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_install_app-768x664.png 768w" sizes="(max-width: 978px) 100vw, 978px" /></a><p id="caption-attachment-9879" class="wp-caption-text">Shopify Admin Install App</p></div>
<p>&nbsp;</p>
<div id="attachment_9880" style="width: 586px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_access_token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9880" class="size-full wp-image-9880" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_access_token.png" alt="" width="576" height="286" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_access_token.png 576w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_admin_api_access_token-300x149.png 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><p id="caption-attachment-9880" class="wp-caption-text">Shopify Admin Access Token</p></div></li>
<li>If click at Configure Storefront API scopes, then select the appropriate scopes for your Storefront API.</li>
<li>Also, change orders, transactions, and fulfilments permissions to read and write if you need to create, update and delete products.</li>
<li>In addition, change the products, variants, and collections to read and write if you need to create, update and delete products.
<div id="attachment_9887" style="width: 929px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shpoify-storefront-api-scope.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9887" class="size-full wp-image-9887" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shpoify-storefront-api-scope.png" alt="" width="919" height="786" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shpoify-storefront-api-scope.png 919w, https://zappysys.com/blog/wp-content/uploads/2019/01/shpoify-storefront-api-scope-300x257.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shpoify-storefront-api-scope-768x657.png 768w" sizes="(max-width: 919px) 100vw, 919px" /></a><p id="caption-attachment-9887" class="wp-caption-text">Shopify Storefront API Scope</p></div>
<p>&nbsp;</li>
<li>After saving it, it asks to install app and generate Shopify Storefront Access Token for your Admin API shown above screenshot.
<div id="attachment_9881" style="width: 948px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_storefront_install_app.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9881" class="size-full wp-image-9881" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_storefront_install_app.png" alt="" width="938" height="479" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_storefront_install_app.png 938w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_storefront_install_app-300x153.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify_storefront_install_app-768x392.png 768w" sizes="(max-width: 938px) 100vw, 938px" /></a><p id="caption-attachment-9881" class="wp-caption-text">Shopify Storefront Install App</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div id="attachment_9882" style="width: 941px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9882" class="size-full wp-image-9882" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token.png" alt="" width="931" height="533" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token.png 931w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-300x172.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-768x440.png 768w" sizes="(max-width: 931px) 100vw, 931px" /></a><p id="caption-attachment-9882" class="wp-caption-text">Shopify Storefront Access Token</p></div>
<p>&nbsp;</li>
<li> We have created Admin API Access Token and Storefront API Access Token to access the Shopify APIs.
<div id="attachment_9885" style="width: 908px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-api-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9885" class="size-full wp-image-9885" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-api-credentials.png" alt="" width="898" height="832" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-api-credentials.png 898w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-api-credentials-300x278.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-api-credentials-768x712.png 768w" sizes="(max-width: 898px) 100vw, 898px" /></a><p id="caption-attachment-9885" class="wp-caption-text">Shopify API Credentials</p></div></li>
</ol>
<h3>Old approach (Private App) to generate App Credentials for Rest API Call</h3>
<p>Before you call Shopify REST API, your first step is to obtain credentials. We will need API Key and Password. We will use it in later section to call shopify REST API.</p>
<ol>
<li>First, in Shopify, go to<strong> Apps</strong> and click <strong>Manage private apps</strong>.
<div id="attachment_6122" style="width: 798px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6122" class="wp-image-6122 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-1.png" alt="Manager private apps in Shopify" width="788" height="322" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-1.png 788w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-1-300x123.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-1-768x314.png 768w" sizes="(max-width: 788px) 100vw, 788px" /></a><p id="caption-attachment-6122" class="wp-caption-text">Shopify App &#8211; Manager private apps</p></div></li>
<li> Secondly, In Private apps, click the <strong><strong><strong>Create a new private app:</strong></strong></strong>
<div id="attachment_6123" style="width: 790px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6123" class="wp-image-6123 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-2.png" alt="Create a new Shopify private app" width="780" height="498" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-2.png 780w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-2-300x192.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-create-private-app-2-768x490.png 768w" sizes="(max-width: 780px) 100vw, 780px" /></a><p id="caption-attachment-6123" class="wp-caption-text">Shopify Private apps</p></div></li>
<li>Also, change orders, transactions, and fulfilments permissions to read and write if you need to create, update and delete products.</li>
<li>In addition, change the products, variants, and collections to read and write if you need to create, update and delete products.
<div id="attachment_6121" style="width: 946px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-private-oauth-app-edit-permissions.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6121" class="wp-image-6121 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-private-oauth-app-edit-permissions.png" alt="Also change to read and write permissions" width="936" height="818" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-private-oauth-app-edit-permissions.png 936w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-private-oauth-app-edit-permissions-300x262.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-private-oauth-app-edit-permissions-768x671.png 768w" sizes="(max-width: 936px) 100vw, 936px" /></a><p id="caption-attachment-6121" class="wp-caption-text">Permission for private apps.</p></div></li>
<li>Finally, you will have an API key, a password, an URL and a shared  secret that you will use in the next section:</li>
</ol>
<div id="attachment_6120" style="width: 628px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-view-oauth-app-api-key-secret-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6120" class="wp-image-6120 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-view-oauth-app-api-key-secret-credentials.png" alt="Shopify password" width="618" height="830" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-view-oauth-app-api-key-secret-credentials.png 618w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-view-oauth-app-api-key-secret-credentials-223x300.png 223w" sizes="(max-width: 618px) 100vw, 618px" /></a><p id="caption-attachment-6120" class="wp-caption-text">Shopify API key</p></div>
<p>&nbsp;</p>
<h2>Read Shopify data in SSIS (Get Orders Example)</h2>
<p>So in this section we will learn how to call Shopify REST API.  For example purpose we will call <a href="https://help.shopify.com/en/api/reference/orders/order" target="_blank" rel="noopener">Shopify Orders Endpoint</a>. For all other REST API endpoints <a href="https://help.shopify.com/en/api/reference" target="_blank" rel="noopener">check this link</a>. Read carefully which parameters you can pass for each API call. So let&#8217;s read shopify orders using sample API call.</p>
<h3>Configure SSIS JSON Source to read from Shopify</h3>
<p>Now, that we created an App in Shopify, the rest is easy.</p>
<ol>
<li>First, in an SSIS project, drag and drop the Data Flow and double click it.
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="Drag the Data flow task" width="460" height="155" /><p class="wp-caption-text">Use the Data Flow</p></div></li>
<li>Secondly, in the Data Flow, drag and drop the ZS JSON Source.
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" width="541" height="144" /><p class="wp-caption-text">SSIS JSON Source &#8211; Drag and Drop</p></div></li>
<li>Double-click on JSON Source to configure it.If you are not familiar with ZS JSON Source, check <a href="https://www.youtube.com/watch?time_continue=4&amp;v=t4fSghbSZLo">this link.</a><br />
<strong>New approach to establish the HTTP Connection Manager</strong></p>
<p><strong>Using Admin API Access token</strong></p>
<ol>
<li>Enter URL for the API you like to call. For Example, you can enter<br />
<pre class="crayon-plain-tag">https://{your-store}.myshopify.com/admin/api/2022-10/products.json</pre>
</li>
<li>Check Use Credentials and click on NEW-HTTP connection as shown below,</li>
<li>On HTTP Connection Manager you can enter some URL (it will be ignored and use JSON Source URL above)</li>
<li>Choose Credentials Type as <strong>Static Token / API Key</strong></li>
<li>In the Token / Key text box enter your <strong>Admin API Key</strong> (obtained from the previous section)</li>
<li>In the Auth Header Name enter <pre class="crayon-plain-tag">X-Shopify-Access-Token</pre></li>
<li>In the <strong>Auth Scheme</strong> select <strong><strong>{none}</strong></strong>&nbsp;
<div id="attachment_9889" style="width: 841px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-admin-access-token-http-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9889" class="size-full wp-image-9889" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-admin-access-token-http-connection.png" alt="" width="831" height="692" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-admin-access-token-http-connection.png 831w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-admin-access-token-http-connection-300x250.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-admin-access-token-http-connection-768x640.png 768w" sizes="(max-width: 831px) 100vw, 831px" /></a><p id="caption-attachment-9889" class="wp-caption-text">SSIS JSON Source Admin API HTTP Connection Manager</p></div>
<p><strong>  </strong></li>
</ol>
</li>
<li>Also, press the <strong>Select Filter</strong> button and press the orders node:
<div id="attachment_6127" style="width: 592px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-select-filter.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6127" class="wp-image-6127 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-select-filter.png" alt="filter in ssis to get shopify data" width="582" height="288" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-select-filter.png 582w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-select-filter-300x148.png 300w" sizes="(max-width: 582px) 100vw, 582px" /></a><p id="caption-attachment-6127" class="wp-caption-text">SSIS Shopify filter</p></div></li>
<li>Now go to Pagination Tab and select <strong>RFC5988 Pagination mode</strong> as below. <a href="https://help.shopify.com/en/api/guides/paginated-rest-results" target="_blank" rel="noopener">Check this link for more info on Shopify Paginated API calls</a>.
<div id="attachment_3917" style="width: 690px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-link-header-pagination-rfc5988-options.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3917" class="size-full wp-image-3917" src="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-link-header-pagination-rfc5988-options.png" alt="Link Header Pagination Method (RFC 5988)" width="680" height="106" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-link-header-pagination-rfc5988-options.png 680w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-link-header-pagination-rfc5988-options-300x47.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></a><p id="caption-attachment-3917" class="wp-caption-text">Link Header Pagination Method (RFC 5988)</p></div>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE:  For Older API use Cursor-based pagination as below (version 2019-07 or older). </div></div>
<div id="attachment_6126" style="width: 680px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-rest-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6126" class="wp-image-6126 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-rest-api-pagination.png" alt="SSIS JSON API pagination" width="670" height="629" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-rest-api-pagination.png 670w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-rest-api-pagination-300x282.png 300w" sizes="(max-width: 670px) 100vw, 670px" /></a><p id="caption-attachment-6126" class="wp-caption-text">SSIS pagination for Shopify</p></div></li>
<li>Finally, make sure to the Use Credentials option and select the http connection of the step 2 and press the Preview button to see the data:</li>
</ol>
<div id="attachment_6125" style="width: 926px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-read-rest-api-orders-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6125" class="wp-image-6125 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-read-rest-api-orders-example.png" alt="Get Shopify data in SSIS" width="916" height="719" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-read-rest-api-orders-example.png 916w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-read-rest-api-orders-example-300x235.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-read-rest-api-orders-example-768x603.png 768w" sizes="(max-width: 916px) 100vw, 916px" /></a><p id="caption-attachment-6125" class="wp-caption-text">SSIS preview Shopify data</p></div>
<p>&nbsp;</p>
<h3>Load Shopify data into SQL Server / Other Target</h3>
<div class="content_block" id="custom_post_widget-5617"><p>ZappySys SSIS PowerPack makes it easy to load data from various sources such as REST, SOAP, JSON, XML, CSV or from other source into SQL Server, or PostgreSQL, or Amazon Redshift, or other  targets. The <strong>Upsert Destination</strong> component allows you to automatically insert new records and update existing ones based on key columns. Below are the detailed steps to configure it.</p>
<h3>Step 1: Add Upsert Destination to Data Flow</h3>
<ol>
<li>Drag and drop the <strong>Upsert Destination</strong> component from the SSIS Toolbox.</li>
<li>Connect your source component (e.g., JSON / REST / Other Source) to the Upsert Destination.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" /></a>
<p class="wp-caption-text">SSIS - Data Flow - Drang and Drop Upsert Destination Component</p>
</div>
<h3>Step 2: Configure Target Connection</h3>
<ol>
<li>Double-click the <strong>Upsert Destination</strong> component to open the configuration window.</li>
<li>Under <strong>Connection</strong>, select an existing target connection or click <strong>NEW</strong> to create a new connection.
<ul>
<li>Example: SQL Server, or PostgreSQL, or Amazon Redshift.</li>
</ul>
</li>
</ol>
<h3>Step 3: Select or Create Target Table</h3>
<ol>
<li>In the <strong>Target Table</strong> dropdown, select the table where you want to load data.</li>
<li>Optionally, click <strong>NEW</strong> to create a new table based on the source columns.</li>
</ol>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-configuration.png" /></a>
<p class="wp-caption-text">Configure SSIS Upsert Destination Connection - Loading data (REST / SOAP / JSON / XML /CSV) into SQL Server or other target using SSIS</p>
</div>
<h3>Step 4: Map Columns</h3>
<ol>
<li>Go to the <strong>Mappings</strong> tab.</li>
<li>Click <strong>Auto Map</strong> to map source columns to target columns by name.</li>
<li>Ensure you <strong>check the Primary key column(s)</strong> that will determine whether a record is inserted or updated.</li>
<li>You can manually adjust the mappings if necessary.</li>
</ol>
 <div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2020/09/upsert-destination-key.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination - Columns Mappings</p>
</div>
<h3>Step 5: Save Settings</h3>
<ul>
<li>Click <strong>OK</strong> to save the Upsert Destination configuration.</li>
</ul>
<h3>Step 6: Optional: Add Logging or Analysis</h3>
<ul>
<li>You may add extra destination components to log the number of inserted vs. updated records for monitoring or auditing purposes.</li>
</ul>
<h3>Step 7: Execute the Package</h3>
<ul>
<li>Run your SSIS package and verify that the data is correctly inserted and updated in the target table.</li>
</ul>
<div class="wp-caption aligncenter">
<a href="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png">
<img loading="lazy" decoding="async" class="size-full" alt="" src="https://zappysys.com/blog/wp-content/uploads/2018/12/ssis-upsert-destination-execute.png" /></a>
<p class="wp-caption-text">SSIS Upsert Destination Execution</p>
</div></div>
<h2>Write Shopify data in SSIS REST API Task</h2>
<p>In this new example, we will write Shopify data in SSIS. In addition, we will create a new order using REST API to write Shopify data in SSIS.</p>
<ol>
<li>First, use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">REST API task</a> in SSDT.</li>
<li>Secondly, in the REST API use the http connection created on step 2 of the read Shopify data in SSIS.  Also, in HTTP Request Method, select <strong>POST</strong>, in Body (Request Data) write the following:<br />
<pre class="crayon-plain-tag">{
  "order": {
    "line_items": [
      {
        "title": "Big Brown Bear Boots",
        "price": 74.99,
        "grams": "1300",
        "quantity": 3,
        "tax_lines": [
          {
            "price": 13.5,
            "rate": 0.06,
            "title": "State tax"
          }
        ]
      }
    ],
    "transactions": [
      {
        "kind": "sale",
        "status": "success",
        "amount": 238.47
      }
    ],
    "total_tax": 13.5,
    "currency": "EUR"
  }
}</pre>
<div id="attachment_6217" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-post.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6217" class="size-full wp-image-6217" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-post.png" alt="write shopify data in ssis" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-post.png 800w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-post-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-post-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-6217" class="wp-caption-text">Post JSON order Shopify</p></div>
<p>&nbsp;</li>
<li>If you dont like to use URL supplied in HTTP Connection manager then just check override URL option and enter URL like below. For this example we used correct URL in HTTP connection manager so we will not override URL.<br />
<pre class="crayon-plain-tag">https://{{your-store}}.myshopify.com/admin/orders.json</pre></li>
<li>Now you can click on Test Request / Response and you will see one sample order created in your admin portal.</li>
<li>You can supply variables in Body by clicking on Insert Variable dropdown when you edit Body.</li>
</ol>
<h2>Calling Storefront API</h2>
<p>In our previous section, we saw how to call ADMIN API which is the most common API you will use in most cases to read / write store data. However if you have a need to call <a href="https://shopify.dev/api/storefront" target="_blank" rel="noopener">Storefront API</a>  instead then configure HTTP Connection as below</p>
<ol>
<li>For Store Front API call you can follow the same steps as the previous section except for few things on HTTP Connection Manager UI</li>
<li>In API Key enter <strong>Storefront API Access Token</strong> (rather than Admin Token)</li>
<li>In the Auth Header Name enter <pre class="crayon-plain-tag">X-Shopify-Storefront-Access-Token</pre>
<div id="attachment_9890" style="width: 1081px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-http-connection-manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9890" class="size-full wp-image-9890" src="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-http-connection-manager.png" alt="" width="1071" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-http-connection-manager.png 1071w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-http-connection-manager-300x185.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-http-connection-manager-768x474.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/01/shopify-storefront-access-token-http-connection-manager-1024x632.png 1024w" sizes="(max-width: 1071px) 100vw, 1071px" /></a><p id="caption-attachment-9890" class="wp-caption-text">SSIS JSON Source Storefront HTTP Connection Manager</p></div></li>
</ol>
<h2>Legacy Approach &#8211; Using Basic Auth</h2>
<p>If you created Shopify PrivateApp (before they introduced the new CustomApp approach) then your HTTP Connection needs to be like below. Use Basic Auth for Credentials Type</p>
<ol>
<li><strong><strong>Using approaches to establish the HTTP Connection Manager</strong></strong>&nbsp;
<div id="attachment_6124" style="width: 791px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-api-connection-basic-authentication.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6124" class="wp-image-6124 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-api-connection-basic-authentication.png" alt="ssis shopify connection" width="781" height="588" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-api-connection-basic-authentication.png 781w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-api-connection-basic-authentication-300x226.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-api-connection-basic-authentication-768x578.png 768w" sizes="(max-width: 781px) 100vw, 781px" /></a><p id="caption-attachment-6124" class="wp-caption-text">SSIS JSON Source HTTP connection</p></div></li>
</ol>
<h2>Create Multiple Shopify records using Web API Destination</h2>
<p>With our ZS Web API destination, it is possible to create multiple records at the same time.  The following link shows the ZS Web API Destination information:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/">SSIS Web API destination</a></li>
</ul>
<p>Here are few useful articles to explain Web API destination use case.</p>
<p><a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/" target="_blank" rel="noopener">How to POST data to URL</a></p>
<p><a href="https://zappysys.com/blog/category/ssis/components/ssis-web-api-destination/" target="_blank" rel="noopener">Few other articles</a></p>
<h2>Delete Shopify records using REST API in SSIS</h2>
<ol>
<li>First, in SSDT, drag and drop the ZS REST API task.</li>
<li>Secondly, add the HTTP Url Connection.  Use the <strong>DELETE </strong>HTTP Request Method and the URL including the order id as below:<br />
<pre class="crayon-plain-tag">https://{{your-store}}.myshopify.com/admin/orders/{{orderid}}</pre>
<div id="attachment_6222" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-delete.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6222" class="size-full wp-image-6222" src="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-delete.png" alt="Shopify API in SSIS" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-delete.png 800w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-delete-300x245.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/01/ssis-shopify-delete-768x628.png 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-6222" class="wp-caption-text">SSIS delete data in Shopify using REST API call</p></div>
<p>&nbsp;</li>
<li>Now click Test Request / Response to test delete API call.</li>
</ol>
<h2>Conclusion</h2>
<p>In this article, we learned how to create a Shopify app. In addition, we learned how to connect to Shopify using SSIS with the ZappySys tools. Also, we learned to use ZappySys tools in SSIS to get, write and delete information.</p>
<h2>References</h2>
<p>Finally, for more information, refer to these links:</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">ZappySys SSIS JSON Source</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">ZappySys SSIS REST API task</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-write-shopify-data-ssis-rest-api/">Read / Write Shopify data in SSIS (REST API)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call REST API in MicroStrategy (JSON / XML SOAP)</title>
		<link>https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 13 Oct 2018 21:19:14 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - MicroStrategy]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[MicroStrategy]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5181</guid>

					<description><![CDATA[<p> Introduction In this new article, we will show how to call REST API in MicroStrategy. MicroStrategy is a Business Intelligence company that provides powerful software to create nice charts, reports to take decisions. It started in 1993 and now it is one of the most popular Business Intelligence tools in the world because it is simple, intuitive and friendly. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/">How to call REST API in MicroStrategy (JSON / XML SOAP)</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/2018/10/microstrategy-logo.png"><img loading="lazy" decoding="async" class=" wp-image-5187 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo.png" alt="MicroStrategy logo" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo.png 225w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-logo-150x150.png 150w" sizes="(max-width: 86px) 100vw, 86px" /></a>In this new article, we will show how to call REST API in MicroStrategy. MicroStrategy is a Business Intelligence company that provides powerful software to create nice charts, reports to take decisions. It started in 1993 and now it is one of the most popular Business Intelligence tools in the world because it is simple, intuitive and friendly. Also, It can connect to almost any database. We will use ZappySys ODBC PowerPack. Zappysys ODBC is a pretty nice software used to connect to REST API.  ZappySys ODBC is an excellent plugin for MicroStrategy, because, with this plugin, you can connect to almost any application that supports REST API.</p>
<h2>Requirements</h2>
<ol>
<li>First of all, we will need <a href="https://www.microstrategy.com/us/get-started/desktop" target="_blank" rel="noopener">MicroStrategy Desktop</a> installed.</li>
<li>Secondly, you will require <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack for ODBC</a> installed.</li>
</ol>
<h2>Getting started</h2>
<p>First of all, we will need to configure the ODBC ZappySys to connect to REST API. Once the ODBC connection is created, we will invoke the ODBC connection in Microstrategy.</p>
<h3>Configuring the ODBC Zappysys</h3>
<ol>
<li>Search &#8220;odbc&#8221; in start menu and select <strong>ODBC Data sources (64-bit)</strong></li>
<li>First of all, we will open the ODBC Data Source Administrator in the <strong>System DSN</strong> and press Add:
<div id="attachment_5190" style="width: 599px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5190" class="size-full wp-image-5190" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source.jpg" alt="Driver to connect to REST API" width="589" height="319" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source.jpg 589w, https://zappysys.com/blog/wp-content/uploads/2018/10/ODBC-Data-source-add-data-source-300x162.jpg 300w" sizes="(max-width: 589px) 100vw, 589px" /></a><p id="caption-attachment-5190" class="wp-caption-text">ODBC Connect to REST API</p></div>
<div class="su-note"  style="border-color:#e5da9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff4b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Use 64 bits if your machine supports it.</div></div></li>
<li>Secondly, add a new ZappySys JSON Driver:
<div id="attachment_5191" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5191" class="size-full wp-image-5191" src="https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source.jpg" alt="ODBC driver list" width="463" height="350" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source.jpg 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/select-zappysys-json-driver-data-source-300x227.jpg 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5191" class="wp-caption-text">List of drivers supported</p></div></li>
<li>Also, we will add the following URL to the Simple View:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
<div id="attachment_5193" style="width: 805px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5193" class="size-full wp-image-5193" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration.jpg" alt="Configuration to connect to REST" width="795" height="619" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration.jpg 795w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration-300x234.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-url-configuration-768x598.jpg 768w" sizes="(max-width: 795px) 100vw, 795px" /></a><p id="caption-attachment-5193" class="wp-caption-text">ODBC configuration to connect to REST API</p></div></li>
</ol>
<h3>Configuring MicroStrategy</h3>
<ol>
<li>In MicroStrategy Desktop, press the <strong>New Dossier</strong> button:
<div id="attachment_5194" style="width: 1101px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5194" class="size-full wp-image-5194" src="https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier.jpg" alt="call REST API in Microstrategy" width="1091" height="427" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier.jpg 1091w, https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier-300x117.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier-768x301.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/new-dossier-1024x401.jpg 1024w" sizes="(max-width: 1091px) 100vw, 1091px" /></a><p id="caption-attachment-5194" class="wp-caption-text">Create a new dossier in MicroStrategy</p></div></li>
<li>Secondly, in the Dossier, press the <strong>New Data</strong> button:
<div id="attachment_5195" style="width: 1098px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5195" class="size-full wp-image-5195" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data.jpg" alt="Use MicroStrategy to add new data" width="1088" height="506" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data.jpg 1088w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data-300x140.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data-768x357.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-new-data-1024x476.jpg 1024w" sizes="(max-width: 1088px) 100vw, 1088px" /></a><p id="caption-attachment-5195" class="wp-caption-text">Add new data in Microstrategy</p></div></li>
<li>Also, in Data Sources select <strong>Databases</strong>:
<div class="mceTemp"></div>
<div id="attachment_5198" style="width: 1010px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5198" class="size-full wp-image-5198" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases.jpg" alt="Use MicroStrategy to connect to Databases" width="1000" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases.jpg 1000w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases-300x134.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstratege-data-sources-databases-768x342.jpg 768w" sizes="(max-width: 1000px) 100vw, 1000px" /></a><p id="caption-attachment-5198" class="wp-caption-text">Select the option to connect to Databases in Microstrategy</p></div></li>
<li>In addition, select the option to <strong>Type a Query</strong>:
<div id="attachment_5197" style="width: 517px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5197" class="size-full wp-image-5197" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query.jpg" alt="MicroStrategy query" width="507" height="388" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query.jpg 507w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-type-a-query-300x230.jpg 300w" sizes="(max-width: 507px) 100vw, 507px" /></a><p id="caption-attachment-5197" class="wp-caption-text">Create a query to get Database data</p></div></li>
<li>Next, in Data Sources press the <strong>+</strong> icon:
<div id="attachment_5199" style="width: 336px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5199" class="size-full wp-image-5199" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources.jpg" alt="Data sources in MicroStrategy" width="326" height="73" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources.jpg 326w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-data-sources-300x67.jpg 300w" sizes="(max-width: 326px) 100vw, 326px" /></a><p id="caption-attachment-5199" class="wp-caption-text">Add Data Source in MicroStrategy</p></div></li>
<li>Finally, in Data Source, select DSN Data Sources and select the data source created in the previous section using the ZappySys ODBC Driver. In version, select <strong>Generic DBMS</strong> and write any username and password:
<div id="attachment_5201" style="width: 539px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5201" class="size-full wp-image-5201" src="https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source.jpg" alt="Select DSN and type of connection" width="529" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source.jpg 529w, https://zappysys.com/blog/wp-content/uploads/2018/10/select-data-source-300x196.jpg 300w" sizes="(max-width: 529px) 100vw, 529px" /></a><p id="caption-attachment-5201" class="wp-caption-text">Select DSN, version</p></div></li>
</ol>
<h3>Call REST API in MicroStrategy</h3>
<ol>
<li>You can write different queries using the ZappySys ODBC Driver. The driver supports SQL queries to REST API data including WHERE clauses, GROUP BY, HAVING, ORDER BY, LIMIT WITH:<br />
<pre class="crayon-plain-tag">SELECT ShipName FROM value  
WHERE ShipName="Around the Horn"</pre>
<div id="attachment_5203" style="width: 925px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5203" class="size-full wp-image-5203" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables.jpg" alt="Call REST API in MicroStrategy" width="915" height="464" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables.jpg 915w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables-300x152.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-tables-tables-768x389.jpg 768w" sizes="(max-width: 915px) 100vw, 915px" /></a><p id="caption-attachment-5203" class="wp-caption-text">Query to REST API using MicroStrategy</p></div></li>
<li>Secondly, you can connect online (Live) or use an in-memory Dataset:
<div id="attachment_5204" style="width: 471px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5204" class="size-full wp-image-5204" src="https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy.jpg" alt="Connect in MicroStrategy live or in-memory dataset" width="461" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy.jpg 461w, https://zappysys.com/blog/wp-content/uploads/2018/10/connect-live-import-in-memory-microstrategy-300x225.jpg 300w" sizes="(max-width: 461px) 100vw, 461px" /></a><p id="caption-attachment-5204" class="wp-caption-text">MicroStrategy connect Live</p></div></li>
<li>Finally, you can use the data for your MicroStrategy reports:
<div id="attachment_5206" style="width: 1095px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5206" class="size-full wp-image-5206" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created.jpg" alt="REST API data extracted to get areport" width="1085" height="428" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created.jpg 1085w, https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created-300x118.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created-768x303.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/microsoft-report-created-1024x404.jpg 1024w" sizes="(max-width: 1085px) 100vw, 1085px" /></a><p id="caption-attachment-5206" class="wp-caption-text">MicroStrategy report created</p></div></li>
</ol>
<h3>Invoking a JSON file in MicroStrategy using ODBC</h3>
<p>With ZappySys PowerPack, you can not only CALL REST API in Microstrategy, but you can also create queries to plain JSON files stored locally or in a web address. We will use the following JSON file to test:</p>
<ol>
<li>First of all, in order to connect, you will need to specify on the ZappySys JSON Driver the path of the local JSON file:
<div id="attachment_5214" style="width: 809px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5214" class="size-full wp-image-5214" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file.jpg" alt="ODBC connection to a JSON file" width="799" height="376" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file.jpg 799w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file-300x141.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-connect-to-json-file-768x361.jpg 768w" sizes="(max-width: 799px) 100vw, 799px" /></a><p id="caption-attachment-5214" class="wp-caption-text">Configure a JSON file connection with ODBC</p></div></li>
<li>Secondly, you can create queries in MicroStrategy in the same way that we did in the Call REST API in MicroStrategy section:
<div id="attachment_5215" style="width: 1046px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5215" class="size-full wp-image-5215" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file.jpg" alt="Connection to a local JSON file in MicroStrategy" width="1036" height="464" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file.jpg 1036w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file-300x134.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file-768x344.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-query-to-json-file-1024x459.jpg 1024w" sizes="(max-width: 1036px) 100vw, 1036px" /></a><p id="caption-attachment-5215" class="wp-caption-text">Query to JSON file in MicroStrategy</p></div></li>
</ol>
<h3>Call REST API in MicroStrategy to get Gmail information</h3>
<p>It is also possible to invoke and query Gmail data using REST API in MicroStrategy using ZappySys ODBC PowerPack. With the ODBC PowerPack, you can write SQL queries and call REST API in MicroStrategy using OAuth or HTTP<br />
connections.</p>
<ol>
<li>First of all, in the ZappySys ODBC JSON driver, write the following URL:<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/gmail/v1/users/me/messages/</pre>
</li>
<li>Secondly, in connection type select <strong>OAuth Provider</strong>.</li>
<li>Also, in the OAuth Parameter in OAuth Provider, select Google and in scope <a href="https://mail.google.com">https://mail.google.com</a> and press generate token button and specify your credentials:
<div id="attachment_5217" style="width: 788px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5217" class="size-full wp-image-5217" src="https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration.jpg" alt="Get Gmail data in MicroStrategy" width="778" height="632" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration.jpg 778w, https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration-300x244.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/gmail-oauth-configuration-768x624.jpg 768w" sizes="(max-width: 778px) 100vw, 778px" /></a><p id="caption-attachment-5217" class="wp-caption-text">Configuration to connect MicroStrategy with Gmail</p></div></li>
<li>Additionally, in Zappysys you can write queries in MicroStrategy as we did with other REST API URLs:<br />
<pre class="crayon-plain-tag">SELECT * FROM messages</pre>
<div id="attachment_5218" style="width: 1031px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5218" class="size-full wp-image-5218" src="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report.jpg" alt="Get Gmail information in Microstrategy" width="1021" height="444" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report.jpg 1021w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report-300x130.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/microstrategy-gmail-report-768x334.jpg 768w" sizes="(max-width: 1021px) 100vw, 1021px" /></a><p id="caption-attachment-5218" class="wp-caption-text">Query to Gmail information in MicroStrategy</p></div></li>
</ol>
<h3>Problems with the boolean data type in MicroStrategy</h3>
<p>In addition, there is known issue related to boolean data in Microstrategy:</p>
<p>Error in accessing information from the external data source. Database Instance: (DataImport) Error Fetch Failed Error type: Invalid operation. Data of a string cell was truncated.</p>
<p><a href="https://community.microstrategy.com/s/article/KB20514-How-to-map-a-boolean-datatype-as-integer-with-PostgreSQL" rel="noreferrer">https://community.microstrategy.com/s/article/KB20514-How-to-map-a-boolean-datatype-as-integer-with-PostgreSQL</a></p>
<p>We have a workaround for this situation.</p>
<ol>
<li>First of all, you will need to change the metadata. The following article shows how to change the metadata:<a href="https://zappysys.com/blog/metadata-odbc-api-drivers-query/" rel="noreferrer">https://zappysys.com/blog/metadata-odbc-api-drivers-query/</a>Also, in order to fix, save your current metadata:
<div id="attachment_5229" style="width: 553px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5229" class="size-full wp-image-5229" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1.png" alt="generate metadata" width="543" height="526" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1.png 543w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-driver-generate-metadata-1-300x291.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-5229" class="wp-caption-text">Driver ODBC metadata</p></div></li>
<li>Additionally, modify your data from Boolean to String:
<div id="attachment_5230" style="width: 317px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/metadata.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5230" class="size-full wp-image-5230" src="https://zappysys.com/blog/wp-content/uploads/2018/10/metadata.png" alt="change metadata microstrategy" width="307" height="101" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/metadata.png 307w, https://zappysys.com/blog/wp-content/uploads/2018/10/metadata-300x99.png 300w" sizes="(max-width: 307px) 100vw, 307px" /></a><p id="caption-attachment-5230" class="wp-caption-text">MicroStrategy boolean to string metadata</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>REST API / SOAP API Pagination Settings for MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in MicroStrategy</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<h2>Conclusion</h2>
<p>To conclude, we can say that the process to call REST API in MicroStrategy using ZappySys ODBC PowerPack is straightforward. With the REST API and Web service support, Microstrategy can connect to almost any source. If you liked this article and you want to try our product, you can download it <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">here</a>.</p>
<h2>References</h2>
<p>Finally, if you need more information about the process to call REST API in MicroStrategy, refer to the following links:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack – Drivers for REST API, JSON, XML, SOAP</a></li>
<li><a href="https://www.microstrategy.com/us/get-started/desktop" target="_blank" rel="noopener">Get started with MicroStrategy Desktop</a></li>
<li><a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-sql-query-examples.htm" target="_blank" rel="noopener">SQL Query Examples with ODBC ZappySys PowerPack</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/">How to call REST API in MicroStrategy (JSON / XML SOAP)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read REST API in Pentaho Kettle</title>
		<link>https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 04 Aug 2018 20:44:39 +0000</pubDate>
				<category><![CDATA[ETL - Pentaho Kettle]]></category>
		<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[Pentaho]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=4545</guid>

					<description><![CDATA[<p>Introduction In this article, we will learn how to read REST API in Pentaho Kettle. Pentaho is a very popular tool in Business Intelligence to integrate data for OLAP services and to create reports and dashboards. In this article, we will use our ZappySys ODBC PowerPack to connect to REST API in Pentaho Kettle. Our software requires the JDBC connector [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/">How to read REST API in Pentaho Kettle</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/2018/08/pentaho.png"><img loading="lazy" decoding="async" class="alignleft wp-image-4640" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-150x150.png" alt="Pentaho logo" width="115" height="115" /></a>In this article, we will learn how to read REST API in Pentaho Kettle. Pentaho is a very popular tool in Business Intelligence to integrate data for OLAP services and to create reports and dashboards. In this article, we will use our <a href="https://zappysys.com/products/odbc-powerpack/purchase/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> to connect to REST API in Pentaho Kettle.</p>
<p>Our software requires the JDBC connector for SQL Server and then Uses our ZappySys Gateway to connect.</p>
<h2></h2>
<h2>Requirements</h2>
<ol>
<li>First of all, we will require the <a href="https://zappysys.com/products/odbc-powerpack/purchase/" target="_blank" rel="noopener">ZappySys ODBC PowerPack.</a></li>
<li>Secondly, we will use <a href="https://community.hitachivantara.com/docs/DOC-1009855-data-integration-kettle" target="_blank" rel="noopener">Pentaho Kettle (Our example in this post uses v8.1)</a></li>
<li>Finally, we will require the <a href="https://docs.microsoft.com/en-us/sql/connect/jdbc/microsoft-jdbc-driver-for-sql-server?view=sql-server-2017" target="_blank" rel="noopener">JDBC driver for SQL Server</a>.</li>
</ol>
<h2>Getting started</h2>
<p>First of all, we will need to create an ODBC connection to REST API using the Windows ODBC Data Source Administrator. Next, we will create a gateway and finally, we will invoke the data in Pentaho.</p>
<h3>Create an ODBC connection to read REST API in Pentaho Kettle</h3>
<p>In this example, we will first create an ODBC connection to an URL.</p>
<ol>
<li>First of all, open the ODBC Data Source administrator in Windows in the System DSN press Add:
<div id="attachment_4484" style="width: 600px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/add-new-data-source-odbc-administrator.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4484" class="size-full wp-image-4484" src="https://zappysys.com/blog/wp-content/uploads/2018/07/add-new-data-source-odbc-administrator.png" alt="Include JSON driver in ODBC Data source" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/add-new-data-source-odbc-administrator.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/07/add-new-data-source-odbc-administrator-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-4484" class="wp-caption-text">Add new ODBC driver</p></div></li>
<li>Secondly, select the ZappySys JSON Driver:
<div id="attachment_4485" style="width: 471px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4485" class="size-full wp-image-4485" src="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver-1.png" alt="Use ZappySys ODBC Driver" width="461" height="346" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver-1.png 461w, https://zappysys.com/blog/wp-content/uploads/2018/07/create-new-data-source-zappysys-json-driver-1-300x225.png 300w" sizes="(max-width: 461px) 100vw, 461px" /></a><p id="caption-attachment-4485" class="wp-caption-text">Select JSON driver in ODBC DS Administrator</p></div></li>
<li>Finally, add a data source name and specify a link to a URL. In this example, we will connect to the following url:<br />
<pre class="crayon-plain-tag">URL: https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
<div id="attachment_4488" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-json-driver-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4488" class="size-full wp-image-4488" src="https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-json-driver-url.png" alt="URL for OData REST API" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-json-driver-url.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-json-driver-url-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-json-driver-url-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-4488" class="wp-caption-text">REST API ODBC URL</p></div></li>
</ol>
<h3>Create a ZappySys gateway to JDBC to read REST API in Pentaho</h3>
<p>In order to connect to REST API, ZappySys ODBC PowerPack uses the JDBC for SQL Server and a gateway. Let&#8217;s take a look at it:</p>
<ol>
<li>First of all, open the ZappySys Gateway that is installed with the ODBC PowerPack and add a new data source:
<div id="attachment_4490" style="width: 567px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-data-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4490" class="size-full wp-image-4490" src="https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-data-gateway.png" alt="Gateway add Data Source" width="557" height="209" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-data-gateway.png 557w, https://zappysys.com/blog/wp-content/uploads/2018/07/zappysys-data-gateway-300x113.png 300w" sizes="(max-width: 557px) 100vw, 557px" /></a><p id="caption-attachment-4490" class="wp-caption-text">Add new Data Source in ZappySys Gateway</p></div></li>
<li>Secondly, add the data source name:
<div id="attachment_4554" style="width: 378px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/new-datasource-odbc-odata-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4554" class="size-full wp-image-4554" src="https://zappysys.com/blog/wp-content/uploads/2018/08/new-datasource-odbc-odata-gateway.png" alt="Create gateway to REST API" width="368" height="158" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/new-datasource-odbc-odata-gateway.png 368w, https://zappysys.com/blog/wp-content/uploads/2018/08/new-datasource-odbc-odata-gateway-300x129.png 300w" sizes="(max-width: 368px) 100vw, 368px" /></a><p id="caption-attachment-4554" class="wp-caption-text">Pentaho REST Client</p></div></li>
<li>In addition, in the user&#8217;s tab, add the user test and specify a password:
<div id="attachment_2941" style="width: 377px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-gateway-login.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2941" class="size-full wp-image-2941" src="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-gateway-login.png" alt="Add user and login" width="367" height="200" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-gateway-login.png 367w, https://zappysys.com/blog/wp-content/uploads/2018/03/zappysys-gateway-login-300x163.png 300w" sizes="(max-width: 367px) 100vw, 367px" /></a><p id="caption-attachment-2941" class="wp-caption-text">Add user and login</p></div></li>
<li>Also, in settings, press edit and add the ODBC Data Source created in the previous section and add the user created before:
<div id="attachment_4491" style="width: 569px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/add-datasource-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4491" class="size-full wp-image-4491" src="https://zappysys.com/blog/wp-content/uploads/2018/07/add-datasource-gateway.png" alt="ODBC connection to Default gateway" width="559" height="477" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/add-datasource-gateway.png 559w, https://zappysys.com/blog/wp-content/uploads/2018/07/add-datasource-gateway-300x256.png 300w" sizes="(max-width: 559px) 100vw, 559px" /></a><p id="caption-attachment-4491" class="wp-caption-text">Link Data Source in ODBC with the default gateway</p></div></li>
<li>Finally, in the General tab, you can specify the port. By default, it is 5000.<br />
Make sure to save the changes and check the gateway is started with the start button:</p>
<div id="attachment_4495" style="width: 572px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/07/gateway-zappysys-default-port.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4495" class="size-full wp-image-4495" src="https://zappysys.com/blog/wp-content/uploads/2018/07/gateway-zappysys-default-port.png" alt="Port 5000 in the default gateway" width="562" height="539" srcset="https://zappysys.com/blog/wp-content/uploads/2018/07/gateway-zappysys-default-port.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/07/gateway-zappysys-default-port-300x288.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-4495" class="wp-caption-text">Default gateway with port 5000</p></div></li>
</ol>
<h3>How to read REST API in Pentaho</h3>
<ol>
<li>First of all, in Pentaho, we will create a project like the following:
<div id="attachment_4556" style="width: 487px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-a-csv-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4556" class="size-full wp-image-4556" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-a-csv-file.png" alt="Client Pentaho REST API" width="477" height="162" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-a-csv-file.png 477w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-a-csv-file-300x102.png 300w" sizes="(max-width: 477px) 100vw, 477px" /></a><p id="caption-attachment-4556" class="wp-caption-text">Pentaho Project REST API csv</p></div></li>
<li>Secondly, we will create a query like the following:
<div id="attachment_4557" style="width: 555px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-table-input-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4557" class="size-full wp-image-4557" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-table-input-query.png" alt="SQL query to REST API in Pentaho" width="545" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-table-input-query.png 545w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-table-input-query-235x300.png 235w" sizes="(max-width: 545px) 100vw, 545px" /></a><p id="caption-attachment-4557" class="wp-caption-text">A query in Pentaho to get data</p></div></li>
<li>In addition, we will add the following connection. We will connect to the data source named customers created in the ZappySys Gateway with port 5000 and the user created in the Gateway:
<div id="attachment_4558" style="width: 1362px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-JDBC-connection-sql-server.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4558" class="size-full wp-image-4558" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-JDBC-connection-sql-server.png" alt="How to connect to the Gateway" width="1352" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-JDBC-connection-sql-server.png 1352w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-JDBC-connection-sql-server-300x134.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-JDBC-connection-sql-server-768x343.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-JDBC-connection-sql-server-1024x457.png 1024w" sizes="(max-width: 1352px) 100vw, 1352px" /></a><p id="caption-attachment-4558" class="wp-caption-text">JDBC connection to SQL Server</p></div></li>
<li>If everything is OK, you will be able to see the CSV file generated:
<div id="attachment_4559" style="width: 1351px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-csv-output-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4559" class="size-full wp-image-4559" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-csv-output-file.png" alt="Exported data from REST API to CSV" width="1341" height="506" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-csv-output-file.png 1341w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-csv-output-file-300x113.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-csv-output-file-768x290.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-to-csv-output-file-1024x386.png 1024w" sizes="(max-width: 1341px) 100vw, 1341px" /></a><p id="caption-attachment-4559" class="wp-caption-text">Data in CSV format</p></div></li>
<li>Also, you can use SQL statements. The following example shows how to do a where filter:<br />
<pre class="crayon-plain-tag">SELECT Shipname 
FROM value
where Shipname='Consolidated Holdings'</pre>
</li>
<li>Finally, we will show the first 10 rows using a group by:<br />
<pre class="crayon-plain-tag">SELECT Shipname 
FROM value
group by shipname
limit 10</pre>
</li>
</ol>
<h3>How to read REST API in Pentaho (Gmail)</h3>
<p>The following example will show how to get Gmail information from Pentaho.</p>
<ol>
<li>First of all, we will need to create a connection to Gmail in ODBC using the ZappySys ODBC Driver (Check the Create an ODBC connection for a Pentaho REST Client section). In the ODBC Administrator, we will add a ZappySys JSON Driver connection.</li>
<li>Secondly, in the ZappySys ODBC driver, specify the URL and select the OAuth connection:
<div id="attachment_4560" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/Pentaho-gmail-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4560" class="size-full wp-image-4560" src="https://zappysys.com/blog/wp-content/uploads/2018/08/Pentaho-gmail-configuration.png" alt="Configure ODBC to REST API" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/Pentaho-gmail-configuration.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/08/Pentaho-gmail-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/Pentaho-gmail-configuration-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-4560" class="wp-caption-text">ODBC configuration</p></div></li>
<li>Also, in the OAuth properties specify the Google OAuth provider and the https://mail.google.com scope. Press the generate token button and specify your credentials and accept the access permission request:
<div id="attachment_4561" style="width: 596px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gmail-oauth-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4561" class="size-full wp-image-4561" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gmail-oauth-configuration.png" alt="Configure OAuth connection" width="586" height="493" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gmail-oauth-configuration.png 586w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gmail-oauth-configuration-300x252.png 300w" sizes="(max-width: 586px) 100vw, 586px" /></a><p id="caption-attachment-4561" class="wp-caption-text">Gmail OAuth connection</p></div></li>
<li>In addition, using the ZappysSys Data Gateway, add the new Data Source and associate with the ODBC connection just created:
<div id="attachment_4563" style="width: 572px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gateway-to-connect-to-gmail-ODBC.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4563" class="size-full wp-image-4563" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gateway-to-connect-to-gmail-ODBC.png" alt="Add ODBC to the ZappySys gateway" width="562" height="464" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gateway-to-connect-to-gmail-ODBC.png 562w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-gateway-to-connect-to-gmail-ODBC-300x248.png 300w" sizes="(max-width: 562px) 100vw, 562px" /></a><p id="caption-attachment-4563" class="wp-caption-text">Connect Pentaho with Gmail</p></div></li>
<li>Additionally, add the test user to the data source:
<div id="attachment_4564" style="width: 662px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-add-user-data-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4564" class="size-full wp-image-4564" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-add-user-data-source.png" alt="Gateway user to connect to REST API" width="652" height="408" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-add-user-data-source.png 652w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-add-user-data-source-300x188.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-add-user-data-source-436x272.png 436w" sizes="(max-width: 652px) 100vw, 652px" /></a><p id="caption-attachment-4564" class="wp-caption-text">Include user and permission to the gateway</p></div></li>
<li>In Pentaho, change the connection in the table input to connect to the Gateway:
<div id="attachment_4565" style="width: 1266px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/gmail-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4565" class="size-full wp-image-4565" src="https://zappysys.com/blog/wp-content/uploads/2018/08/gmail-connection.png" alt="Use Pentaho Rest client to connect to Gamil" width="1256" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/gmail-connection.png 1256w, https://zappysys.com/blog/wp-content/uploads/2018/08/gmail-connection-300x144.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/08/gmail-connection-768x369.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/08/gmail-connection-1024x492.png 1024w" sizes="(max-width: 1256px) 100vw, 1256px" /></a><p id="caption-attachment-4565" class="wp-caption-text">Pentaho Rest client to Gmail</p></div></li>
<li>Finally, in the table input add the following query:
<div id="attachment_4566" style="width: 555px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-query-gmail.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4566" class="wp-image-4566 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-query-gmail.png" alt="Query to get Gmail data and read REST API in Pentaho" width="545" height="212" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-query-gmail.png 545w, https://zappysys.com/blog/wp-content/uploads/2018/08/pentaho-rest-api-query-gmail-300x117.png 300w" sizes="(max-width: 545px) 100vw, 545px" /></a><p id="caption-attachment-4566" class="wp-caption-text">Connect Pentaho to Gmail</p></div></li>
</ol>
<h3>Conclusions</h3>
<p>To conclude, we can say that it is simple to connect to the REST API using Pentaho with the help of ZappySys ODBC PowerPack. This tool allows to easily query REST API data like a simple SQL Query. If you like this tool you can<br />
download the <a href="https://zappysys.com/products/odbc-powerpack/purchase/" target="_blank" rel="noopener">ODBC PowerPack here</a>.</p>
<h3>References</h3>
<p>For more information, refer to the following links:</p>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/purchase/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a></li>
<li><a href="https://intellipaat.com/tutorial/pentaho-tutorial/introduction-to-pentaho/" target="_blank" rel="noopener">Introduction To Pentaho</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/">How to read REST API in Pentaho Kettle</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Calling SharePoint 365 REST API in SSIS</title>
		<link>https://zappysys.com/blog/sharepoint-365-rest-api-ssis-read-list-write-create/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Mon, 28 May 2018 21:56:14 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON File Destination]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS XML File Destination]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[explorer]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[rest]]></category>
		<category><![CDATA[Sharepoint]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=3674</guid>

					<description><![CDATA[<p>Introduction to REST API with SharePoint in SSIS Using REST API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint 365 is a nice Microsoft application in the Cloud used to share documents and collaborate with the company. You can have schedules, projects, documents and more shared using a Web platform. In addition, [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/sharepoint-365-rest-api-ssis-read-list-write-create/">Calling SharePoint 365 REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction to REST API with SharePoint in SSIS</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/ssis">API Connector for SharePoint Online</a> which makes it much simpler to <strong>Read/Write SharePoint Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg"><img loading="lazy" decoding="async" class="alignleft wp-image-3731 " src="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg" alt="icon SharePoint" width="86" height="86" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg 225w" sizes="(max-width: 86px) 100vw, 86px" /></a>Using REST API with SharePoint in SSIS is a common requirement to Administer SharePoint. SharePoint 365 is a nice Microsoft application in the Cloud used to share documents and collaborate with the company. You can have schedules, projects, documents and more shared using a Web platform.</p>
<p>In addition, it is a very useful tool that your company may need. It is also possible to automate, administer task using Rest API.<br />
This article, we will learn how to create REST API queries to SharePoint 365 using the Microsoft Graph API using SSIS. To learn about other <a href="https://zappysys.com/blog/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel/" target="_blank" rel="noopener">Office 365 REST API in SSIS check this article</a> (Outlook, Onedrive, mail, Excel API).</p>
<p>Also, we will show our ZappySys SSIS PowerPack that includes very powerful tools to export SharePoint data from REST API to any other source.<br />
<div class="su-table su-table-alternate">
<table width="300">
<tbody>
<tr style="line-height: 0px">
<td width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="REST API Web Service Task SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle"><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" rel="noopener">SSIS REST API Web Service Task<br />
</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/images/SSIS-PowerPack/SSIS-Json-Source-Adapter.png" alt="JSON Source (File, REST API, OData Connector) SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" rel="noopener">SSIS JSON Source (File, REST API, OData Connector)</a></td>
</tr>
<tr style="line-height: 0px">
<td style="height: 58px" width="50px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-destination-connector/" rel="noopener"><br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-3074" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-file-destination/ssis-json-file-destination.png" alt="JSON File Destination (Create JSON File) SSIS" width="50" height="50" /></a></td>
<td style="vertical-align: middle;height: 58px"><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-destination-connector/" rel="noopener">SSIS JSON File Destination (Create JSON File)<br />
</a></td>
</tr>
</tbody>
</table>
</div>
<h2>Requirements to REST API with SharePoint</h2>
<ol>
<li>First, you will need SSDT installed.</li>
<li>Second, SSIS PowerPack installed.</li>
<li>An Office 365 Account with SharePoint 365</li>
</ol>
<h2>Getting started</h2>
<p>Microsoft included the Microsoft Graph to easily create API queries to different Microsoft components like OneDrive, Excel, Insights, Microsoft Team, Planner and more.</p>
<p>The Microsoft Graph is a gateway to access to 365 Data in an integrated platform. Let’s start with the Microsoft Graph Explorer and do some REST API queries to understand how to use REST API in SharePoint.</p>
<h3>Microsoft Graph Explorer to SharePoint introduction</h3>
<p>The best way to learn REST API with SharePoint 365 is to use the Graph Explorer. You can run API queries using the Graph Explorer and get your data. Here we will show how.</p>
<ol>
<li>First, we will go to the <a href="https://developer.microsoft.com/en-us/graph/graph-explorer">Graph Explorer</a> and sign-in with your Office 365 Account.</li>
<li>Secondly, in Run Query, you can specify your query, which will show SharePoint information.
<div id="attachment_10091" style="width: 730px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10091" class="wp-image-10091 size-large" title="Graph Explorer" src="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-1024x428.jpg" alt="graph api explorer" width="720" height="301" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-1024x428.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-300x125.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1-768x321.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-explorer-1.jpg 1348w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-10091" class="wp-caption-text">Graph Explorer</p></div></li>
<li>Let start with this link:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/root/lists</pre>
</li>
<li>This shows properties about site resources. The response of the query is in JSON format:
<div id="attachment_3695" style="width: 732px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3695" class="size-full wp-image-3695" src="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results.jpg" alt="graph api microsoft json results" width="722" height="299" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results.jpg 722w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results-300x124.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/graph-api-microsoft-json-results-720x299.jpg 720w" sizes="(max-width: 722px) 100vw, 722px" /></a><p id="caption-attachment-3695" class="wp-caption-text">Graph API Microsoft JSON results</p></div></li>
<li>Also, it is possible to enable examples for SharePoint Sites, SharePoint Lists, and other Microsoft technologies:
<div id="attachment_3696" style="width: 435px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3696" class="size-full wp-image-3696" src="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins.jpg" alt="microsoft graph api enable api applicatins" width="425" height="450" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins.jpg 425w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-enable-api-applicatins-283x300.jpg 283w" sizes="(max-width: 425px) 100vw, 425px" /></a><p id="caption-attachment-3696" class="wp-caption-text">Graph API Applications</p></div></li>
</ol>
<h3>Create an OAuth connection to REST API with SharePoint in SSIS</h3>
<ol>
<li style="list-style-type: none;">
<ol>
<li>First, to get the Data from the Microsoft Graph, we will sign in to create an application in the <a href="https://docs.microsoft.com/en-us/azure/active-directory/develop/app-registration-portal-training-guide">Azure Portal app registration.</a></li>
<li>Secondly, create a Microsoft Application. It will provide you an Application ID and a Password. For detailed steps about how to create a Microsoft Application, check <a href="https://zappysys.com/blog/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel/">our article related</a>.
<div id="attachment_3701" style="width: 1310px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3701" class="size-full wp-image-3701" src="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password.jpg" alt="microsoft graph api application id password" width="1300" height="467" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password.jpg 1300w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password-300x108.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password-768x276.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/microsoft-graph-api-application-id-password-1024x368.jpg 1024w" sizes="(max-width: 1300px) 100vw, 1300px" /></a><p id="caption-attachment-3701" class="wp-caption-text">Microsoft Graph API application id password</p></div></li>
<li>Once that the application is created, go to SSDT or Visual Studio and create a new connection.
<div id="attachment_3704" style="width: 419px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3704" class="size-full wp-image-3704" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection.jpg" alt=" oauth connection ssis" width="409" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection.jpg 409w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-oauth-connection-276x300.jpg 276w" sizes="(max-width: 409px) 100vw, 409px" /></a><p id="caption-attachment-3704" class="wp-caption-text">SSIS OAuth connection</p></div></li>
<li>Select the ZS-OAuth connection. Once selected, enter the Client ID (the Microsoft Graph Application ID), the client secret (application password).</li>
<li>Add the Authorization URL is the following:<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/authorize</pre>
</li>
<li>Also, include the Access token URL is the following:<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/token</pre>
</li>
<li>The following permissions were applied in the example: User.Read<br />
<pre class="crayon-plain-tag">offline_access
Sites.ReadWrite.all
Sites.Manage.All
Sites.FullControl.All</pre>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> It is advised to include <strong>offline_access</strong> scope in order to get a Refresh Token and to be free of any token restrictions.</div></div></li>
<li>Once that the properties are entered, press the Generate token button:
<div id="attachment_3706" style="width: 781px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3706" class="wp-image-3706 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api.jpg" alt="oauth graph API with REST API with SharePoint in SSIS" width="771" height="697" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api.jpg 771w, https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api-300x271.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/oauth-graph-api-768x694.jpg 768w" sizes="(max-width: 771px) 100vw, 771px" /></a><p id="caption-attachment-3706" class="wp-caption-text">SSIS OAuth with REST API with SharePoint in SSIS</p></div></li>
</ol>
</li>
</ol>
<h3>How to call SharePoint API in SSIS</h3>
<ol>
<li>Once that your OAuth Connection is created, we can use it in a REST API task. This task is included with the ZappySys SSIS PowerPack:
<div id="attachment_3707" style="width: 304px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3707" class="size-full wp-image-3707" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-rest-api-task.jpg" alt=" rest api ssis task" width="294" height="199" /></a><p id="caption-attachment-3707" class="wp-caption-text">SSIS REST API task</p></div></li>
<li>Secondly, in the REST API Task, select the option URL from connection and select the OAuth connection created before. We will first use the following URL to see the list of site properties:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/root/lists</pre>
</li>
<li>Also, press Test request/Response button to get the results of the query:
<div id="attachment_3708" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3708" class="size-full wp-image-3708" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call.jpg" alt="ssis sharepoint rest api call" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-rest-api-call-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3708" class="wp-caption-text">SSIS SharePoint rest API call</p></div></li>
<li>The response will be in JSON format:
<div id="attachment_3710" style="width: 759px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3710" class="size-full wp-image-3710" src="https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response.jpg" alt="rest api ssis sharepoint 365 response" width="749" height="534" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response.jpg 749w, https://zappysys.com/blog/wp-content/uploads/2018/05/rest-api-ssis-sharepoint-365-response-300x214.jpg 300w" sizes="(max-width: 749px) 100vw, 749px" /></a><p id="caption-attachment-3710" class="wp-caption-text">REST API SSIS Sharepoint 365 response</p></div></li>
<li>Also, it is possible to store the results in a file or a variable:
<div id="attachment_3711" style="width: 808px" class="wp-caption alignleft"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3711" class="wp-image-3711 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file.jpg" alt="SSIS save API SharePoint response to file REST API with SharePoint" width="798" height="658" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file.jpg 798w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file-300x247.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-save-api-sharepoint-response-to-file-768x633.jpg 768w" sizes="(max-width: 798px) 100vw, 798px" /></a><p id="caption-attachment-3711" class="wp-caption-text">SSIS save API SharePoint response to a file REST API with SharePoint</p></div></li>
<li>In Addition, you can run the following query to enumerate all the sites:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites?select=siteCollection,webUrl&amp;filter=siteCollection/root%20ne%20null</pre>
</li>
<li>Also, to show the information on a specific site, the following query will be used:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/site-id</pre>
</li>
<li>For example, if you site id is zappysys.sharepoint.com the URL would be the following:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/sites/zappysys.sharepoint.com</pre>
</li>
<li>To enumerate sites, the following example can be useful:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites?select=siteCollection,webUrl&amp;filter=siteCollection/root%20ne%20null</pre>
</li>
<li>Also, to enumerate lists, you can use the following URL:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists</pre>
</li>
</ol>
<h3>How to read SharePoint lists in SSIS using REST API</h3>
<p>We will learn how to show SharePoint lists using rest API.</p>
<p>In addition, you can get the list ids using this query:</p><pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/list</pre><p>
<div id="attachment_3743" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3743" class="wp-image-3743 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list.jpg" alt="SSIS SharePoint list API" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/SSIS-SharePoint-list-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3743" class="wp-caption-text">SharePoint list API</p></div>
<h3>How to read data from a Sharepoint List</h3>
<ol>
<li>To get the list of ithems form a list use the following query:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists/mylist/items/</pre>
</li>
<li>Finally, to get metadata from a list, you can use the following query. To learn more how to import Sharepoint List into SQL Server <a href="https://zappysys.com/blog/loading-data-from-rest-api-to-sql-server-in-ssis/" target="_blank" rel="noopener">use JSON / REST API Source</a>.</li>
</ol>
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists/fcf5fa2b-ceeb-4c9b-80e5-7bedd455fc9b</pre>
<div id="attachment_3742" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3742" class="size-full wp-image-3742" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list.jpg" alt=" sharepoint ssismetadata list" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-metadata-list-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3742" class="wp-caption-text">SSIS Sharepoint metadata list</p></div>
<h3>How to create a SharePoint list item in SSIS using REST API (POST Method)</h3>
<p>It is also possible to POST data using REST API. In the next example, we will create a new list in SharePoint 365 using REST API.</p>
<ol>
<li>First, in SSDT, use the REST API Task used previously and specify the following URL:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists/mynewlist/items/</pre>
Where zappys.sharepoint.com is the site id and mynewlist is a new list created. Also, in the HTTP Request Method, use the POST method.</li>
<li>In addition, go to the Body Request, we will create a widget. We will use the following JSON data and make sure to select JSON (application/json) in the body:<br />
<pre class="crayon-plain-tag">{
"fields": {
"Title": "Widget"
}
}</pre>
<div id="attachment_3718" style="width: 810px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3718" class="wp-image-3718 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item.jpg" alt="Post SharePoint REST API" width="800" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item-300x245.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-post-sharepoint-365-list-item-768x628.jpg 768w" sizes="(max-width: 800px) 100vw, 800px" /></a><p id="caption-attachment-3718" class="wp-caption-text">SharePoint Post REST API</p></div></li>
<li>Finally, if everything is successful, you will be able to see the new item created:
<div id="attachment_3719" style="width: 712px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3719" class="wp-image-3719 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post.jpg" alt="sharepoint ssis list created post " width="702" height="381" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post.jpg 702w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-sharepoint-list-created-post-300x163.jpg 300w" sizes="(max-width: 702px) 100vw, 702px" /></a><p id="caption-attachment-3719" class="wp-caption-text">SSIS SharePoint list created with a POST</p></div></li>
</ol>
<h3>How to export SharePoint API response results to a file</h3>
<p>We have a nice task named JSON Source used to get data from REST API or a JSON file and export to any source the results like SQL Server, Excel, a flat file, etc.<br />
In this example, we will export data from the JSON Source to a JSON file using the JSON Destination Task.</p>
<ol>
<li>First of all, we will use the Data Flow. Drag and drop the data flow to the design pane and double click to go to the Data Flow tab:
<div id="attachment_3721" style="width: 328px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3721" class="wp-image-3721 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1.jpg" alt=" Data Flow SSIS" width="318" height="95" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1.jpg 318w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-data-flow-1-300x90.jpg 300w" sizes="(max-width: 318px) 100vw, 318px" /></a><p id="caption-attachment-3721" class="wp-caption-text">SSIS Data Flow</p></div></li>
<li>Secondly, in the Data Flow tab, drag and drop the JSON Source, the JSON Destination and join them:
<div id="attachment_3722" style="width: 540px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3722" class="wp-image-3722 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin.jpg" alt=" json source to json destination ssis" width="530" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin.jpg 530w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-to-json-destinatin-300x217.jpg 300w" sizes="(max-width: 530px) 100vw, 530px" /></a><p id="caption-attachment-3722" class="wp-caption-text">SSIS JSON source to JSON destination</p></div></li>
<li>In addition, in the JSON Source, we will check the option Use Credentials and select the OAuth connection created and used before.</li>
<li>Enter Path or Web URL, we will use the following URL:<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/beta/sites/zappysys.sharepoint.com/lists</pre>
</li>
<li>Also, We will use the following filter:<br />
<pre class="crayon-plain-tag">$.value[*].list</pre>
<div id="attachment_3724" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3724" class="wp-image-3724 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint.jpg" alt=" json ssis source REST API with SharePoint in SSIS" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint.jpg 826w, https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint-300x266.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/json-source-sharepoint-768x682.jpg 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-3724" class="wp-caption-text">SSIS JSON Source REST API with SharePoint in SSIS</p></div></li>
<li>In addition, go to JSON Destination task, select mappings and right click on add elements:
<div id="attachment_3725" style="width: 884px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3725" class="wp-image-3725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination.jpg" alt="json destination ssis" width="874" height="700" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination.jpg 874w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination-300x240.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-destination-768x615.jpg 768w" sizes="(max-width: 874px) 100vw, 874px" /></a><p id="caption-attachment-3725" class="wp-caption-text">SSIS JSON Destination</p></div></li>
<li>Also, select the attributes:
<div id="attachment_3727" style="width: 405px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3727" class="wp-image-3727 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes.jpg" alt=" add attributes ssis" width="395" height="438" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes.jpg 395w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-add-attributes-271x300.jpg 271w" sizes="(max-width: 395px) 100vw, 395px" /></a><p id="caption-attachment-3727" class="wp-caption-text">SSIS add attributes</p></div></li>
<li>Finally, run the package to export the data.</li>
</ol>
<h2>Conclusion about REST API with SharePoint in SSIS</h2>
<p>To conclude, we can say that SharePoint 365 is a very popular application to share documents and information. With REST API it is possible to get data properties and administer SharePoint. We used the REST API, JSON Source to get and send information. If you want to try yourself, you can download our tools <a href="https://zappysys.com/products/ssis-powerpack/download/">here.</a></p>
<h2>References</h2>
<ul>
<li><a href="https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user">Get access on behalf of a user</a></li>
<li><a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/beta/resources/sharepoint">Working with SharePoint sites in Microsoft Graph</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/">About SSIS PowerPack</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/sharepoint-365-rest-api-ssis-read-list-write-create/">Calling SharePoint 365 REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Calling Gmail REST API using SSIS &#8211; Read Emails</title>
		<link>https://zappysys.com/blog/calling-gmail-rest-api-using-ssis-read-emails/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Tue, 08 May 2018 19:26:59 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[api]]></category>
		<category><![CDATA[gmail]]></category>
		<category><![CDATA[rest]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=3359</guid>

					<description><![CDATA[<p>Introduction to get Gmail with REST API In this example, we will show how to read emails by calling Gmail REST API using SSIS. To illustrate, we will use ZappySys SSIS PowerPack, which includes several tasks to import/export data from multiples sources to multiple destinations like flat files, Azure, AWS, databases, Office files and more. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/calling-gmail-rest-api-using-ssis-read-emails/">Calling Gmail REST API using SSIS &#8211; Read Emails</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction to get Gmail with REST API</h2>
<p>In this example, we will show how to <strong>read emails</strong> by <strong>calling Gmail REST API using SSIS</strong>. To illustrate, we will use <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>, which includes several tasks to import/export data from multiples sources to multiple destinations like flat files, Azure, AWS, databases, Office files and more.</p>
<h2>Requirements</h2>
<ol>
<li>First, you will need <a href="https://zappysys.com/products/ssis-powerpack/download/">ZappySys SSIS PowerPack</a> installed.</li>
<li>Secondly, you will need SSDT installed.</li>
</ol>
<h2>Getting started</h2>
<h3>How to get information about Gmail with REST API</h3>
<ol>
<li>First, you will need to create a developer application for Gmail. The following tutorial shows how to create an application for Google Drive, but the steps are similar:
<ul>
<li><a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/">How to register Google OAuth Application (Get ClientID and ClientSecret)</a></li>
</ul>
</li>
<li>Secondly, go to SSDT and create a new SQL Server Integration Project.</li>
<li>Subsequently, drag and drop a Data Flow task and double-click it:
<div id="attachment_3369" style="width: 622px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/data-flow.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3369" class="size-full wp-image-3369" src="https://zappysys.com/blog/wp-content/uploads/2018/05/data-flow.png" alt="Using Data flow in SSIS" width="612" height="333" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/data-flow.png 612w, https://zappysys.com/blog/wp-content/uploads/2018/05/data-flow-300x163.png 300w" sizes="(max-width: 612px) 100vw, 612px" /></a><p id="caption-attachment-3369" class="wp-caption-text">Drag and drop Data Flow</p></div></li>
<li>Also, in the connection manager create a new ZS-OAuth connection. Select Google as the OAuth provider. In scopes, add the following:<br />
<pre class="crayon-plain-tag">https://mail.google.com/</pre>
In addition, press generate token and add your credentials if necessary:</p>
<div id="attachment_3382" style="width: 780px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/google-oauth-rest-api-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3382" class="size-full wp-image-3382" src="https://zappysys.com/blog/wp-content/uploads/2018/05/google-oauth-rest-api-1.png" alt="OAuth credentials" width="770" height="614" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/google-oauth-rest-api-1.png 770w, https://zappysys.com/blog/wp-content/uploads/2018/05/google-oauth-rest-api-1-300x239.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/google-oauth-rest-api-1-768x612.png 768w" sizes="(max-width: 770px) 100vw, 770px" /></a><p id="caption-attachment-3382" class="wp-caption-text">OAuth credentials to connect to Gmail</p></div>
<p>&nbsp;</li>
<li>To illustrate, the following example shows how to get the Gmail messages from an account. Check the option use credentials and select the OAuth connection just created. To get your current email messages, you can use the following URL:</p><pre class="crayon-plain-tag">https://www.googleapis.com/gmail/v1/users/me/messages/</pre><p>
The filter used is the following:</p><pre class="crayon-plain-tag">$.messages[*].id</pre><p>
The result displayed shows the ids of the messages. You can see the id of the message in Gmail in the URL when you click a message:</p>
<div id="attachment_3373" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/json-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3373" class="size-full wp-image-3373" src="https://zappysys.com/blog/wp-content/uploads/2018/05/json-rest-api.png" alt="Get Gmail messages with REST API" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/json-rest-api.png 826w, https://zappysys.com/blog/wp-content/uploads/2018/05/json-rest-api-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/json-rest-api-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-3373" class="wp-caption-text">JSON Source Rest API</p></div>
<p>&nbsp;</li>
<li>If you want to check to information of a specific message you can use the following URL.</p><pre class="crayon-plain-tag">https://www.googleapis.com/gmail/v1/users/me/messages/1632106341364d6f</pre><p>
Where 1632106341364d6f is the message id. The filter used will be the following:</p><pre class="crayon-plain-tag">$.id</pre><p>
<div id="attachment_3374" style="width: 665px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/snippet-info.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3374" class="size-full wp-image-3374" src="https://zappysys.com/blog/wp-content/uploads/2018/05/snippet-info.png" alt="Data extracted from Gmail" width="655" height="357" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/snippet-info.png 655w, https://zappysys.com/blog/wp-content/uploads/2018/05/snippet-info-300x164.png 300w" sizes="(max-width: 655px) 100vw, 655px" /></a><p id="caption-attachment-3374" class="wp-caption-text">Gmail message information</p></div>
<p>The query shows the snippet (body of the message), the history id, size estimated and more.</li>
<li>After this, we can use the following filter:</p><pre class="crayon-plain-tag">$.payload.headers[*]</pre><p>
This will show the sender, the receiver, subject, references, message ID and more information:</p>
<div id="attachment_3370" style="width: 516px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/date-information.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3370" class="size-full wp-image-3370" src="https://zappysys.com/blog/wp-content/uploads/2018/05/date-information.png" alt="To from IP information" width="506" height="356" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/date-information.png 506w, https://zappysys.com/blog/wp-content/uploads/2018/05/date-information-300x211.png 300w" sizes="(max-width: 506px) 100vw, 506px" /></a><p id="caption-attachment-3370" class="wp-caption-text">Information about Gmail</p></div></li>
</ol>
<h3>How to get label information in Gmail with REST API</h3>
<ol>
<li>First, you can use the following URL to get the Gmail labels:<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/gmail/v1/users/me/labels/</pre>
Filter:<br />
<pre class="crayon-plain-tag">$.labels[*].id</pre>
&nbsp;</li>
<li>Also, the information displayed is the following:
<div id="attachment_3375" style="width: 689px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/labes-gmail.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3375" class="size-full wp-image-3375" src="https://zappysys.com/blog/wp-content/uploads/2018/05/labes-gmail.png" alt="Gmail labels" width="679" height="557" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/labes-gmail.png 679w, https://zappysys.com/blog/wp-content/uploads/2018/05/labes-gmail-300x246.png 300w" sizes="(max-width: 679px) 100vw, 679px" /></a><p id="caption-attachment-3375" class="wp-caption-text">Labels in Gmail</p></div></li>
<li>Finally, the labels are the same than in Gmail:
<div id="attachment_3376" style="width: 204px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/labes-in-gmail-available.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3376" class="size-full wp-image-3376" src="https://zappysys.com/blog/wp-content/uploads/2018/05/labes-in-gmail-available.png" alt="Gmail labels used" width="194" height="606" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/labes-in-gmail-available.png 194w, https://zappysys.com/blog/wp-content/uploads/2018/05/labes-in-gmail-available-96x300.png 96w" sizes="(max-width: 194px) 100vw, 194px" /></a><p id="caption-attachment-3376" class="wp-caption-text">Gmails labels, categories</p></div></li>
</ol>
<h3>How to get threads information in Gmail with REST API</h3>
<ol>
<li>Finally, you can also get the thread information using the following URL:<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/gmail/v1/users/me/threads</pre>
The filter used will be the following:<br />
<pre class="crayon-plain-tag">$.threads[*].id</pre>
&nbsp;</li>
<li>The information displayed will be the following:
<div id="attachment_3377" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-thread.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3377" class="size-full wp-image-3377" src="https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-thread.png" alt="Threads in Gmail" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-thread.png 826w, https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-thread-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-thread-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-3377" class="wp-caption-text">Get Threads from Gmail</p></div></li>
<li>If you press the Preview button, you will see the following information:
<div id="attachment_3378" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/thread-information-gmail.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3378" class="size-full wp-image-3378" src="https://zappysys.com/blog/wp-content/uploads/2018/05/thread-information-gmail.png" alt="Gmail information with REST" width="594" height="357" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/thread-information-gmail.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/thread-information-gmail-300x180.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3378" class="wp-caption-text">Thread information using Gmail</p></div></li>
</ol>
<h3>How to export the data from Gmail to a CSV file</h3>
<ol>
<li>First, to export the data, we will use the ZS Trash Destination:
<div id="attachment_3380" style="width: 303px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-to-a-csv-file.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3380" class="size-full wp-image-3380" src="https://zappysys.com/blog/wp-content/uploads/2018/05/gmail-to-a-csv-file.png" alt="Export data to a file" width="293" height="190" /></a><p id="caption-attachment-3380" class="wp-caption-text">Export data from Gmail to a CSV file</p></div></li>
<li>Finally, in the Trash Destination specify the path to store the data from Gmail:
<div id="attachment_3379" style="width: 646px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/csv-configuration-to-store-gmail-information.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3379" class="wp-image-3379 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/csv-configuration-to-store-gmail-information.png" alt="Gmail information stored to get Gmail with REST API" width="636" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/csv-configuration-to-store-gmail-information.png 636w, https://zappysys.com/blog/wp-content/uploads/2018/05/csv-configuration-to-store-gmail-information-300x247.png 300w" sizes="(max-width: 636px) 100vw, 636px" /></a><p id="caption-attachment-3379" class="wp-caption-text">CSV destination to store Gmail info</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>To conclude, we can say that <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a> is a powerful tool where you can get information from Gmail. This information can be exported to Excel, SQL Server, XML, JSON or any other format using SSIS.  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">Download FREE Trial of SSIS PowerPack</a> to find out more use cases like this.</p>
<h2>References</h2>
<p>For more information about Gmail, you can refer to these links:</p>
<ul>
<li><a href="https://developers.google.com/gmail/api/v1/reference/">API Reference</a></li>
<li><a href="https://zappysys.com/blog/get-data-google-spreadsheet-using-ssis/">How to read / write Google SpreadSheet using SSIS</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/calling-gmail-rest-api-using-ssis-read-emails/">Calling Gmail REST API using SSIS &#8211; Read Emails</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
