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

<channel>
	<title>json Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/json/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/json/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 05 Mar 2026 01:25:16 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>json Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/json/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Export / Create JSON File in Informatica (from SQL Query / Database Tables)</title>
		<link>https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 30 Mar 2023 17:17:30 +0000</pubDate>
				<category><![CDATA[ZappyShell]]></category>
		<category><![CDATA[command line tools]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[excel]]></category>
		<category><![CDATA[Informatica]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10020</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from ZappyShell. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</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, you will learn how to create simple or complex JSON file in Informatica just in a few clicks. We will use the Powerful Export JSON Command line Builder from <a href="https://zappysys.com/products/zappyshell/data-export-command-line-tools-json-excel-csv-pdf/">ZappyShell</a>. Using this Portable / xCopy style command line you can build nested/complex JSON / XML or even CSV from single / multiple SQL Queries as Input or Select Database Tables as Source. Later you can copy generated command line from Tool and execute in any tool like Informatica / Talend / DataStage or Automation Script like Python / PowerShell.</p>
<h2>Prerequisite</h2>
<p>This article assumes you have access to Informatica Developer Tools and basic knowledge of command-line tools.</p>
<ol>
<li><a href="https://zappysys.com/products/zappyshell/">Download ZappyShell</a> Command line utility (Click on Download Button). You can get msi and Zip (Poratble / xCopy version)</li>
<li>If you want to use the Portable version just extract ZappyShell-xCopy zip to some folder lets say (C:\ZappyShell). If you installed MSI then its usually in C:\Program Files (x86)\ZappySys</li>
<li>Double click on DbCommandBuilder.exe <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a>  to get started. At the end of this exercise, you will be able to generate something like the below JSON File in few clicks in Informatica or any other Tool / Programming Language you prefer which has option to invoke command line&#8230;</li>
<li>For all possible command line options <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm" target="_blank" rel="noopener">Refer this</a></li>
<li>So lets get started</li>
</ol>
<h2>Sample JSON Created by ZappyShell from Informatica</h2>
<p>&nbsp;</p>
<div style="width: 680px" class="wp-caption alignnone"><img fetchpriority="high" decoding="async" class="figureimage" title="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-output.png" alt="Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)" width="670" height="626" /><p class="wp-caption-text">Sample JSON Created by Informatica Workflow (Create From Database SQL Query or Tables)</p></div>
<h2>Create Command Line to Export JSON File from Database SQL Query / Tables</h2>
<p>In this section, we will see how to build Command Line which you can then execute in Informatica Command Time and later Schedule Export Job to Produce JSON File on a predefined schedule or manually.</p>
<ol>
<li>Open DbCommandBuilder.exe and configure the Connection / Data source(s) <a href="https://zappysys.com/onlinehelp/zappyshell/index.htm#page=db/db.htm">as listed here</a> .<img decoding="async" class="figureimage" title="ZappyShell - Open Installed File or Directory" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/open-zappyshell.png" alt="ZappyShell - Open Installed File or Directory" /></li>
<li>Select JSON Export Option from the Dropdown. You can also choose XML, Excel or CSV<img decoding="async" class="figureimage" title="XML file generate" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="XML file generate" /></li>
<li>You can use the Custom Layout Option if you wish to Export using custom Output Layout else just choose tables you like to export or type SQL query.<br />
<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout.png" alt="JSON Custom Layout" /></li>
<li>Configure your Input Dataset(s) (can be SQL Queries or Tables) and define Desired Layout for your Output File.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-dataset.png" alt="JSON Custom Layout - Add Dataset" /></li>
<li>Here is just an example of how to define an Array for a nested layout in a JSON or XML file.<img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-json-custom-layout-add-element-in-document-array.png" alt="Layout Editor to define Structure of JSON / XML Output" /></li>
<li>t the end of configuration you may see command line like below (more examples <a href="https://zappysys.com/onlinehelp/zappyshell/scr/db/db-db-export.htm">listed here</a>)<strong>Example: Simple mode Export (Microsoft SQL Server)</strong><br />
<pre class="crayon-plain-tag">db.exe export customers --json -o c:\data\cust.json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
<strong>Example: For Simple mode Export (MySQL SQL Server &#8211; ODBC Driver)</strong><br />
<pre class="crayon-plain-tag">export customers --out c:\data\customers.json --json --overwrite --connstr "Driver={MySQL ODBC 5.2 ANSI Driver};Server=your_server_name_or_ip;Port=3306;Uid=user1;pwd=SomeP@ssword;Database=your_db_name"</pre>
<strong><strong>Example: For custom layout mode Export<br />
</strong></strong><br />
<pre class="crayon-plain-tag">export --map c:\data\MySampleMap.xml -o c:\data\customers.json --json --connstr "Data Source=localhost;Initial Catalog=Northwind;Integrated Security=SSPI;" -y</pre>
</li>
<li>Once the Command line is created you can click <strong>Run</strong> to test and then copy it into tools like Informatica Command Task (see next section).</li>
</ol>
<h2>Export / Create JSON File In Informatica</h2>
<ol>
<li>Once the command line is prepared (see previous section) we can open Informatica Developer (D)</li>
<li>Connect to your Repository and create a new workflow</li>
<li>Drag new Command Task, from Toolbox and double click to edit
<div id="attachment_10021" style="width: 691px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png"><img decoding="async" aria-describedby="caption-attachment-10021" class="size-full wp-image-10021" src="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png" alt="Informatica Command Task" width="681" height="281" srcset="https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task.png 681w, https://zappysys.com/blog/wp-content/uploads/2023/03/informatica-command-task-300x124.png 300w" sizes="(max-width: 681px) 100vw, 681px" /></a><p id="caption-attachment-10021" class="wp-caption-text">Informatica Command Task</p></div></li>
<li>Enter the sample command line we obtained from the previous step</li>
<li>Save the workflow and run it&#8230; That&#8217;s it you will see the JSON file generated</li>
</ol>
<h2>Export / Create XML File In Informatica</h2>
<p>Same Steps as above except choose File format as XML and you will see output like the below once you run the command line.</p>
<div style="width: 905px" class="wp-caption alignnone"><img decoding="async" class="figureimage" title="Export / Create XML File In Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-xml.png" alt="Export / Create XML File In Informatica" width="895" height="160" /><p class="wp-caption-text">Export / Create XML File In Informatica</p></div>
<h2>Export / Create CSV File In Informatica</h2>
<p>Same Steps as above except choose File format as CSV and you will see output like the below once you run the command line.</p>
<div style="width: 817px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="figureimage" title="Generate CSV Files in Informatica" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/dbcommandbuilder/db-command-builder-csv-output.png" alt="Generate CSV Files in Informatica" width="807" height="507" /><p class="wp-caption-text">Generate CSV Files in Informatica</p></div>
<h2>Export / Create Excel File In Informatica</h2>
<p>Same Steps as above except choose File format as Excel and you will see output like the below once you run the command line.</p>
<p><img decoding="async" src="https://zappysys.com/onlinehelp/zappyshell/scr/images/export-sql-server-table-to-excel-split-by-column.png" alt="Export SQL Server Table to Excel files (split automatically using group by column)" /></p>
<h2>Conclusion</h2>
<p>In this post, we just saw how easy it is to generate JSON / XML / Excel or CSV files in tools like Informatica, Talend, python, PowerShell in few clicks without coding. You can schedule job to generate JSON / XML files from Database tables or SQL Query. <a href="https://zappysys.com/products/zappyshell/download/">Download ZappyShell</a> Today and try it to see what else you can do with it.</p>
<p>The post <a href="https://zappysys.com/blog/export-create-json-file-informatica-sql-query-database-tables/">Export / Create JSON File in Informatica (from SQL Query / Database Tables)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Get Office 365 Mail Attachments using SSIS</title>
		<link>https://zappysys.com/blog/get-office-365-mail-attachments-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 22 Feb 2020 08:27:34 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS JSON Parser Transform]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS Template Transform]]></category>
		<category><![CDATA[SSIS Trash Destination]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[attachments]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[office 365]]></category>
		<category><![CDATA[outlook]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8791</guid>

					<description><![CDATA[<p>Introduction In our previous article, we saw how to get Office 365 data in Power BI. Now, let’s look at how to get Office 365 Mail Attachments using SSIS without any coding. Microsoft Graph API is a unified way to access many Microsoft services, including the Office 365 API. In this post, we will use the SSIS [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-office-365-mail-attachments-using-ssis/">How to Get Office 365 Mail Attachments using SSIS</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:#e5dd9d;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:#fff7b7;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/outlook-mail-connector/ssis">Outlook Mail (Office 365) connector</a>, which makes it much simpler to <strong>download attachments, read/search emails, users, mail folders, send email, and more in SSIS</strong> compared to the steps listed in this article. You can still use the steps from this article, but if you are new to APIs or want to avoid the learning curve, use a newer approach.</div></div>
<p><a href="//zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration.png"><img loading="lazy" decoding="async" class="alignleft wp-image-1694" src="//zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration.png" alt="" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration.png 241w, https://zappysys.com/blog/wp-content/uploads/2017/08/microsoft-office-365-api-integration-150x150.png 150w" sizes="(max-width: 100px) 100vw, 100px" /></a><span style="box-sizing: border-box; margin: 0px; padding: 0px;">In our previous article, we saw <a href="https://zappysys.com/blog/get-office-365-data-in-power-bi-using-microsoft-graph-api-and-odbc/" target="_blank" rel="noopener">how to get Office 365 data in Power BI</a>.</span> Now, let’s look at how to get Office 365 Mail Attachments using SSIS without any coding. <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/overview" target="_blank" rel="noopener">Microsoft Graph API</a> is a unified way to access many Microsoft services, including the <strong>Office 365 API</strong>. In this post, we will use the <a href="//zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON</a><span style="box-sizing: border-box; margin: 0px; padding: 0px;"><a target="_blank" rel="noopener">/REST API Source Connector</a> to retrieve the Outlook Messages list and its attachments</span>.</p>
<h2></h2>
<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>Use Case of Microsoft Graph API</h2>
<p>Here are some use cases for why you want to use the Microsoft Graph API</p>
<ul>
<li>Read/Write events from <strong>Outlook Calendar</strong></li>
<li>Send <strong>email</strong>  / Read <strong>emails</strong></li>
<li>Get the list of files from <strong>OneDrive</strong></li>
<li>Upload/ Download files to <strong>OneDrive</strong></li>
<li>Read/Write <strong>Excel Sheet</strong> (Use range or a specific range of a specific sheet)</li>
<li>Read <b>the SharePoint</b> Document library</li>
<li>Search content from <b>the SharePoint</b> document library</li>
<li>Get AD users for your Organization (AD Accounts)</li>
<li>Update OneNote</li>
<li>Track changes to Users, Events, Calendar Items using the <a href="https://developer.microsoft.com/en-us/graph/docs/concepts/delta_query_overview" target="_blank" rel="noopener">delta API</a></li>
</ul>
<div class="content_block" id="custom_post_widget-5670"><h2 style="text-align: left;">Register Application (OAuth2 App for Graph API)</h2>
<p style="text-align: left;">The first step to access any Office 365 API / Graph API is to register an OAuth App in the Azure Portal. After
following these steps, you will get the following two items to use in the next section:</p>

<ul style="text-align: left;">
 	<li>Application Id</li>
 	<li>Application Secret</li>
</ul>
<p style="text-align: left;">In this section, you will learn how to register a custom app in Microsoft Azure portal that will allow access to the
OneDrive. So, let's get started -</p>

<ol>
 	<li style="text-align: left;">Log into <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps">Microsoft
Azure portal</a> to register a custom app.</li>
 	<li style="text-align: left;">Register a new application by clicking New Registration link.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png"><img loading="lazy" decoding="async" class="size-full wp-image-9034" src="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png" alt="New App Registration in Azure portal" width="748" height="221" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png 748w, https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration-300x89.png 300w" sizes="(max-width: 748px) 100vw, 748px" /></a></li>
 	<li style="text-align: left;">Provide the name of the custom app and who can access the app in the organization.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9005 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg" alt="Register an OneDrive App" width="610" height="518" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg 610w, https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1-300x255.jpg 300w" sizes="(max-width: 610px) 100vw, 610px" /></a></li>
 	<li style="text-align: left;">Go to the App overview and add a Redirect URL.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg"><img loading="lazy" decoding="async" class="wp-image-9044 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg" alt="Add a Redirect URL" width="937" height="122" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg 937w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-300x39.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1-768x100.jpg 768w" sizes="(max-width: 937px) 100vw, 937px" /></a></li>
 	<li style="text-align: left;">Click on "Add a Platform" under Platform Configuration section and then select "Web" under Web applications
section to enter a Redirect URL.
<pre class="lang:default decode:true">https://zappysys.com/oauth</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9007" src="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg" alt="Redirect URL" width="466" height="564" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg 466w, https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2-248x300.jpg 248w" sizes="(max-width: 466px) 100vw, 466px" /></a></li>
 	<li style="text-align: left;">Create a Client Secret key which will be used to Authenticate the custom Azure app.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9010" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg" alt="Add a Client Secret" width="576" height="403" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg 576w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret-300x210.jpg 300w" sizes="(max-width: 576px) 100vw, 576px" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9011" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg" alt="Secret Key Expiration Period" width="208" height="259" /></a><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9012" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg" alt="Specify Secret Key" width="1024" height="176" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg 1024w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-300x52.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3-768x132.jpg 768w" sizes="(max-width: 1024px) 100vw, 1024px" /></a>
<div><strong>Note</strong> - Take a note of <strong>Client Secret</strong>, it will be required while
configuring OAuth connection in the SSIS later</div></li>
 	<li style="text-align: left;">Add API Permissions.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9008" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions.jpg" alt="OneDrive API Permissions" width="1291" height="415" /></a></li>
 	<li style="text-align: left;">Select following permissions from the Delegated Permissions section.
<pre class="lang:default decode:true">User.ReadBasic.All
Files.Read
offline_access</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg"><img loading="lazy" decoding="async" class="size-full wp-image-9009" src="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg" alt="Select Delegated Permissions" width="512" height="571" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg 512w, https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2-269x300.jpg 269w" sizes="(max-width: 512px) 100vw, 512px" /></a></li>
 	<li>Take a note of Client ID, it will be required while configuring OAuth connection in the SSIS later.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg"><img loading="lazy" decoding="async" class="wp-image-9013 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret4.jpg" alt="App Client ID" width="810" height="274" /></a></li>
</ol></div>
<h2>Step-By-Step to call the Microsoft Graph Rest API Using SSIS</h2>
<p>Now, let&#8217;s look at examples to access your Outlook.com emails using SSIS. You can use the same techniques to call pretty much any Office 365 API.</p>
<h3>Configure SSIS OAuth Connection for Graph REST API</h3>
<p>The first step to access any Graph API is to configure an OAuth connection</p>
<ol>
<li>Open Visual Studio</li>
<li>Open an existing SSIS Project or create a new one using File &gt; New &gt; Project &gt; Choose “Integration Services Project” Type under Business Intelligence template category.</li>
<li>Create Package</li>
<li>Right-click inside the Connection Managers area and click <strong>New Connection…</strong></li>
<li>From the connection type list, select the <strong>ZS-OAUTH</strong> connection type.
<div id="attachment_11825" style="width: 959px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11825" class="size-full wp-image-11825" src="https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager.png" alt="" width="949" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager.png 949w, https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager-300x141.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/Create-a-new-SSIS-OAuth-API-Connection-Manager-768x362.png 768w" sizes="(max-width: 949px) 100vw, 949px" /></a><p id="caption-attachment-11825" class="wp-caption-text">Create a new SSIS OAuth API Connection Manager</p></div></li>
<li>On the OAuth Connection Manager, configure the following options
<ol style="list-style-type: lower-alpha;">
<li>Select &#8220;Custom&#8221; from the Provider dropdown</li>
<li>Select OAuth2 from the OAuth version</li>
<li>Enter your Application Id and Secret Key (i.e., App Password) obtained in the previous section <a href="https://apps.dev.microsoft.com/#/appList" target="_blank" rel="noopener">from here</a>.</li>
<li>Enter the following URL in the Authorization URL<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/authorize</pre>
</li>
<li>Use the following URL in the token URL field<br />
<pre class="crayon-plain-tag">https://login.microsoftonline.com/common/oauth2/v2.0/token</pre>
</li>
<li>Enter the following <a href="https://developer.microsoft.com/en-us/graph/docs/authorization/permission_scopes" target="_blank" rel="noopener">Graph API Scopes</a> (each scope must be entered on a new line).<br />
<pre class="crayon-plain-tag">user.read
mail.read
offline_access</pre>
<div class="su-note"  style="border-color:#e5dd9d;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:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">NOTE: Always include <strong>the offline_access</strong> scope, which returns a refresh_token, which allows you to renew the token without going through the login process again. <span style="box-sizing: border-box; margin: 0px; padding: 0px;">For more information about which scopes are needed, always refer to the API help page (e.g., if you want to read mail using <a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/api/user_list_messages" target="_blank" rel="noopener">this API,</a> then you will see it says you can use <strong>Mail.Read</strong> or <strong>Mail.ReadWrite</strong> scope).</span></div></div></li>
<li>Go to the <strong>Advanced tab</strong> and enter the following URL in the Callback/Return URL (assuming the same URL used when you registered the App in the previous section)<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>
</li>
<li>Now go back to the first tab and click Generate Token. When prompted, log in using your Personal Microsoft Account or Work Account (Office 365 or AD login)</li>
<li>After logging in, you will see the Accept option. Just click it. If things go right, then you will see the Access Token and Refresh Token fields populated.</li>
</ol>
</li>
<li>Once everything is configured, you can click <strong>Test Connection</strong> to verify the connection works.
<div class="mceTemp"></div>
<div id="attachment_11832" style="width: 713px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11832" class="size-full wp-image-11832" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API.png" alt="" width="703" height="754" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API.png 703w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-OAuth-Connection-Manager-for-Office-365-REST-API-Microsoft-Graph-API-280x300.png 280w" sizes="(max-width: 703px) 100vw, 703px" /></a><p id="caption-attachment-11832" class="wp-caption-text">SSIS OAuth Connection Manager for Office 365 REST API Microsoft Graph API</p></div></li>
</ol>
<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: Typically, RefreshToken is long-lived, but in some cases, they may expire soon too. If that’s the case, then you can configure the above OAuth connection to change the refresh token pattern. Simply enter the token file path and re-authenticate by clicking Generate Token. After that, each time you make an API call, it will save a new refresh token in the file.</div></div>
<h3>Download the Messages Attachment Files from Outlook</h3>
<p>Let’s start with an example. We use the SSIS JSON Source and Web API Destination components to make a call to the Microsoft Graph REST API.</p>
<ol>
<li>First of all, drag and drop the <strong>Data Flow Task</strong> from the SSIS Toolbox and double-click it to edit.
<div id="attachment_11784" style="width: 485px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11784" class="size-full wp-image-11784" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow.png" alt="" width="475" height="178" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow.png 475w, https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-drop-Data-flow-300x112.png 300w" sizes="(max-width: 475px) 100vw, 475px" /></a><p id="caption-attachment-11784" class="wp-caption-text">Drag and drop Data flow</p></div></li>
<li>From the SSIS toolbox, drag and drop the<strong> JSON Source</strong> onto the Data Flow Designer surface.
<div class="mceTemp"></div>
<div id="attachment_11533" style="width: 553px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11533" class="size-full wp-image-11533" src="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png" alt="" width="543" height="146" srcset="https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag.png 543w, https://zappysys.com/blog/wp-content/uploads/2015/09/ssis-json-source-adapter-drag-300x81.png 300w" sizes="(max-width: 543px) 100vw, 543px" /></a><p id="caption-attachment-11533" class="wp-caption-text">SSIS JSON Source &#8211; Drag and Drop</p></div></li>
<li>Double-click the <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/?"><strong>JSON Source</strong></a>, then enter the following URL to invoke the Messages API call with search options to retrieve emails with attachments.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/messages?$select=sentDateTime,from,subject,hasAttachments&amp;$search="hasAttachments:True"</pre>
Set the filter to <code>$.value[*]</code> and click the preview.</p>
<div id="attachment_11831" style="width: 837px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11831" class="size-full wp-image-11831" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example.png" alt="" width="827" height="887" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example.png 827w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example-280x300.png 280w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-JSON-Source-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Read-Mail-Example-768x824.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-11831" class="wp-caption-text">SSIS JSON Source – Get data from Microsoft Graph API (Office 365 API – Read Mail Example)</p></div>
<p>To customize the URL with additional parameters, check <a href="https://developer.microsoft.com/en-us/graph/docs/overview/query_parameters" target="_blank" rel="noopener">this help link</a>. It’s a standard OData Protocol, so you can leverage many common OData features (e.g., use $top parameters to set pageSize. Default is 10 for List Mail, but you can include more records per response by changing it, such as <strong>…/messages?$top=50</strong>).</li>
<li> Now, let&#8217;s use Template Transform to set the URL using the message ID to make the <a href="https://docs.microsoft.com/en-us/graph/api/attachment-get?view=graph-rest-1.0&amp;tabs=http" target="_blank" rel="noopener">Get attachment API</a> call.</p><pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/messages/&lt;%id%&gt;/attachments</pre><p>
<div id="attachment_11833" style="width: 848px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11833" class="size-full wp-image-11833" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id.png" alt="" width="838" height="560" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id.png 838w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id-768x513.png 768w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Template-Transform-sending-attachment-id-272x182.png 272w" sizes="(max-width: 838px) 100vw, 838px" /></a><p id="caption-attachment-11833" class="wp-caption-text">SSIS Template Transform sending attachment id</p></div>
<div class="mceTemp"></div>
</li>
<li>Now we need to use the <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/?_gl=1*1fgshu4*_up*MQ..*_gs*MQ..&amp;gclid=CjwKCAiAzZ_NBhAEEiwAMtqKy8lyVraD40LVoEOcaJPgdN6RaL8j21-KaDKKbrh3VFlYirORdiQ3MxoCtO8QAvD_BwE&amp;gbraid=0AAAAADhWWLJ5j927a8ePIZceRs447LN9W"><strong>Web API Destination</strong></a> to make the Get Attachment API call by message ID. Select the Input column for URL as that TemplateOutput.
<div id="attachment_11834" style="width: 733px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11834" class="size-full wp-image-11834" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example.png" alt="" width="723" height="775" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example.png 723w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Web-API-Destination-–-Get-data-from-Microsoft-Graph-API-Office-365-API-–-Get-Attachment-Example-280x300.png 280w" sizes="(max-width: 723px) 100vw, 723px" /></a><p id="caption-attachment-11834" class="wp-caption-text">SSIS Web API Destination – Get data from Microsoft Graph API (Office 365 API – Get Attachment Example)</p></div></li>
<li>Now, the next step is to parse the JSON Response String of the get attachment api call. For that, we need to use a <strong><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=22259122063&amp;utm_content=&amp;utm_term=&amp;gad_source=1&amp;gad_campaignid=22582753584&amp;gbraid=0AAAAADhWWLJ5j927a8ePIZceRs447LN9W&amp;gclid=CjwKCAiAzZ_NBhAEEiwAMtqKy1ZTPt9tVn9Xy9xU7z27q__H4RRoMa_SfgZg5L8maavtcr5HfzCl0RoC6_sQAvD_BwE">JSON Parser</a></strong>. Select the input as Web PAI Destination ResponseText and use the below sample JSON string to configure the metadata(Columns).<br />
<pre class="crayon-plain-tag">{"@odata.context":"https://graph.microsoft.com/v1.0/$metadata#users('support%40zappysys.com')/messages('AQMkADAwATMwMAItMDkyMC0zZTg4AC0wMAItMDAKAEYAAAP_JUy')/attachments"
,"value":[{"@odata.type":"#microsoft.graph.fileAttachment","@odata.mediaContentType":"text/plain"
,"id":"AQMkADAwATMwMAItMDkyMC0zZTg4AC0wMAItMDAKAEYAAAP_JUy_27M"
,"lastModifiedDateTime":"2020-02-21T07:36:16Z"
,"name":"Test.txt","contentType":"text/plain","size":870,"isInline":false
,"contentId":null,"contentLocation":null,"contentBytes":"VGVzdCBNZXNzYWdl"}]}</pre>
<div id="attachment_11828" style="width: 1043px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11828" class="size-full wp-image-11828" src="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example.png" alt="" width="1033" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example.png 1033w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example-300x207.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example-1024x707.png 1024w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-using-JSON-example-768x530.png 768w" sizes="(max-width: 1033px) 100vw, 1033px" /></a><p id="caption-attachment-11828" class="wp-caption-text">JSON Parser Transform &#8211; using JSON example</p></div>
<div class="mceTemp"></div>
</li>
<li> Now, in the JSON Parser, go to the Go-to columns Tab and set the <strong>contentBytes</strong> DataType to <strong>DT_IMAGE,</strong> and increase the other columns&#8217; <strong>DT_WSTR</strong> lengths by 1000 and 1500. We set contentBytes to the <strong>DT_IMAGE</strong>  datatype, which is like varbinary(MAX).
<div id="attachment_11829" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11829" class="size-full wp-image-11829" src="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype.png" alt="" width="828" height="611" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype.png 828w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype-300x221.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/JSON-Parser-Transform-Columns-Tab-fix-the-datatype-768x567.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11829" class="wp-caption-text">JSON Parser Transform Columns Tab fix the datatype</p></div></li>
<li>Furthermore, in the next step, we need to use an SSIS Derived Column to set the FilePath where we want to save the attachments, and then concatenate the local file path with the attachment name column.
<div id="attachment_11830" style="width: 798px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11830" class="size-full wp-image-11830" src="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1.png" alt="" width="788" height="624" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1.png 788w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/SSIS-Derived-Column-Add-New-Column-1-768x608.png 768w" sizes="(max-width: 788px) 100vw, 788px" /></a><p id="caption-attachment-11830" class="wp-caption-text">SSIS Derived Column: Add New Column</p></div></li>
<li>Finally, we need to use the <a href="https://docs.microsoft.com/en-us/sql/integration-services/data-flow/transformations/export-column-transformation?view=sql-server-ver15" target="_blank" rel="noopener">Export Column</a> Transform (Native) to export attachment bytes to a local file. It needs to know 2 upstream info Bytes and the target file path.
<div id="attachment_11827" style="width: 763px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11827" class="size-full wp-image-11827" src="https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration.png" alt="" width="753" height="637" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration.png 753w, https://zappysys.com/blog/wp-content/uploads/2020/02/Export-Column-configuration-300x254.png 300w" sizes="(max-width: 753px) 100vw, 753px" /></a><p id="caption-attachment-11827" class="wp-caption-text">Export Column configuration</p></div></li>
<li>Make sure to attach the export column to some destination (e.g., our ZS Trash Destination); the engine might remove it. At the same time, it optimizes the runtime. It may remove all transformations that don&#8217;t have a destination, such as deploying the package to SQL Server, or when you set optimize in Visual Studio.</li>
<li>That&#8217;s it, execute the package, and it will download all the email attachments.
<div id="attachment_11826" style="width: 1050px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11826" class="size-full wp-image-11826" src="https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments.png" alt="" width="1040" height="559" srcset="https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments.png 1040w, https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments-300x161.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments-1024x550.png 1024w, https://zappysys.com/blog/wp-content/uploads/2020/02/Downloaded-Mail-Attachments-768x413.png 768w" sizes="(max-width: 1040px) 100vw, 1040px" /></a><p id="caption-attachment-11826" class="wp-caption-text">Downloaded Mail Attachments</p></div></li>
</ol>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, in this article, we learned how to make a Microsoft Graph API REST API call. We used the <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS JSON / REST API Connector</a> to extract data from Outlook Mail using OAuth. Made the Get attachment API call using the <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> and parsed the JSON response using the <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser</a>. And using the Native SSIS Export Column, we saved the export attachment&#8217;s bytes to a local file. 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>
<li style="list-style-type: none;">
<ul>
<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></li>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-web-api-destination.htm" target="_blank" rel="noopener">Web API Destination</a></li>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-json-parser-transform.htm" target="_blank" rel="noopener">JSON Parser Transform</a></li>
<li><a href="https://docs.microsoft.com/en-us/graph/overview" target="_blank" rel="noopener">Overview of the Microsoft Graph API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/get-office-365-mail-attachments-using-ssis/">How to Get Office 365 Mail Attachments using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read data from ElasticSearch using SSIS</title>
		<link>https://zappysys.com/blog/read-data-from-elasticsearch-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 20 Dec 2019 10:02:31 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[API Integration]]></category>
		<category><![CDATA[elasticsearch]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8573</guid>

					<description><![CDATA[<p>Introduction In our previous article, we see how to load data into Elastic Search using SSIS. Now let&#8217;s look at how to read data from ElasticSearch using SSIS and load response into SQL Server. Elasticsearch is a powerful engine that allows you to store, aggregate, and, most importantly, search data in a very analytical way. In this tutorial, you [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-data-from-elasticsearch-using-ssis/">How to read data from ElasticSearch using SSIS</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/elasticsearch-connector/">API Connector for ElasticSearch</a> which makes it much simpler to <strong>Read/Write ElasticSearch 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 a learning curve with API then use a newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> preconfigured ready-to-use API connectors that 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, and Informatica).</p>
</div></div>
<img loading="lazy" decoding="async" class="alignleft wp-image-1406 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2017/06/elasticsearch-logo-180x180-150x150.png" alt="" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/elasticsearch-logo-180x180-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2017/06/elasticsearch-logo-180x180.png 180w" sizes="(max-width: 150px) 100vw, 150px" /></p>
<p>In our previous article, we see how to <a href="https://zappysys.com/blog/load-data-from-sql-server-to-elasticsearch-using-ssis/" target="_blank" rel="noopener">load data into Elastic Search using SSIS</a>. Now let&#8217;s look at <strong>how to read data from ElasticSearch using SSIS</strong> and load response into SQL Server.</p>
<p><a href="https://www.elastic.co/" target="_blank" rel="noopener">Elasticsearch</a> is a powerful engine that allows you to store, aggregate, and, most importantly, search data in a very analytical way. In this tutorial, you will learn how to load <em>Elasticsearch </em>data to <em>SQL Server </em>with <a href="https://docs.microsoft.com/en-us/sql/integration-services/sql-server-integration-services" target="_blank" rel="noopener"><acronym title="SQL Server Integration Services">SSIS</acronym></a> (part of SQL Server) and <a href="//zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys PowerPack</a>. We also see how to set the maximum result window of the index using the Rest API Task.</p>
<p>In a nutshell, this post will focus on how to Make Elasticsearch Search API call using SSIS.</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><span id="CallUPSREST_API_using_SSIS">Step-By-Step to Call Elasticsearch API call<span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS"> using SSIS</span></span></h2>
<h3>Read from Elasticsearch Search API call</h3>
<p>Let&#8217;s make the Elasticsearch <a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html" target="_blank" rel="noopener">Search API</a> call using the JSON source to get all the records of the index with pagination.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<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="" 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>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to make Search API Call on the index.<br />
<pre class="crayon-plain-tag">http://{elasticsearch-site-url}/{index}/{index-type}/_search</pre>
</li>
<li>Now check Use credentials and <em>Select Connection</em> section press <pre class="crayon-plain-tag">&lt;New ZS-HTTP Connection&gt;</pre>.
<div id="attachment_1676" style="width: 972px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/08/ssis-json-source-rest-api-http-basic-authentication-pass-userid-password.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1676" class="size-full wp-image-1676" src="https://zappysys.com/blog/wp-content/uploads/2015/08/ssis-json-source-rest-api-http-basic-authentication-pass-userid-password.png" alt="SSIS JSON Source - Passing Basic Credentials (Supply UserID / Password) using HTTP Connection" width="962" height="757" srcset="https://zappysys.com/blog/wp-content/uploads/2015/08/ssis-json-source-rest-api-http-basic-authentication-pass-userid-password.png 962w, https://zappysys.com/blog/wp-content/uploads/2015/08/ssis-json-source-rest-api-http-basic-authentication-pass-userid-password-300x236.png 300w, https://zappysys.com/blog/wp-content/uploads/2015/08/ssis-json-source-rest-api-http-basic-authentication-pass-userid-password-768x604.png 768w" sizes="(max-width: 962px) 100vw, 962px" /></a><p id="caption-attachment-1676" class="wp-caption-text">SSIS JSON Source &#8211; Passing Basic Credentials (Supply UserID / Password) using HTTP Connection</p></div></li>
<li>Once the <em>HTTP Connection Manager</em> window opens configure the connection to your Elasticsearch instance:
<ul>
<li>Set <em>Web Url</em>, which points to your Elasticsearch instance.</li>
<li>Set <em>Credentials Type</em> to <pre class="crayon-plain-tag">Basic - UserID/Password</pre> (or other appropriate authentication methods).</li>
<li>Finally, set <em>User Name</em> and <em>Password:<br />
</em></p>
<div id="attachment_1419" style="width: 330px" class="wp-caption alignnone"><a href="//zappysys.com/blog/wp-content/uploads/2017/06/ssis-post-data-to-elasticsearch-configure-http-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1419" class="wp-image-1419 size-full" src="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-post-data-to-elasticsearch-configure-http-connection.png" alt="Configure SSIS HTTP Connection to connect to Elasticsearch" width="320" height="207" srcset="https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-post-data-to-elasticsearch-configure-http-connection.png 320w, https://zappysys.com/blog/wp-content/uploads/2017/06/ssis-post-data-to-elasticsearch-configure-http-connection-300x194.png 300w" sizes="(max-width: 320px) 100vw, 320px" /></a><p id="caption-attachment-1419" class="wp-caption-text">Configure SSIS <em>HTTP Connection</em> to connect to Elasticsearch</p></div></li>
</ul>
</li>
<li>Now, select method as POST and set for and size value in the body to get data using pagination. Set the content type as JSON (application/json).<br />
<pre class="crayon-plain-tag">{"from" : &lt;%page%&gt;, "size" : 100}</pre>
</li>
<li>Furthermore, go to the pagination tab and configure pagination like the below screenshot makes sure we need to enter increment size the same as given in body size value therefor 100.
<div id="attachment_8600" style="width: 747px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-pagination-post-data-mode.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8600" class="size-full wp-image-8600" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-pagination-post-data-mode.png" alt="Pagination Mode : POST data in body" width="737" height="720" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-pagination-post-data-mode.png 737w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-pagination-post-data-mode-300x293.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-8600" class="wp-caption-text">Pagination Mode: POST data in the body</p></div></li>
<li>That&#8217;s it now select the desired filter and click on the Preview button.<a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-preview-elasticsearch-api.png"><img loading="lazy" decoding="async" class="aligncenter size-medium_large wp-image-8597" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-preview-elasticsearch-api-768x657.png" alt="" width="720" height="616" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-preview-elasticsearch-api-768x657.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-preview-elasticsearch-api-300x257.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-json-source-preview-elasticsearch-api.png 917w" sizes="(max-width: 720px) 100vw, 720px" /></a></li>
<li>That&#8217;s it we are ready to load the data in the SQL Server.</li>
</ol>
<h3>For more than 10000 rows</h3>
<p>When you try to get more than 100000 rows you will get the next error message</p><pre class="crayon-plain-tag">{
    "error": {
        "root_cause": [
            {
                "type": "illegal_argument_exception",
                "reason": "Result window is too large, from + size must be less than or equal to: [10000] but was [11000]. See the scroll api for a more efficient way to request large data sets. This limit can be set by changing the [index.max_result_window] index level setting."
            }
        ]
    },
    "status": 400
}</pre><p>
Here is how to configure your JSON Source to pull more than 10K rows using Scroll Method.</p>
<ol>
<li>In Settings Tab: In the Body and URL rather than Index name use <pre class="crayon-plain-tag">[$tag$]</pre></li>
<li>In the filter type: <pre class="crayon-plain-tag">$.hits.hits[*]._source</pre></li>
<li>Uncheck Include Parent
<div id="attachment_10804" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/JSON-source-tag.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10804" class="size-full wp-image-10804" src="https://zappysys.com/blog/wp-content/uploads/2019/12/JSON-source-tag.png" alt="Elasticsearch JSON source general tab" width="828" height="808" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/JSON-source-tag.png 828w, https://zappysys.com/blog/wp-content/uploads/2019/12/JSON-source-tag-300x293.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/JSON-source-tag-768x749.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-10804" class="wp-caption-text">Elasticsearch example for more than 10000 rows</p></div></li>
<li>In Pagination Tab, Set Next Link as below <pre class="crayon-plain-tag">$._scroll_id</pre></li>
<li>Stop Indicator Attribute as below <pre class="crayon-plain-tag">$.hits.hits[0]._id</pre></li>
<li>Stop Indicator Value as <pre class="crayon-plain-tag">regex=^$</pre>
<div id="attachment_10805" style="width: 676px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-pagination-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10805" class="size-full wp-image-10805" src="https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-pagination-tab.png" alt="Elasticsearch JSON source pagination tab" width="666" height="299" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-pagination-tab.png 666w, https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-pagination-tab-300x135.png 300w" sizes="(max-width: 666px) 100vw, 666px" /></a><p id="caption-attachment-10805" class="wp-caption-text">Elasticsearch pagination tab configuration</p></div></li>
<li>In Advanced Pagination Tab, Check Has Different Page Info and Enable Page Token</li>
<li>Enter Page Place Holders as below (change YOUR_INDEX_NAME)<br />
<pre class="crayon-plain-tag">url=YOUR_INDEX_NAME/_search?scroll=10m|_search/scroll</pre></li>
<li>First Page Body as below &#8211; Change query as needed else keep it match all to fetch all rows from Index<br />
<pre class="crayon-plain-tag">{ "size":1000, "query": { "match_all": { }  } }</pre></li>
<li>Next Page Body as below <pre class="crayon-plain-tag">{  "scroll": "5m", "scroll_id": "[$pagetoken$]" }</pre>
<div id="attachment_10806" style="width: 676px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-advanced-pagination-tab.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10806" class="size-full wp-image-10806" src="https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-advanced-pagination-tab.png" alt="Elasticsearch JSON source advanced pagination tab" width="666" height="299" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-advanced-pagination-tab.png 666w, https://zappysys.com/blog/wp-content/uploads/2019/12/Elasticsearch-advanced-pagination-tab-300x135.png 300w" sizes="(max-width: 666px) 100vw, 666px" /></a><p id="caption-attachment-10806" class="wp-caption-text">Configuration for Elasticsearch advanced pagination tab</p></div></li>
</ol>
<h3>Loading Elasticsearch API 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>
<h3>Enable Deep Pagination Setting</h3>
<p>By default index, the maximum result window size is 10,000 means you can paginate upto 10000 rows. If you ever want to get more than 10000 result then you have to perform the following steps to change default setting from 10000 to 500000 (that&#8217;s max).</p>
<p>We need to send PUT request to below URL:</p><pre class="crayon-plain-tag">http://{elasticsearch-site-url}/{your-index}/_settings</pre><p>
Need to pass below body as I am setting max result window size value as 500000.</p><pre class="crayon-plain-tag">{ "index" : { "max_result_window" : 500000 } }</pre><p>
And set content-type as JSON (application/json) and click on Test Request/Response and it will make the API call and set the max window size.</p>
<div id="attachment_8577" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-rest-api-task-elasticsearch-put-setting-call.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8577" class="wp-image-8577 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-rest-api-task-elasticsearch-put-setting-call-768x419.png" alt="Rest API Task PUT Call" width="720" height="393" srcset="https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-rest-api-task-elasticsearch-put-setting-call-768x419.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-rest-api-task-elasticsearch-put-setting-call-300x164.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-rest-api-task-elasticsearch-put-setting-call-1024x559.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/12/ssis-rest-api-task-elasticsearch-put-setting-call.png 1221w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8577" class="wp-caption-text">Rest API Task PUT Call</p></div>
<p>That&#8217;s it we have successfully made the call to set the maximum result window size of the index.</p>
<h3></h3>
<h2>Common Errors</h2>
<div class="content_block" id="custom_post_widget-1887"><h3>Truncation related error</h3>
<p style="text-align: justify;">The most common error you may face when you run an SSIS package is truncation error. During the design time only 300 rows are scanned from a source (a file or a REST API call response) to detect datatypes but at runtime, it is likely you will retrieve far more records. So it is possible that you will get longer strings than initially expected. For detailed instructions on how to fix common metadata related errors read an article "<a href="//zappysys.com/blog/handling-ssis-component-metadata-issues/" target="_blank" rel="noopener">How to handle SSIS errors (truncation, metadata issues)</a>".</p>

<h3>Authentication related error</h3>
Another frequent error you may get is an authentication error, which happens when you deploy/copy a package to another machine and run it there. Check <a href="#Deployment_to_Production">the paragraph below</a> to see why it happens and how to solve this problem.</div>
<h2>Deployment to Production</h2>
<div class="content_block" id="custom_post_widget-1932"><p style="text-align: justify;">In SSIS package <a href="https://docs.microsoft.com/en-us/sql/integration-services/security/access-control-for-sensitive-data-in-packages" target="_blank" rel="noopener">sensitive data such as tokens and passwords are by default encrypted by SSIS</a> with your Windows account which you use to create a package. So SSIS will fail to decrypt tokens/passwords when you run it from another machine using another Windows account. To circumvent this when you are creating an SSIS package which uses authentication components (e.g. an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a> or an <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-http-connection-manager.htm" target="_blank" rel="noopener">HTTP Connection Manager</a> with credentials, etc.), consider using parameters/variables to pass tokens/passwords. In this way, you won’t face authentication related errors when a package is deployed to a production server.</p>
<p style="text-align: justify;">Check our article on <a href="https://zappysys.com/blog/how-to-run-an-ssis-package-with-sensitive-data-on-sql-server/" target="_blank" rel="noopener">how to configure packages with sensitive data on your production or development server</a>.</p></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you How to Make Elasticsearch Search API call using SSIS JSON Source and load response into SQL Server. In this article, we have seen that how to make a setting call to set the maximum result window of the index. 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>
<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></li>
<li><a href="https://www.elastic.co/guide/en/elasticsearch/reference/current/search.html" target="_blank" rel="noopener">Elasticsearch Search APIs </a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/read-data-from-elasticsearch-using-ssis/">How to read data from ElasticSearch using SSIS</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 Make UPS API call in SSIS</title>
		<link>https://zappysys.com/blog/make-ups-api-call-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 23 Nov 2019 08:01:18 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ups]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8376</guid>

					<description><![CDATA[<p>Introduction In our previous article we see How to read call REST API data in SSIS. Now in this article, we will see How to Make UPS API call in SSIS and load response into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call UPS REST API Call can be useful for any [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-ups-api-call-ssis/">How to Make UPS API call 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>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/11/UPS.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-8379 size-thumbnail" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/11/UPS-150x150.png" alt="UPS" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/11/UPS-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/11/UPS.png 300w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we see <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">How to read call REST API data in SSIS</a>. Now in this article, we will see <strong>How to Make UPS API call in SSIS</strong> and load response into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call UPS REST API Call can be useful for any developer regardless of which programming language or tool set you use. We will also see how to configure POST API Call.</p>
<p>We will go through the steps to make Pickup Creation Request API call which Returns a PRN and Rate Result and we load it into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to Make UPS REST API Call in SSIS.</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 UPS API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is UPS?</span></span></h2>
<p>United Parcel Service Founded in 1907, UPS is the world&#8217;s largest package delivery company and a leading global provider of specialised transportation and logistics services. Using advanced technology, access to global resources, and an integrated network of physical, technological, and human assets, UPS provides a powerful competitive advantage that can help you earn repeat customers and grow your business.</p>
<h2>Where to get the UPS Credentials?</h2>
<p>You can get Username and password by <a href="https://www.ups.com/doapp/signup" target="_blank" rel="noopener">signup</a> in UPS website and also need to get Access Key from <a href="https://www.ups.com/upsdeveloperkit/manageaccesskeys?loc=en_US" target="_blank" rel="noopener">UPS Developer Kit</a>.</p>
<h2>Call UPS <span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS">REST API using SSIS</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to UPS API, we will make Pickup Creation Request and load response into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to make Pickup Creation Request API Call and select Method as POST, I am using Testing URL but we need to use production one for real time API call.<br />
<strong>Testing: </strong><br />
<pre class="crayon-plain-tag">https://wwwcie.ups.com/rest/Pickup</pre>
<strong>Production: </strong><br />
<pre class="crayon-plain-tag">https://onlinetools.ups.com/rest/Pickup</pre>
<div id="attachment_8382" style="width: 667px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-url.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8382" class="wp-image-8382 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-url.png" alt="JSON Source Set URL" width="657" height="740" srcset="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-url.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-url-266x300.png 266w" sizes="(max-width: 657px) 100vw, 657px" /></a><p id="caption-attachment-8382" class="wp-caption-text">JSON Source Set URL</p></div></li>
<li>Furthermore, set below JSON string in the body and also replace your UPS username, password and access key in the placeholder, i used my dummy data you need to pass yours valid data.<br />
<pre class="crayon-plain-tag">{
	"UPSSecurity": {
		"UsernameToken": {
			"Username": "[YOUR USERNAME]",
			"Password": "[PASSWORD]"
		},
		"ServiceAccessToken": {
			"AccessLicenseNumber": "[ACCESS KEY]"
		}
	},
	"PickupCreationRequest": {
		"Request": {
			"TransactionReference": {
				"CustomerContext": "CustomerContext."
			}
		},
		"RatePickupIndicator": "Y",
		"TaxInformationIndicator": "Y",
		"PickupDateInfo": {
			"CloseTime": "1700",
			"ReadyTime": "1000",
			"PickupDate": "20191123"
		},
		"PickupAddress": {
			"CompanyName": "EIVR TEST NON-ACCOUNT PL 3",
			"ContactName": "EIVR TES PL",
			"AddressLine": "12380 Morris Rd",
			"City": "Louisville",
			"StateProvince": "KY",
			"PostalCode": "40201",
			"CountryCode": "US",
			"ResidentialIndicator": "N",
			"Phone": {
				"Number": "+48223803070"
			}
		},
		"AlternateAddressIndicator": "N",
		"PickupPiece": {
			"ServiceCode": "003",
			"Quantity": "1",
			"DestinationCountryCode": "US",
			"ContainerCode": "01"
		},
		"OverweightIndicator": "N",
		"PaymentMethod": "05"
	}
}</pre>
<div id="attachment_8383" style="width: 940px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-body.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8383" class="wp-image-8383 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-body.png" alt="JSON Source set Body" width="930" height="551" srcset="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-body.png 930w, https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-body-300x178.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-set-ups-body-768x455.png 768w" sizes="(max-width: 930px) 100vw, 930px" /></a><p id="caption-attachment-8383" class="wp-caption-text">JSON Source set Body</p></div></li>
<li>Now click on Select Filter button to get the desire filter.
<div id="attachment_8384" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-select-filter-ups.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8384" class="wp-image-8384 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-select-filter-ups-768x595.png" alt="JSON Source Select Filter" width="720" height="558" srcset="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-select-filter-ups-768x595.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-select-filter-ups-300x232.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-select-filter-ups.png 941w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8384" class="wp-caption-text">JSON Source Select Filter</p></div></li>
<li>Finally click on Preview button to load the data.
<div id="attachment_8385" style="width: 709px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-preview-ups.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8385" class="wp-image-8385 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-preview-ups.png" alt="JSON Source Preview" width="699" height="728" srcset="https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-preview-ups.png 699w, https://zappysys.com/blog/wp-content/uploads/2019/11/ssis-json-source-preview-ups-288x300.png 288w" sizes="(max-width: 699px) 100vw, 699px" /></a><p id="caption-attachment-8385" class="wp-caption-text">JSON Source Preview</p></div></li>
<li>That&#8217;s it we are ready to load UPS Pickup Creation Request API call response in SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load UPS REST API data into SQL Server</span></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><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to make UPS API call using SSIS JSON Source and load response into SQL Server. In this article we made Pickup Creation Request POST API call same way you can make other UPS API calls like Tracking API and Address Verification API and so on by passing relevant URL and JSON string. 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>
<li style="list-style-type: none;">
<ul>
<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></li>
<li><a href="https://www.ups.com/upsdeveloperkit?loc=en_US" target="_blank" rel="noopener">UPS Developer Kit</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/make-ups-api-call-ssis/">How to Make UPS API call in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Pivot CSV Data in SSIS</title>
		<link>https://zappysys.com/blog/pivot-csv-data-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 19 Oct 2019 08:22:53 +0000</pubDate>
				<category><![CDATA[SSIS CSV Source]]></category>
		<category><![CDATA[SSIS JSON Generator Transform]]></category>
		<category><![CDATA[SSIS JSON Parser Transform]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8207</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw How to write data into CSV file in SSIS (GZip / Split). Now in this blog, we will see How to Pivot CSV Data in SSIS using CSV Source. It also supports Pivot mode so you can convert single CSV string value into Rows. In this article we [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/pivot-csv-data-ssis/">How to Pivot CSV Data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-csv-file-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-3102 size-full alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/02/ssis-csv-file-source.png" alt="" width="100" height="100" /></a>In our previous blog we saw <a href="https://zappysys.com/blog/write-data-csv-file-ssis-gzip-split/" target="_blank" rel="noopener">How to write data into CSV file in SSIS (GZip / Split)</a>. Now in this blog, we will see <strong>How to Pivot CSV Data in SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-file-source-flat-file-web-api/" target="_blank" rel="noopener">CSV Source</a></strong>. It also supports Pivot mode so you can convert single CSV string value into Rows. In this article we also see how make some CSV columns as parent and not consider it in pivot and load it as it is using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-generator-transform/" target="_blank" rel="noopener">JSON Generator</a> and <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a> Pivot Option.</p>
<p>In nutshell, this post will focus on how to Pivot CSV Data into multiple columns and rows.</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>How to Pivot CSV Data in SSIS using CSV File Source</h2>
<p>Let´s start with an example. In this SSIS CSV Parser Transform example, we will Parse database column string into multiple columns and rows.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>Furthermore, drag and drop the CSV Source and Double click on it to configure it.
<div id="attachment_8212" style="width: 701px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8212" class="wp-image-8212 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source.png" alt="Drag and Drop : CSV Source from SSIS Toolbox" width="691" height="357" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source.png 691w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source-300x155.png 300w" sizes="(max-width: 691px) 100vw, 691px" /></a><p id="caption-attachment-8212" class="wp-caption-text">Drag and Drop : CSV Source from SSIS Toolbox</p></div></li>
<li>Enter the CSV file path and select desire column delimiter most common in CSV is comma and check the First Row as headers and click on preview.
<div id="attachment_8213" style="width: 683px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8213" class="wp-image-8213 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview.png" alt="CSV Source Preview" width="673" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview.png 673w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview-275x300.png 275w" sizes="(max-width: 673px) 100vw, 673px" /></a><p id="caption-attachment-8213" class="wp-caption-text">CSV Source Preview</p></div></li>
<li>Now, go to Pivot Columns to Rows Tab and checked Enable Pivoting and click on Preview Data to view the data.
<div id="attachment_8214" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-pivot-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8214" class="wp-image-8214 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-pivot-preview-768x643.png" alt="CSV Source Pivoted Data Preview" width="720" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-pivot-preview-768x643.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-pivot-preview-300x251.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-pivot-preview.png 874w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8214" class="wp-caption-text">CSV Source Pivoted Data Preview</p></div></li>
<li>That&#8217;s it we see how to read data from CSV File and also Pivot the CSV Data using CSV Source.</li>
<li>Now In the next section we will see how to how make some CSV columns as parent and not consider it in pivot and load it as it is.</li>
</ol>
<h2>How make some CSV columns as parent.</h2>
<p>Sometimes you just need to make child columns in to rows and want to leave parent level columns as it is.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>Secondly, drag and drop the CSV Source and Double click on it to configure it.
<div id="attachment_8212" style="width: 701px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8212" class="wp-image-8212 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source.png" alt="Drag and Drop : CSV Source from SSIS Toolbox" width="691" height="357" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source.png 691w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-drag-drop-csv-source-300x155.png 300w" sizes="(max-width: 691px) 100vw, 691px" /></a><p id="caption-attachment-8212" class="wp-caption-text">Drag and Drop : CSV Source from SSIS Toolbox</p></div></li>
<li>Furthermore, enter the file path and click on preview.
<div id="attachment_8213" style="width: 683px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8213" class="wp-image-8213 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview.png" alt="CSV Source Preview" width="673" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview.png 673w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-source-preview-275x300.png 275w" sizes="(max-width: 673px) 100vw, 673px" /></a><p id="caption-attachment-8213" class="wp-caption-text">CSV Source Preview</p></div></li>
<li>For example if we want to pivot Email and Phone only in pivoting and wants to exclude parent level columns FirstName and LastName as it is.</li>
<li>For that drag and drop JSON Generator Transform and Select Output Mode as <strong>Output One JSON Per Parent Input Row</strong>  and Add Unbound Nested Element and named it as <strong>Persons and click on OK</strong>.
<div id="attachment_8277" style="width: 638px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8277" class="wp-image-8277 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element.png" alt="JSON Generator Add Unbound Nested Element" width="628" height="624" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element.png 628w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element-300x298.png 300w" sizes="(max-width: 628px) 100vw, 628px" /></a><p id="caption-attachment-8277" class="wp-caption-text">JSON Generator Add Unbound Nested Element</p></div></li>
<li>Now add that two parent level fields FirstName and LastName in the Persons.
<div id="attachment_8278" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8278" class="wp-image-8278 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple.png" alt="JSON Generator Add Multiple Elements" width="736" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple.png 736w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple-300x254.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-8278" class="wp-caption-text">JSON Generator Add Multiple Elements</p></div></li>
<li>Now select Person Element and right click and Add Unbound Nested Element and <strong>named it as Contacts and click on OK</strong>.
<div id="attachment_8279" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element-in-attribute.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8279" class="wp-image-8279 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element-in-attribute.png" alt="JSON Generator Add Unbound Nested Element" width="736" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element-in-attribute.png 736w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-unbound-nested-element-in-attribute-300x254.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-8279" class="wp-caption-text">JSON Generator Add Unbound Nested Element</p></div></li>
<li>Now add that two child level fields Email and Phone in the Contacts.
<div id="attachment_8280" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple-attributes-2.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8280" class="wp-image-8280 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple-attributes-2.png" alt="JSON Generator Add Multiple Elements" width="736" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple-attributes-2.png 736w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-add-multiple-attributes-2-300x254.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-8280" class="wp-caption-text">JSON Generator Add Multiple Elements</p></div></li>
<li>Therefore JSON Generator Transform looks like below screen. Now Copy that Sample Preview JSON String to use it in the JSON Parser Transom as sample string.
<div id="attachment_8276" style="width: 743px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-sample-data.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8276" class="wp-image-8276 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-sample-data.png" alt="JSON Generator Transform - Sample Data" width="733" height="833" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-sample-data.png 733w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-generator-sample-data-264x300.png 264w" sizes="(max-width: 733px) 100vw, 733px" /></a><p id="caption-attachment-8276" class="wp-caption-text">JSON Generator Transform &#8211; Sample Data</p></div></li>
<li>Similarly, drag and drop JSON Parser Transform and select the Input JSON Column and Paste that copied Sample JSON String and select the Contacts filter to read the Child data and click on Include Parent.
<div id="attachment_8281" style="width: 853px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-select-filter.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8281" class="wp-image-8281 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-select-filter.png" alt="JSON Parser Transform - Select Filter " width="843" height="650" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-select-filter.png 843w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-select-filter-300x231.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-select-filter-768x592.png 768w" sizes="(max-width: 843px) 100vw, 843px" /></a><p id="caption-attachment-8281" class="wp-caption-text">JSON Parser Transform &#8211; Select Filter</p></div></li>
<li>Now go to Pivot Columns to Rows Tab and checked the Enable Pivoting and click on the Preview.
<div id="attachment_8282" style="width: 608px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-enable-pivoting.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8282" class="wp-image-8282 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-enable-pivoting.png" alt="JSON Parser Transform - Enable Pivoting" width="598" height="656" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-enable-pivoting.png 598w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-parser-enable-pivoting-273x300.png 273w" sizes="(max-width: 598px) 100vw, 598px" /></a><p id="caption-attachment-8282" class="wp-caption-text">JSON Parser Transform &#8211; Enable Pivoting</p></div></li>
<li>Finally, we are ready to load this data.
<div id="attachment_8283" style="width: 887px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-pivot-data-viewer.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8283" class="wp-image-8283 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-pivot-data-viewer.png" alt="CSV Pivoted Data" width="877" height="388" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-pivot-data-viewer.png 877w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-pivot-data-viewer-300x133.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-csv-pivot-data-viewer-768x340.png 768w" sizes="(max-width: 877px) 100vw, 877px" /></a><p id="caption-attachment-8283" class="wp-caption-text">CSV Pivoted Data</p></div></li>
<li>Let&#8217;s load this data in the SQL Server.</li>
</ol>
<h2><span id="Load_Walmart_API_data_into_SQL_Server">Load Pivoted CSV File data into SQL Server</span></h2>
<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><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to read CSV file data, pivot the data and Similarly, using SSIS JSON Generator and Parser Transform Pivot the CSV Data excluding some columns from pivoting.  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 URL for more information.</p>
<ul>
<li>Help File: <a href="https://zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-csv-source.htm" target="_blank" rel="noopener">CSV Source</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/pivot-csv-data-ssis/">How to Pivot CSV Data in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Call SurveyGizmo API in SSIS</title>
		<link>https://zappysys.com/blog/call-surveygizmo-api-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 12 Oct 2019 06:37:13 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8149</guid>

					<description><![CDATA[<p>Introduction In our previous article we Read data from Twilio API in SSIS . Now in this article, we will see example of how to Call SurveyGizmo API in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call SurveyGizmo API Call can be useful for any developer regardless of [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-surveygizmo-api-ssis/">Call SurveyGizmo API 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>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/SurveyGizmo.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-8152 size-thumbnail alignleft" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/10/SurveyGizmo-150x150.png" alt="SurveyGizmo" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/SurveyGizmo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/10/SurveyGizmo-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/SurveyGizmo.png 350w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we <a href="https://zappysys.com/blog/get-data-from-surveymonkey-in-ssis-using-rest-api/" target="_blank" rel="noopener">Read data from Twilio API in SSIS</a> . Now in this article, we will see example of how to <strong>Call SurveyGizmo API in SSIS</strong> and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call SurveyGizmo API Call can be useful for any developer regardless of which programming language or tool set you use. we will also see how to store access token and secret in the variable and pass it in the URL using variable.</p>
<p>We will go through the steps to make Survey GetList REST API call which Get a list of all of your surveys and we load it into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to Make SurveyGizmo REST API Call in SSIS.</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 SurveyGizmo API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is SurveyGizmo?</span></span></h2>
<p>SurveyGizmo takes data out of dashboards and puts it into the hands of people who take action. Through the systems they use every day. SurveyGizmo is an online survey solution that makes it easy for businesses of all sorts to create and conduct surveys, polls, quizzes, and questionnaires.  Reaching out to potential and existing customers, managing organizational and employee relationships and conducting academic researches has become convenient through SurveyGizmo.</p>
<ul style="list-style-type: square;">
<li><a href="https://apihelp.surveygizmo.com/help" target="_blank" rel="noopener">Click here to read SurveyGizmo Rest API Documentation.</a></li>
</ul>
<h2>Call SurveyGizmo <span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS">REST API using SSIS JSON Source</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to SurveyGizmo API, we will read list of all available temporary lists and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Now let&#8217;s add variable for SurveyGizmo Access Token and Secret and Set it in as a value.
<div id="attachment_8156" style="width: 843px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis_add_variable.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8156" class="wp-image-8156 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis_add_variable.png" alt="SSIS Add Variable" width="833" height="912" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis_add_variable.png 833w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis_add_variable-274x300.png 274w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis_add_variable-768x841.png 768w" sizes="(max-width: 833px) 100vw, 833px" /></a><p id="caption-attachment-8156" class="wp-caption-text">SSIS Add Variable</p></div></li>
<li>Now double click on JSON Source and enter the following URL with variable as placeholder to get list of your surveys.<br />
<pre class="crayon-plain-tag">https://restapi.surveygizmo.com/v5/survey?page=1&amp;resultsperpage=100&amp;api_token={{User::v_api_token}}&amp;api_token_secret={{User::v_api_token_secret}}</pre>
<div id="attachment_8157" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-add-varible-in-url.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8157" class="wp-image-8157 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-add-varible-in-url-768x487.png" alt="JSON Source : URL with variable as placeholder" width="720" height="457" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-add-varible-in-url-768x487.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-add-varible-in-url-300x190.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-add-varible-in-url-1024x650.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-add-varible-in-url.png 1237w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8157" class="wp-caption-text">JSON Source : URL with variable as placeholder</p></div></li>
<li>Let&#8217;s configure the pagination, go to Pagination tab and select mode as URL Parameter and set the indicator as <pre class="crayon-plain-tag">Page</pre> and configure it like below screen.
<div id="attachment_8158" style="width: 994px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-pagination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8158" class="wp-image-8158 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-pagination.png" alt="JSON Source Pagination" width="984" height="789" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-pagination.png 984w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-pagination-300x241.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-pagination-768x616.png 768w" sizes="(max-width: 984px) 100vw, 984px" /></a><p id="caption-attachment-8158" class="wp-caption-text">JSON Source Pagination</p></div></li>
<li>You can refer to this article for more details on pagination here <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">Understanding REST API Pagination in SSIS / ODBC Drivers</a></li>
<li>Now click on Select Filter button and select the desire filter from the window and click on Preview to get the data.
<div id="attachment_8159" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8159" class="wp-image-8159 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-preview-768x670.png" alt="JSON Source Preview" width="720" height="628" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-preview-768x670.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-preview-300x262.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/ssis-json-source-surveygizmo-preview.png 890w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8159" class="wp-caption-text">JSON Source Preview</p></div></li>
<li>That&#8217;s it we are ready to load all SurveyGizmo Surveys data in SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load SurveyGizmo REST API data into SQL Server</span></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><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as SurveyGizmo and load into SQL Server. We also learned techniques like How to use variable as placeholder in URL and configure the pagination. 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>
<li style="list-style-type: none;">
<ul>
<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></li>
<li><a href="https://apihelp.surveygizmo.com/help" target="_blank" rel="noopener">SurveyGizmo Rest API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/call-surveygizmo-api-ssis/">Call SurveyGizmo API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read data from Twilio API in SSIS</title>
		<link>https://zappysys.com/blog/call-twilio-rest-api-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 28 Sep 2019 09:01:43 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[sql server]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8076</guid>

					<description><![CDATA[<p>Introduction In our previous article we see How to call REST API in SSIS . Now in this article, we will see example of how to Make Twilio API Call in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call Twilio API Call can be useful for any developer [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-twilio-rest-api-ssis/">Read data from Twilio API 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>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/Twilio.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-8080 size-thumbnail" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/09/Twilio-150x150.jpg" alt="Twilio" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/Twilio-150x150.jpg 150w, https://zappysys.com/blog/wp-content/uploads/2019/09/Twilio.jpg 300w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we see <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">How to call REST API in SSIS</a> . Now in this article, we will see example of how to <strong>Make Twilio API Call in SSIS</strong> and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call Twilio API Call can be useful for any developer regardless of which programming language or tool set you use. we will also see how to configure HTTP basic connection.</p>
<p>We will go through the steps to make Accounts REST API call which Returns a list of all Accounts resources and we load it into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to Make Twilio REST API Call in SSIS.</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 Twilio API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is Twilio?</span></span></h2>
<p>Twilio is a cloud communications platform as a service company based in San Francisco, California. It&#8217;s allows software developers programmatically to make and receive phone calls, send and receive text messages, and perform other communication functions using its web service APIs.</p>
<ul style="list-style-type: square;">
<li>Twilio API Documentation : <a href="https://www.twilio.com/docs/usage/api" target="_blank" rel="noopener">Click here to read Twilio Rest API Documentation.</a></li>
</ul>
<h2>Make Call of Twilio <span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS">REST API using SSIS</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to Twilio API, we will read list of all available temporary lists and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to get multiple Account resources and create the HTTP Connection use the same url in the http connection also.<br />
<pre class="crayon-plain-tag">https://api.twilio.com/2010-04-01/Accounts.json</pre>
<div id="attachment_8097" style="width: 677px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-http-connection-configuration-for-twillio.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8097" class="wp-image-8097 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-http-connection-configuration-for-twillio.png" alt="Json Source HTTP connection" width="667" height="879" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-http-connection-configuration-for-twillio.png 667w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-http-connection-configuration-for-twillio-228x300.png 228w" sizes="(max-width: 667px) 100vw, 667px" /></a><p id="caption-attachment-8097" class="wp-caption-text">Json Source HTTP connection</p></div></li>
<li>Now click on Select Filter button and select the desire filter from the window.
<div id="attachment_8098" style="width: 787px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-filter.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8098" class="wp-image-8098 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-filter.png" alt="Json Source Select Filter" width="777" height="744" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-filter.png 777w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-filter-300x287.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-filter-768x735.png 768w" sizes="(max-width: 777px) 100vw, 777px" /></a><p id="caption-attachment-8098" class="wp-caption-text">Json Source Select Filter</p></div></li>
<li>Go to Pagination Tab and select mode as Response attribute Mode &#8211; Read next page information from response and set up the next page filter.
<div id="attachment_8100" style="width: 1051px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-pagination.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8100" class="wp-image-8100 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-pagination.png" alt="JSON Source Preview" width="1041" height="788" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-pagination.png 1041w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-pagination-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-pagination-768x581.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-pagination-1024x775.png 1024w" sizes="(max-width: 1041px) 100vw, 1041px" /></a><p id="caption-attachment-8100" class="wp-caption-text">JSON Source Preview</p></div></li>
<li>You can refer to this article for more details on pagination here <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">Understanding REST API Pagination in SSIS / ODBC Drivers</a></li>
<li>Now select the desire options to get the data and click on preview, as here i want parent and missing child also i checked both options and clicked on Preview. if you don&#8217;t want to get parent details you can uncheck it.
<div id="attachment_8106" style="width: 829px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8106" class="wp-image-8106 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-preview.png" alt="JSON Source Preview" width="819" height="743" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-preview.png 819w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-preview-300x272.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-json-source-twillio-preview-768x697.png 768w" sizes="(max-width: 819px) 100vw, 819px" /></a><p id="caption-attachment-8106" class="wp-caption-text">JSON Source Preview</p></div></li>
<li>That&#8217;s it we are ready to load all Twilio accounts resources in SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load Twilio REST API data into SQL Server</span></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><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as Twilio using HTTP Connection and load into SQL Server. We also learned techniques like How to create HTTP Connection and configure the pagination. 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>
<li style="list-style-type: none;">
<ul>
<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></li>
<li><a href="https://www.twilio.com/docs/usage/api" target="_blank" rel="noopener">Twilio Rest API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/call-twilio-rest-api-ssis/">Read data from Twilio API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Make MailPlus OAuth 1.0a REST API Call in SSIS</title>
		<link>https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 21 Sep 2019 06:44:08 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[mailplus]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1.0]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8043</guid>

					<description><![CDATA[<p>Introduction In our previous article we see How to read call REST API data in SSIS. Now in this article, we will see How to Make MailPlus OAuth 1.0a REST API Call in SSIS and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call MailPlus Oauth 1.0a REST API Call [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/">How to Make MailPlus OAuth 1.0a REST API Call 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>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="wp-image-8044 size-thumbnail alignleft" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus-150x150.png" alt="MailPlus" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/09/MailPlus.png 300w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we see <a href="https://zappysys.com/blog/call-rest-api-using-ssis-web-service-task/" target="_blank" rel="noopener">How to read call REST API data in SSIS</a>. Now in this article, we will see <strong>How to Make MailPlus OAuth 1.0a REST API Call in SSIS</strong> and load into SQL Server. This blog mainly focuses on SSIS approach but steps mentioned to call MailPlus Oauth 1.0a REST API Call can be useful for any developer regardless of which programming language or tool set you use. We will also see how to configure OAuth1.0 connection.</p>
<p>We will go through the steps to make temporary lists API call which Returns a list of all available temporary lists and we load it into MS SQL Server.</p>
<p>In nutshell, this post will focus on how to Make MailPlus OAuth 1.0a REST API Call in SSIS.</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 MailPlus API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is MailPlus?</span></span></h2>
<p><a href="https://spotler.com/mailplus-spotler" target="_blank" rel="noopener">MailPlus</a>, founded in 2004, is the number one ESP (Email Service Provider) in the Netherlands. MailPlus is an award winning solution that enables companies to send out their online communication, such as newsletters, easily and professionally.</p>
<h2>Where to get the MailPlus API Key and Secret?</h2>
<p>After activation of the MailPlus REST API in a MailPlus account you can get unique Key and Secret from there. The MailPlus REST API uses Oauth 1.0a (one leg, see Oauth 1.0a (One Leg) ). A consumer key and secret are required to access your MailPlus account. These can be created in your MailPlus account. The Key and Secret are always available via the startpage of a MailPlus account. Click on the tab “MailPlus Settings” and then “MailPlus Rest API”. In MailPlus eCom an authentication is already available.</p>
<h2>Call MailPlus Oauth 1.0a <span id="Step-By-Step_8211_CallSemantics3_REST_API_using_SSIS">REST API using SSIS</span></h2>
<p>Let’s start with an example. We use SSIS JSON Source component to make the call to MailPlus API, we will read list of all available temporary lists and load into SQL Server. First of All, Open Visual Studio and Create New SSIS Package Project.</p>
<ol>
<li>First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="wp-image-7934 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png" alt="Drag and Drop SSIS Data Flow Task from SSIS Toolbox" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a><p id="caption-attachment-7934" class="wp-caption-text">Drag and Drop : SSIS Data Flow Task from SSIS Toolbox</p></div></li>
<li>From the SSIS toolbox drag and drop JSON Source on the data flow designer surface.
<div id="attachment_3766" style="width: 604px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3766" class="wp-image-3766 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png" alt="Drag and Drop JSON Source Component" width="594" height="268" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin.png 594w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-json-source-for-getting-basic-profile-from-linkedin-300x135.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-3766" class="wp-caption-text">Drag and Drop JSON Source Component</p></div></li>
<li>Double click JSON Source and enter the following URL as below to get list of all available temporary lists and create the OAuth 1.0 Connection.<br />
<pre class="crayon-plain-tag">https://restapi.mailplus.nl/integrationservice-1.1.0/templist</pre>
<div id="attachment_8047" style="width: 826px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8047" class="wp-image-8047 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png" alt="MailPlus Oauth 1.0a Connection" width="816" height="906" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection.png 816w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection-270x300.png 270w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-oauth1.0-connection-768x853.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-8047" class="wp-caption-text">MailPlus Oauth 1.0a Connection</p></div></li>
<li>Finally click on Preview button to load the data.
<div id="attachment_8048" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8048" class="wp-image-8048 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png" alt="MailPlus Preview Data" width="720" height="755" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data.png 720w, https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-mailplus-preview-data-286x300.png 286w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8048" class="wp-caption-text">MailPlus Preview Data</p></div></li>
<li>You can find more MailPlus API Lists here on <a href="https://restdoc.mailplus.nl/doc/" target="_blank" rel="noopener">MailPlus Interactive API Documentation link.</a></li>
<li>That&#8217;s it we are ready to load all available temporary lists in SQL Server.</li>
</ol>
<h3><span id="Load_Walmart_API_data_into_SQL_Server">Load MailPlus REST API data into SQL Server</span></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><span id="Conclusion">Conclusion</span></h2>
<p>After all, we saw you how to extract information from REST API such as MailPlus REST API using OAuth1.0 Connection and load into SQL Server. We also learned techniques like How to create OAuth1.0 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>
<li style="list-style-type: none;">
<ul>
<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></li>
<li><a href="https://restdoc.mailplus.nl/doc/" target="_blank" rel="noopener">MailPlus API</a></li>
</ul>
</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/make-mailplus-oauth-1-0a-rest-api-call-ssis/">How to Make MailPlus OAuth 1.0a REST API Call in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Make PayPal API Call in ODBC / SQL Server (T-SQL)</title>
		<link>https://zappysys.com/blog/make-paypal-api-call-odbc-sql-server/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 14 Sep 2019 08:49:27 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[T-SQL (SQL Server)]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[paypal]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8010</guid>

					<description><![CDATA[<p>Introduction In our previous article we saw how to call PayPal API in SSIS. Now in this article, we will see How to Make PayPal API Call in ODBC from the SQL Server. This blog mainly focuses on ODBC approach but steps mentioned to call PayPal APIs can be useful for any developer regardless of which [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/make-paypal-api-call-odbc-sql-server/">How to Make PayPal API Call in ODBC / SQL Server (T-SQL)</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><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-7825 size-thumbnail" title="PayPal" src="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview-150x150.png" alt="PayPal" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-logo-preview.png 512w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous article we saw <a href="https://zappysys.com/blog/read-paypal-api-data-ssis/" target="_blank" rel="noopener">how to call PayPal API in SSIS</a>. Now in this article, we will see How to Make PayPal API Call in ODBC from the SQL Server. This blog mainly focuses on ODBC approach but steps mentioned to call PayPal APIs can be useful for any developer regardless of which programming language or tool set you use. We will also see How to send basic Authorization header along with body in OAuth2.</p>
<p>We will go through the steps to Create PayPal Order from MS SQL Server.</p>
<p>In nutshell, this post will focus on how to make PayPal API Call using ODBC Driver.</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>A first requirement, make sure that Microsoft Access installed</li>
<li>Make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
<li>Credentials of PayPal API. Click <a href="https://developer.paypal.com/developer/applications/" target="_blank" rel="noopener">here</a> to create API.</li>
</ol>
<h2><span id="What_is_Walmart"><span id="What_is_WordPress">What is PayPal?</span></span></h2>
<p><a href="https://www.paypal.com" target="_blank" rel="noopener">PayPal</a> is an American company operating a worldwide online payments system that supports online money transfers and serves as an electronic alternative to traditional paper methods like checks and money orders. The company operates as a payment processor for online vendors, auction sites, and many other commercial users, for which it charges a fee in exchange for benefits such as one-click transactions and password memory. PayPal&#8217;s payment system, also called PayPal, is considered a type of payment rail.</p>
<h2 class="dx-content-title">Get Started with PayPal API</h2>
<p>If you have need to automate PayPal operations (e.g. read / write / update / delete ) then you can use PayPal REST API. Before you can integrate a PayPal product or solution, you must set up your development environment to get OAuth 2.0 client ID and secret credentials for the sandbox and live environments. You exchange these credentials for an access token that authorizes your REST API calls. To test your web and mobile apps, you create sandbox accounts.</p>
<h3 id="get-credentials" class="dx-anchor">Get PayPal credentials</h3>
<p>To generate OAuth 2.0 credentials for the sandbox and live environments:</p>
<ol>
<li><a href="https://www.paypal.com/signin?returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications" target="_blank" rel="noopener"><strong>Log into Dashboard</strong></a> and type your PayPal personal or business account email and password.</li>
<li>In the <strong>REST API apps</strong> section, click <strong>Create App</strong>. The purpose of this app is to generate your credentials.</li>
<li>Type a name for your app and click <strong>Create App</strong>. The page shows your sandbox app information, which includes your credentials.<br />
<blockquote class="dx-blockquote-note"><p><strong>Note:</strong> To show your live app information, toggle to <strong>Live</strong>.</p></blockquote>
</li>
<li>Copy and save the client ID and secret for your sandbox app.
<div id="attachment_7837" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7837" class="wp-image-7837 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret-768x443.png" alt="PayPal Client ID and Secret" width="720" height="415" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret-768x443.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret-300x173.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/08/paypal-client-ID-and-secret.png 940w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7837" class="wp-caption-text">PayPal Client ID and Secret</p></div></li>
<li>Review your app details and save your app.</li>
</ol>
<h2><span id="Read_PayPal_API_Data_using_SSIS_JSON_Source"><span id="Read_Walmart_API_Data_using_SSIS_JSON_Source"><span id="Read_data_fromWordPressusing_SSIS_JSON_Source">Call PayPal </span></span></span>Create Order API in SQL Server (T-SQL) using Data Gateway</h2>
<p>Let’s start with an example. We use JSON Driver to make the call to PayPal API, we will Create the PayPal Order from SQL Server.</p>
<p>In REST API calls, include the URL to the API service for the environment:</p>
<ul class="compact">
<li>Sandbox: <code>https://api.sandbox.paypal.com</code></li>
<li>Live: <code>https://api.paypal.com</code></li>
</ul>
<ol>
<li>To do this, first of all, we will open the ZappySys Data Gateway Configuration:
<div id="attachment_5283" style="width: 410px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5283" class="wp-image-5283 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png" alt="Open ZappySys Data Gateway" width="400" height="315" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway.png 400w, https://zappysys.com/blog/wp-content/uploads/2018/11/start-menu-open-zappysys-data-gateway-300x236.png 300w" sizes="(max-width: 400px) 100vw, 400px" /></a><p id="caption-attachment-5283" class="wp-caption-text">Open ZappySys Data Gateway</p></div></li>
<li>Add the Native &#8211; ZappySys JSON Driver Data source.
<div id="attachment_5284" style="width: 568px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5284" class="wp-image-5284 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png" alt="Add Gateway Data Source (Native JSON Driver)" width="558" height="533" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source.png 558w, https://zappysys.com/blog/wp-content/uploads/2018/11/zappysys-data-gateway-add-data-source-300x287.png 300w" sizes="(max-width: 558px) 100vw, 558px" /></a><p id="caption-attachment-5284" class="wp-caption-text">Add Gateway Data Source (Native JSON Driver)</p></div></li>
<li>Now it&#8217;s time to connect with PayPal. Let&#8217;s use JSON Driver Data source with the following URL:<br />
<pre class="crayon-plain-tag">https://api.sandbox.paypal.com/v2/checkout/orders</pre>
Body:<br />
<pre class="crayon-plain-tag">{
  "intent": "CAPTURE",
  "purchase_units": [
    {
      "amount": {
        "currency_code": "USD",
        "value": "100.00"
      }
    }
  ]
}</pre>
<div id="attachment_8013" style="width: 875px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-json-driver-paypal-create-order.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8013" class="wp-image-8013 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-json-driver-paypal-create-order.png" alt="PayPal : Create Order" width="865" height="703" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-json-driver-paypal-create-order.png 865w, https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-json-driver-paypal-create-order-300x244.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-json-driver-paypal-create-order-768x624.png 768w" sizes="(max-width: 865px) 100vw, 865px" /></a><p id="caption-attachment-8013" class="wp-caption-text">PayPal : Create Order</p></div></li>
<li>Create Basic OAuth Client Credentials Grant (Configure ZS-OAuth Connection).<br />
In the SSIS ZS OAuth Connection Manager, Select Provider as Custom, select version as OAuth2 and select Grant Type as  Client Credentials Grant. Enter the credentials and access token url and click OK.<br />
<pre class="crayon-plain-tag">https://api.sandbox.paypal.com/v1/oauth2/token</pre>
<div id="attachment_8014" style="width: 807px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-oauth-basic-client-credential-grant.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8014" class="wp-image-8014 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-oauth-basic-client-credential-grant.png" alt="ZS OAuth Connection – Client Credentials Grant" width="797" height="751" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-oauth-basic-client-credential-grant.png 797w, https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-oauth-basic-client-credential-grant-300x283.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-oauth-basic-client-credential-grant-768x724.png 768w" sizes="(max-width: 797px) 100vw, 797px" /></a><p id="caption-attachment-8014" class="wp-caption-text">ZS OAuth Connection – Client Credentials Grant</p></div></li>
<li>Furthermore, Now click on Test Connection button to test PayPal Connection.
<div id="attachment_8015" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-test-connection.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8015" class="wp-image-8015 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-test-connection.png" alt="PayPal : Test Connection" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-test-connection.png 802w, https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-test-connection-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/odbc-paypal-test-connection-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-8015" class="wp-caption-text">PayPal : Test Connection</p></div></li>
<li>Write your Query and <strong>Preview Data</strong>.</li>
<li><strong>(Optional Step)</strong> If your Query use POST method (e.g. Create Invoice) to submit data then you have <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Metadata_Options_in_SQL_Query" target="_blank" rel="noopener">Save Metadata (Read More)</a>. We will use this meta file in later step when we call POST request.
<div id="attachment_4716" style="width: 551px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4716" class="size-full wp-image-4716" src="https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver.png" alt="Generate Metadata File for REST API POST Operation using ZappySys API Driver (JSON / XML)" width="541" height="593" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver.png 541w, https://zappysys.com/blog/wp-content/uploads/2018/08/post-data-json-rest-api-using-sql-query-odbc-driver-274x300.png 274w" sizes="(max-width: 541px) 100vw, 541px" /></a><p id="caption-attachment-4716" class="wp-caption-text">Generate Metadata File for REST API POST Operation using ZappySys API Driver (JSON / XML)</p></div></li>
<li>Now using Code Generator we will generate the query.
<div id="attachment_6416" style="width: 766px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="wp-image-6416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="odbc-json-driver-generate-quickbooks-query" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Generate Query</p></div></li>
</ol>
<h3>Setup Linked Server <span id="Create_ODBC_DSN_8211_JSON_Driver">in MS SQL Server for PayPal</span></h3>
<p>Once you configured the data source in Gateway, we can now setup Linked Server in SQL Server to query API Calls.</p>
<ol>
<li>Assuming you have installed SQL Server and SSMS. If not then get both for FREE from here: <a href="https://www.microsoft.com/en-us/sql-server/sql-server-editions-express" target="_blank" rel="noopener">Get SQL Server Express</a> and  <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms" target="_blank" rel="noopener">Get SSMS</a></li>
<li>Open SSMS and connect to SQL Server.</li>
<li>Go to Root &gt; Server Objects &gt; Linked Servers node. Right click and click <strong>New Linked Server&#8230;</strong>
<div class="wp-caption alignnone">
<p><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-linked-server-ssms.png?w=720&amp;ssl=1" alt="Add Linked Server in SQL Server" width="420" height="262" /></a></p>
<p class="wp-caption-text">Add Linked Server in SQL Server</p>
</div>
</li>
<li> Now enter the linked server name, select Provider as SQL Native Client</li>
<li>Enter data source as <strong><pre class="crayon-plain-tag">GatewayServerName, PORT_NUMBER</pre></strong> where server name is where ZappySys Gateway is running (Can be same as SQL Server machine or remote machine). Default PORT_NUMBER is 5000 but confirm on Data gateway &gt; General tab in case its different.</li>
<li>Enter Catalog Name. This must match name from Data gateway Data sources grid &gt; Name column
<div class="wp-caption alignnone">
<p><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-1.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/11/ssms-sql-server-configure-linked-server-1.png?w=720&amp;ssl=1" alt="Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection" width="643" height="496" /></a></p>
<p class="wp-caption-text">Configure Linked Server Provider, Catalog, Server, Port for ZappySys Data Gateway Connection</p>
</div>
</li>
<li>Click on Security Tab and select last option &#8220;<strong>Be made using this security context</strong>&#8220;. Enter your gateway user account here.</li>
<li>Click OK to save Linked Server</li>
</ol>
<h3>Create Order in PayPal from SQL Server (Call POST API Method)</h3>
<ol>
<li>To Create Order in PayPal we need to execute the query like this. Please refer to this link for more information: <a href="https://developer.paypal.com/docs/api/orders/v2/#orders_create" target="_blank" rel="noopener">Create Order example.</a><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;">Important Note*: Below query uses META property <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Metadata_Options_in_SQL_Query" target="_blank" rel="noopener">(fully explained here)</a>. This is needed if you creating anew record using POST, PUT. If you don&#8217;t pass META='{xxxx}&#8217; in query driver calls REST API two times (first time to parse metadata and second time to get actual data). So that you find some odd thing in PayPal if you execute the query without Meta then you will find two same Orders created in your PayPal as the driver makes two calls as mentioned above.</div></div>
<pre class="crayon-plain-tag">-- In below query rather than WITH(META=''[{"Name": "Success","Type": "Int32"}]'' ....
-- You can also use WITH(META=''c:\my-meta-file.txt'' .... We created this file in previous section

SELECT * FROM OPENQUERY([MY_LINKED_SERVER_NAME]
, 'SELECT * FROM $
WITH(META=''[{"Name": "Success","Type": "Int32"}]''
	 ,Src=''https://api.sandbox.paypal.com/v2/checkout/orders''
	,RequestData=''{
  "intent": "CAPTURE",
  "purchase_units": [
    {
      "amount": {
        "currency_code": "USD",
        "value": "100.00"
      }
    }
  ]
}''
	,RequestContentTypeCode=''ApplicationJson''
	,RequestMethod=''POST''
)')</pre>
</li>
<li>Here is the preview after you run REST API query in SQL Server. It will return created Order Id, Links and status. Notice that you can override default configuration by supplying <a href="https://zappysys.com/onlinehelp/odbc-powerpack/scr/json-odbc-driver-connectionstring.htm" target="_blank" rel="noopener">many parameters</a> in WITH clause.
<div id="attachment_8018" style="width: 586px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/sql-server-create-order-result.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8018" class="wp-image-8018 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/09/sql-server-create-order-result.png" alt="Create Order In PayPal Using SQL Query" width="576" height="750" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/sql-server-create-order-result.png 576w, https://zappysys.com/blog/wp-content/uploads/2019/09/sql-server-create-order-result-230x300.png 230w" sizes="(max-width: 576px) 100vw, 576px" /></a><p id="caption-attachment-8018" class="wp-caption-text">Create Order In PayPal Using SQL Query</p></div></li>
<li>You can also find this created Order by opening that URL in the browser.
<div id="attachment_8019" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/paypal-created-order.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8019" class="wp-image-8019 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/09/paypal-created-order-768x751.png" alt="Created Order In PayPal" width="720" height="704" srcset="https://zappysys.com/blog/wp-content/uploads/2019/09/paypal-created-order-768x751.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/09/paypal-created-order-300x293.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/09/paypal-created-order.png 815w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-8019" class="wp-caption-text">Created Order In PayPal</p></div></li>
</ol>
<h2><span id="Read_PayPal_API_Data_using_SSIS_JSON_Source"><span id="Read_Walmart_API_Data_using_SSIS_JSON_Source"><span id="Read_data_fromWordPressusing_SSIS_JSON_Source">PayPal API integration in ODBC apps (e.g. Power BI, Excel, Informatica, Access, C#&#8230;)</span></span></span></h2>
<p>So far we have looked at SQL Server integration only, but what if you like to use same powerful ZappySys API drivers part of <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ODBC PowerPack</a> in other Apps like Power BI, Excel, MS Access, Informatica and many more&#8230; ?? Well not to worry if you know that App supports ODBC you can use ZappySys ODBC Driver same way described earlier&#8230; only difference is you dont need Linked Server and you dont have to use OPENQUERY statement when you use ODBC Drivers.</p>
<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><span id="Step-by-Step_Import_REST_API_into_Power_BI">Conclusion</span></h2>
<p>So in this blog, we learned how to generate a PayPal API Token, Load PayPal data in MS SQL Server table using <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ODBC JSON / REST API Driver</a> in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/json-rest-api-driver/" target="_blank" rel="noopener"><strong>JSON / REST API Driver</strong></a> to find out what <em>this tool</em> is capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of PayPal API with our tools:</p>
<ul>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ODBC JSON / REST API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of <a href="https://zappysys.com/onlinehelp/odbc-powerpack/index.htm#page=json-odbc-driver-intro.htm" target="_blank" rel="noopener">JSON Driver</a>.</li>
<li><a href="https://developer.paypal.com/docs/api/overview/" target="_blank" rel="noopener">PayPal API</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/make-paypal-api-call-odbc-sql-server/">How to Make PayPal API Call in ODBC / SQL Server (T-SQL)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
