<?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>REST API Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/rest-api/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/rest-api/</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>REST API Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/rest-api/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SSIS tutorial: How to connect to AliPay</title>
		<link>https://zappysys.com/blog/ssis-tutorial-how-to-connect-to-alipay/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 21 Feb 2026 01:03:31 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS Tasks]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=11735</guid>

					<description><![CDATA[<p>Introduction In this article, you’ll learn how to connect SSIS PowerPack (ZappySys) to AliPay OpenAPI to call REST endpoints from SSIS. We’ll focus on the practical integration pattern AliPay requires: sending requests to the OpenAPI gateway with the correct parameters and a valid RSA2 signature, then parsing JSON responses in SSIS. AliPay OpenAPI basics (what [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-connect-to-alipay/">SSIS tutorial: How to connect to AliPay</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’ll learn how to connect SSIS PowerPack (ZappySys) to AliPay OpenAPI to call REST endpoints from SSIS. We’ll focus on the practical integration pattern AliPay requires: sending requests to the OpenAPI gateway with the correct parameters and a valid RSA2 signature, then parsing JSON responses in SSIS.</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>AliPay OpenAPI basics (what SSIS must send)</h2>
<p>AliPay OpenAPI calls typically go through a single gateway endpoint:</p>
<ul>
<li><strong>Sandbox gateway:</strong><br />
<pre class="crayon-plain-tag">https://openapi-sandbox.dl.alipaydev.com/gateway.do</pre>
</li>
</ul>
<p>A request is built from:</p>
<ul>
<li>Standard parameters (for example: <code>app_id</code>, <code>method</code>, <code>charset</code>, <code>sign_type</code>, <code>timestamp</code>, <code>version</code>)</li>
<li><code>biz_content</code> (usually JSON)</li>
<li><code>sign</code> (a signature generated from the parameters using RSA/RSA2—AliPay recommends RSA2)</li>
</ul>
<p>AliPay requires you to construct a “string to sign” from parameters and attach <code>sign</code> and <code>sign_type</code> to the request, then validate/verify responses using the AliPay public key.</p>
<h2>High-level integration pattern in SSIS</h2>
<p>Because AliPay signing is mandatory, the most reliable SSIS approach is a two-step pattern:</p>
<ol>
<li><strong>Generate the signature</strong> (RSA2) for the request parameters.</li>
<li><strong>Call the AliPay gateway</strong> from ZappySys (REST API Task or REST API Source), passing the signed parameters.</li>
</ol>
<p>ZappySys components support custom HTTP methods, headers, request bodies, and advanced options—so they work well once you have the signed payload ready.</p>
<h2>Steps</h2>
<h3>Start in the AliPay Sandbox</h3>
<p>AliPay strongly recommends using the sandbox for development and debugging. In the sandbox, you must:</p>
<ul>
<li data-start="668" data-end="697">An AliPay Developer Account</li>
<li data-start="668" data-end="697">An AliPay App ID</li>
<li>Use the sandbox gateway URL</li>
<li data-start="721" data-end="779">RSA2 Private Key (generated in AliPay developer console)</li>
<li data-start="782" data-end="820">AliPay Public Key (for verification)</li>
<li data-start="823" data-end="889">Access to the AliPay Sandbox environment (recommended for testing)</li>
</ul>
<h3>Decide where you will generate the RSA2 signature</h3>
<p>You have three common options:</p>
<ul>
<li><strong>Option A (Recommended): SSIS Script Task (C#) to generate signature</strong><br />
Use a Script Task before the ZappySys call to build parameters and compute <code>sign</code>.</li>
<li><strong>Option B: Use an AliPay SDK in a small helper app</strong><br />
Run it via Execute Process Task to output signed parameters (JSON/text), then pass them to ZappySys.</li>
<li><strong>Option C: Use a signing microservice</strong><br />
SSIS calls your internal service to get <code>sign</code>, then calls AliPay.</li>
</ul>
<p><a href="https://docs.alipayplus.com/alipayplus/alipayplus/api_acq_unified/api_overview?role=ACQP&amp;product=Payment1&amp;version=1.4.6">AliPay’s documentation</a> emphasizes the signature process and verification using the AliPay public key.</p>
<h3>Example: What a signed AliPay request looks like</h3>
<p>AliPay’s gateway model is “parameters + signature.” Conceptually, your final request includes:</p>
<ul>
<li><code>app_id</code></li>
<li><code>method</code> (the API name you’re calling)</li>
<li><code>charset</code> (often <code>utf-8</code>)</li>
<li><code>sign_type</code> (recommended <code>RSA2</code>)</li>
<li><code>timestamp</code></li>
<li><code>version</code></li>
<li><code>biz_content</code> (JSON)</li>
<li><code>sign</code> (computed over the canonicalized parameter string)</li>
</ul>
<p>AliPay documents that <code>sign</code> and <code>sign_type</code> are appended after creating the string to be signed, and verification uses the AliPay public key.</p>
<h3>Configure the ZappySys REST API Task (Control Flow)</h3>
<p>Use this when operating (e.g., creating a payment, refunding, or querying).</p>
<ol>
<li>Drag <strong>ZappySys REST API Web Service Task</strong> into Control Flow.</li>
<li>Set the task:
<ul>
<li><strong>Method:</strong> POST (commonly used with AliPay gateway)</li>
<li><strong>URL:</strong><br />
<pre class="crayon-plain-tag">https://openapi-sandbox.dl.alipaydev.com/gateway.do</pre>
</li>
<li>Headers: use<br />
<pre class="crayon-plain-tag">Content-Type: application/x-www-form-urlencoded</pre>
</li>
<li><strong>Body:</strong> form-encoded parameters; use this format: <em>key1=value1&amp;key2=value2&#8230;</em>
<div>
<pre class="crayon-plain-tag">app_id=YOUR_APP_ID&amp;amp;method=alipay.trade.query&amp;amp;charset=utf-8&amp;amp;sign_type=RSA2&amp;amp;timestamp=2026-02-20 10:00:00&amp;amp;version=1.0&amp;amp;biz_content={&quot;out_trade_no&quot;:&quot;202602200001&quot;}&amp;amp;sign=GENERATED_SIGNATURE</pre>
</div>
</li>
</ul>
</li>
<li>Click <strong>Test Request/Response</strong> to confirm you get a valid JSON response.
<div id="attachment_11739" style="width: 847px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Alipay-REST-API.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-11739" class="size-full wp-image-11739" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Alipay-REST-API.png" alt="" width="837" height="720" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Alipay-REST-API.png 837w, https://zappysys.com/blog/wp-content/uploads/2026/02/Alipay-REST-API-300x258.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Alipay-REST-API-768x661.png 768w" sizes="(max-width: 837px) 100vw, 837px" /></a><p id="caption-attachment-11739" class="wp-caption-text">Alipay REST API</p></div></li>
</ol>
<h2>Troubleshooting common AliPay + SSIS issues</h2>
<ul>
<li><strong>invalid-signature / missing-signature</strong>: most often caused by parameter ordering, incorrect URL-encoding, wrong key pair, or using sandbox keys against production (or vice versa).</li>
<li><strong>Wrong gateway</strong>: sandbox and production are fully isolated—ensure your <code>app_id,</code>keys, and gateway host match the environment.</li>
<li><strong>Encoding issues</strong>: confirm UTF-8 everywhere and ensure parameters are encoded exactly once before submission.</li>
<li><strong>Parsing JSON</strong>: use ZappySys JSON Source preview and JSONPath filters to flatten nested objects.</li>
</ul>
<h2>Security best practices</h2>
<ul>
<li>Store private keys securely (SSIS variables protected, encrypted config, or secret vaults).</li>
<li>Do not hardcode secrets in packages.</li>
<li>Use a sandbox for development, then switch to production only after full validation.</li>
</ul>
<h2>Conclusion</h2>
<p>Download <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> today and see for yourself how easy it is to connect SSIS PowerPack (ZappySys) to AliPay is absolutely achievable once you treat AliPay’s OpenAPI as a <strong>signed gateway integration</strong>. The key is generating a correct <strong>RSA2 signature</strong> for every request, then using ZappySys REST components to send the parameters and parse responses.</p>
<p>&nbsp;</p>
<p><span style="font-size: 14pt;"><strong>Still need help?</strong></span></p>
<p>If the issue persists, please get in touch with our support team:</p>
<ul>
<li><strong>Live Chat:</strong> Open the chat widget <em>(bottom right of this page)</em></li>
<li><strong>Email:</strong> <a href="mailto:support@zappysys.com">support@zappysys.com</a></li>
<li><strong>Support Center</strong>: <a class="inline-onebox" href="https://zappysys.com/support/">Support | ZappySys</a></li>
</ul>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-connect-to-alipay/">SSIS tutorial: How to connect to AliPay</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Call ChatGPT REST API in SSIS</title>
		<link>https://zappysys.com/blog/accessing-chatgpt-via-rest-api/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 20 Oct 2023 12:07:27 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[chatgpt]]></category>
		<category><![CDATA[opanapi]]></category>
		<category><![CDATA[restpai]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10234</guid>

					<description><![CDATA[<p>Introduction OpenAI, the creators of ChatGPT, provide both a web interface and an API for seamless integration of their tools into applications. This article provides a comprehensive guide on how to establish a connection with the OpenAI API in SSIS using ZappySys JSON Source, enabling seamless data integration and retrieval. Prerequisites Before we perform steps [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/accessing-chatgpt-via-rest-api/">Call ChatGPT REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo.png"><img decoding="async" class="wp-image-11035 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo.png" alt="" width="137" height="137" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo.png 384w, https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/chatgpt-logo-150x150.png 150w" sizes="(max-width: 137px) 100vw, 137px" /></a>OpenAI, the creators of <a href="https://chat.openai.com/">ChatGPT</a>, provide both a web interface and an API for seamless integration of their tools into applications. This article provides a comprehensive guide on how to establish a connection with the OpenAI API in SSIS using ZappySys <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>, enabling seamless data integration and retrieval.</p>
<h2><strong>Prerequisites</strong></h2>
<p>Before we perform steps listed in this article, you will need to make sure following prerequisites are met:</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver16" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.</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>Optional (If you want to Deploy and Schedule ) &#8211; <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Deploy and Schedule SSIS Packages</a></li>
</ol>
<h2>Step-by-step guide to making a ChatGPT Rest API call</h2>
<h3>How to get an OpenAI API Key for ChatGPT</h3>
<p>First, obtain your API key from OpenAI. This key is required for authenticating your requests.</p>
<p>To access the services, you will be required to set up an account with OpenAI. <a href="https://platform.openai.com/signup" target="_blank" rel="noopener">Click here to create your account</a>. Once your account has been successfully created, proceed to log in to your OpenAI account.</p>
<p>You can find the API key by following these steps:</p>
<ol>
<li>Navigate to the top right corner of the screen.</li>
<li>Click on your account name.</li>
<li>From the drop-down menu, select &#8220;API Keys.&#8221;</li>
<li>Alternatively, you can directly access the API Keys section by <a href="https://platform.openai.com/account/api-keys" target="_blank" rel="noopener">clicking here</a>.</li>
</ol>
<p>To generate a new secret key, please follow these steps:</p>
<ol>
<li>Go to the API Keys page.</li>
<li>Look for the &#8220;Create new secret key&#8221; button.</li>
<li>Click the button to generate a new secret key.</li>
</ol>
<div id="attachment_10236" style="width: 998px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10236" class=" wp-image-10236" src="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2.png" alt="" width="988" height="505" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2.png 1429w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2-300x153.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2-768x392.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa2-1024x523.png 1024w" sizes="(max-width: 988px) 100vw, 988px" /></a><p id="caption-attachment-10236" class="wp-caption-text">Generate a new key</p></div>
<p>Upon generation, your API key will be visible on the screen. It&#8217;s crucial to copy the key and store it in a secure location immediately, <strong>as it will not be displayed again for security purposes.</strong></p>
<div id="attachment_10237" style="width: 1000px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10237" class=" wp-image-10237" src="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1.png" alt="" width="990" height="486" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1.png 1413w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1-300x147.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1-768x377.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/OpenIa1-1024x503.png 1024w" sizes="(max-width: 990px) 100vw, 990px" /></a><p id="caption-attachment-10237" class="wp-caption-text">The new key</p></div>
<p>Now that you have your API key, you can begin utilizing it to make calls with your components. A preliminary example involves retrieving a list of all available models in OpenAI. For detailed instructions, please refer to the <a href="https://platform.openai.com/docs/api-reference/introduction" target="_blank" rel="noopener">API documentation available here</a>.</p>
<h3>ChatGPT Rest API call using JSON Source</h3>
<p>1. Drag and Drop the SSIS <b>Data Flow Task</b> from the SSIS Toolbox.</p>
<div style="width: 470px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" width="460" height="155" /><p class="wp-caption-text">Drag and drop Data flow task</p></div>
<p>2. Double-click on the DataFlow task to see the DataFlow designer surface.</p>
<p>3. From the SSIS toolbox drag and drop ZS JSON Source on the dataflow designer surface.</p>
<div style="width: 551px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" width="541" height="144" /><p class="wp-caption-text">Drag and drop a JSON source</p></div>
<p>4. We will use this on the URL path:</p><pre class="crayon-plain-tag">https://api.openai.com/v1/models</pre><p>
5. In the HTTP headers grid add the following values by clicking Raw Edit button :</p>
<p><code class="language-bash"><span class=""><span class="hljs-string">Authorization: Bearer </span><span class="hljs-string hljs-variable">YOUR_OPENAI_API_KEY<br />
</span></span></code><span style="background-color: #f0f0f0; color: #1e1e1e; font-family: Menlo, Consolas, monaco, monospace; font-size: 14px;">OpenAI-Organization: org-YQ9qpxxxxxxxxxxxxgoPi</span></p>
<p>6. Select your preferred Array Filter, simply click the &#8220;Select Filter&#8221; button. for this API call we need to select the <pre class="crayon-plain-tag">$.data[*]</pre>  array filter</p>
<p>7. Final step: Click &#8216;Preview&#8217; to initiate the ChatGTP Rest API call. You will also find a demonstration within our component, along with the resulting output from the call, below.</p>
<div id="attachment_10238" style="width: 838px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10238" class="size-full wp-image-10238" src="https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1.png" alt="" width="828" height="735" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1.png 828w, https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/JSON1-768x682.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-10238" class="wp-caption-text">ChatGPT call</p></div>
<p>That&#8217;s it the configuration for the ChatGPT Rest API call has been completed successfully.</p>
<h2>Load ChatGPT data in SQL Server using Upsert Destination (Insert or Update)</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>Conclusion</h2>
<p>In this article, we explored the seamless process of establishing a connection with <strong>ChatGPT</strong> <strong>in SSIS</strong> and integrating data effortlessly, all without the need for coding. Interested in trying it out yourself? Feel free to <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">Download ZappySys SSIS PowerPack</a> by clicking here and experience the simplicity firsthand. Should you have any lingering queries, please don&#8217;t hesitate to ask by <a href="https://zappysys.com/support/" target="_blank" rel="noopener">clicking here</a> or initiating a conversation with our experts via the live chat icon at the bottom-right corner of this page.</p>
<p>The post <a href="https://zappysys.com/blog/accessing-chatgpt-via-rest-api/">Call ChatGPT REST API in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to download images from a web page using SSIS</title>
		<link>https://zappysys.com/blog/how-to-download-images-from-a-web-page-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Mon, 27 Mar 2023 11:49:52 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS CSV Source]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9918</guid>

					<description><![CDATA[<p>Introduction The article shows how to download images from a web page using SSIS. Sometimes we need to download the images from a web page. In this post, we will show how to do this. Prerequisites Before we perform steps listed in this article, you will need to make sure following prerequisites are met: SSIS [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-images-from-a-web-page-using-ssis/">How to download images from a web page using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p>The article shows how to download images from a web page using SSIS. Sometimes we need to download the images from a web page. In this post, we will show how to do this.</p>
<h2><strong>Prerequisites</strong></h2>
<p>Before we perform steps listed in this article, you will need to make sure following prerequisites are met:</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://learn.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-ver16">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/">ZappySys SSIS PowerPack</a> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/">download it</a>).</li>
<li>Optional (If you want to Deploy and Schedule ) &#8211; <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593">Deploy and Schedule SSIS Packages</a></li>
</ol>
<h2><strong>Steps-by-step process to download images from HTML using SSIS</strong></h2>
<h3>Use REST API task to get the HTML body</h3>
<p>1. Drag and drop the REST API Task from SSIS toolbox, select the html page you want and save it in a variable.</p>
<div id="attachment_9958" style="width: 846px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9958" class="size-full wp-image-9958" src="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1.png" alt="" width="836" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1.png 836w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT1-768x655.png 768w" sizes="(max-width: 836px) 100vw, 836px" /></a><p id="caption-attachment-9958" class="wp-caption-text">Select the page you want to get the images</p></div>
<p>2. Go to <strong>Response Settings. </strong>Check the option Save the response content. In <strong>Save Mode, </strong>select <strong>Save to File. </strong>In the option <strong>Enter File Path</strong>, write the path for the html file.</p>
<div id="attachment_9959" style="width: 846px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9959" class="size-full wp-image-9959" src="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2.png" alt="" width="836" height="713" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2.png 836w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2-300x256.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/RAT2-768x655.png 768w" sizes="(max-width: 836px) 100vw, 836px" /></a><p id="caption-attachment-9959" class="wp-caption-text">Save the page in a file</p></div>
<h3>Parse the image with Regular Expression parser task</h3>
<p>3. From the SSIS toolbox drag and drop Regular Expression Parser Task on the Control flow designer surface.</p>
<p>4. The next step is to save the source path from the images. You need to use Regex and here are two example you can use, in this page <a href="https://regex101.com/">Regex101</a> you can check more details about the expressions we are using:</p>
<p>Expression 1: <pre class="crayon-plain-tag">&lt;img.*?src="(.*?)"{{*}}</pre>
Expression 2: <pre class="crayon-plain-tag">src="([a-z\-_0-9\/\:\.]*\.(png|jpg|jpeg|gif|png))"{{*}}</pre>
<div id="attachment_9960" style="width: 692px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9960" class="wp-image-9960 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1.png" alt="download images from a web page - Regex configuration" width="682" height="805" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1.png 682w, https://zappysys.com/blog/wp-content/uploads/2023/02/Regex1-254x300.png 254w" sizes="(max-width: 682px) 100vw, 682px" /></a><p id="caption-attachment-9960" class="wp-caption-text">Regex expression to get the image code from the page</p></div>
<h3>Read the image source with CSV source in order to download images from a Web page</h3>
<p>5. Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.</p>
<p><img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" width="460" height="155" /></p>
<p>6. Double click on the DataFlow task to see DataFlow designer surface.</p>
<p>7. From the SSIS toolbox drag and drop CSV source and insert the variable you are using from the previous task</p>
<div id="attachment_9961" style="width: 836px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/csv.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9961" class="wp-image-9961 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/csv.png" alt="CSV Source configuration" width="826" height="733" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/csv.png 826w, https://zappysys.com/blog/wp-content/uploads/2023/02/csv-300x266.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/csv-768x682.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-9961" class="wp-caption-text">Use CSV source to read the variable</p></div>
<h3>Get the image name, image full path and the destination folder to download images from a Web Page</h3>
<p>8. From the SSIS toolbox drag and drop Derived Column transform to remove the HTML code and get the image name.</p>
<p>Expression for the Image name:</p><pre class="crayon-plain-tag">(DT_WSTR,1000)REVERSE(LEFT(REVERSE(REPLACE(REPLACE(Column1,"src=\"",""),"\"","")),(FINDSTRING(REVERSE(REPLACE(REPLACE(Column1,"src=\"",""),"\"","")),"/",1) - 1)))</pre><p>
Remove the HTML code:</p><pre class="crayon-plain-tag">REPLACE(REPLACE(Column1,"src=\"",""),"\"","")</pre><p>
<div id="attachment_9962" style="width: 796px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9962" class="wp-image-9962 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1.png" alt="Image name" width="786" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1.png 786w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1-300x242.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn1-768x620.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></a><p id="caption-attachment-9962" class="wp-caption-text">Add a new column and remove HTML code</p></div>
<p>9. Now we will drag and drop another Derived Column, this one is for the file path for the images and validate if the image URL is valid. If the image URL has “http” in the stringm then it is valid otherwise you need to add the rest of the URL. Here is our example for the filePath and validate the URL image. If everything is OK, we can send the image URL.</p><pre class="crayon-plain-tag">File path: (DT_WSTR,2500)@[User::vDestinationFolder] + ImageName

Validate image URL: ((FINDSTRING(Column1,"http",1) &gt; 0) ? Column1 : (DT_WSTR,2500)("https://www.urlexample/image/" + Column1))

Note: @[User::vDestinationFolder] is a variable we used for the local path</pre><p>
<div id="attachment_9963" style="width: 796px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9963" class="wp-image-9963 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2.png" alt="Expression in derived column" width="786" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2.png 786w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2-300x242.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/02/derivedColumn2-768x620.png 768w" sizes="(max-width: 786px) 100vw, 786px" /></a><p id="caption-attachment-9963" class="wp-caption-text">Add a new column and verify the HTML path</p></div>
<h3>Send the request and save the image In the folder TO download images from a Web Page</h3>
<p>10. Now we will drag and drop a web API destination and select the column in the input column to URL. If the request is right, we can save the image in the local file.</p>
<div id="attachment_11103" style="width: 728px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/03/wad1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11103" src="https://zappysys.com/blog/wp-content/uploads/2023/03/wad1.jpg" alt="Web API destination for images URL" width="718" height="771" class="size-full wp-image-11103" srcset="https://zappysys.com/blog/wp-content/uploads/2023/03/wad1.jpg 718w, https://zappysys.com/blog/wp-content/uploads/2023/03/wad1-279x300.jpg 279w" sizes="(max-width: 718px) 100vw, 718px" /></a><p id="caption-attachment-11103" class="wp-caption-text">Send a request for all images you get</p></div>
<p>11. Now drag and drop an Export Column transformation and select the ResponseText from the request and the file path.</p>
<div id="attachment_9967" style="width: 761px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9967" class="wp-image-9967 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn.png" alt="download images from a web page - Export properties" width="751" height="635" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn.png 751w, https://zappysys.com/blog/wp-content/uploads/2023/02/exportColumn-300x254.png 300w" sizes="(max-width: 751px) 100vw, 751px" /></a><p id="caption-attachment-9967" class="wp-caption-text">Select the image response and the local file path</p></div>
<p>12. Finally, we use a trash destination to close the flow.</p>
<div id="attachment_9964" style="width: 352px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9964" class="wp-image-9964 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2.png" alt="download images from a web page - All the tasks together " width="342" height="523" srcset="https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2.png 342w, https://zappysys.com/blog/wp-content/uploads/2023/02/dataflow2-196x300.png 196w" sizes="(max-width: 342px) 100vw, 342px" /></a><p id="caption-attachment-9964" class="wp-caption-text">The final result</p></div>
<h2>Conclusion</h2>
<p>If everything is OK, you will be able to download the images from your HTML page. To do that, we read the list of URLs from a list. Then we get the name of the images using expressions. Then we add a path for each image to store them. Finally, we save the images.</p>
<p>The post <a href="https://zappysys.com/blog/how-to-download-images-from-a-web-page-using-ssis/">How to download images from a web page using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How To Connect ADP API using HTTP Connection over OAuth Connection</title>
		<link>https://zappysys.com/blog/connect-adp-api-using-http-connection-oauth-connection/</link>
		
		<dc:creator><![CDATA[Sudhir Dandale]]></dc:creator>
		<pubDate>Thu, 23 Jun 2022 17:35:02 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[adp]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9687</guid>

					<description><![CDATA[<p>Introduction In this post, we will cover how to connect ADP API using HTTP connection manager over OAuth connection manager with JSON Source. ADP API works a bit differently with the OAuth connection manager. Let&#8217;s take a look at it&#8230; Prerequisites Before we perform the steps listed in this article, you will need to make sure the [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/connect-adp-api-using-http-connection-oauth-connection/">How To Connect ADP API using HTTP Connection over OAuth Connection</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post, we will cover how to connect ADP API using HTTP connection manager over OAuth connection manager with <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a>. ADP API works a bit differently with the OAuth connection manager. Let&#8217;s take a look at it&#8230;</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 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><strong>Optional</strong> (If you want to Deploy and Schedule ) &#8211; <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Deploy and Schedule SSIS Packages</a></li>
<li>Make sure you have ADP Client Id &amp; Secret.</li>
</ol>
<h2><span id="Concepts_about_OAuth_20">What things are needed to connect ADP API</span></h2>
<ol>
<li>You need to have the Client ID and Client Secret before making your ADP API call.</li>
<li>If you don&#8217;t have this information, contact your client representative.</li>
<li>Certificate Signing Request (CSR): For more detailed information, see the Certificate Signing Request: <a href="https://developers.adp.com/articles/general/generate-a-certificate-signing-request">https://developers.adp.com/articles/general/generate-a-certificate-signing-request</a></li>
<li>If you already have the .csr file from your API Settings as below: &#8211;
<div id="attachment_9729" style="width: 531px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-pem-file-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9729" class="wp-image-9729 " src="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-pem-file-1.png" alt=" ADP CSR Certificate" width="521" height="317" srcset="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-pem-file-1.png 686w, https://zappysys.com/blog/wp-content/uploads/2022/06/adp-pem-file-1-300x182.png 300w" sizes="(max-width: 521px) 100vw, 521px" /></a><p id="caption-attachment-9729" class="wp-caption-text">ADP CSR Certificate</p></div>
<p>&nbsp;</li>
<li>Then you need to convert those *.cer + *.key files to *.PFX</li>
<li>We do not support cert+key files but converting to PFX is fairly simple.</li>
<li>You can find many blog posts on how to convert to PFX. Here are some helpful links on how to convert *.pem to *.PFX (i.e. PKCS#12 OR p12 file format)<br />
-https://www.sslshopper.com/ssl-converter.html<br />
-https://stackoverflow.com/questions/808669/convert-a-cert-pem-certificate-to-a-pfx-certificate</li>
<li>Once you have .PFX certificate, Client ID, and Client Secret ready then you can provide these details to the  HTTP Connection manager as below: &#8211;<br />
General Settings: &#8211;</p>
<div id="attachment_9732" style="width: 310px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-http-connection-manager-general.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9732" class="wp-image-9732 size-medium" src="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-http-connection-manager-general-300x162.png" alt=" ADP HTTP Connection Manager - General Tab" width="300" height="162" srcset="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-http-connection-manager-general-300x162.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/06/adp-http-connection-manager-general-768x415.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/06/adp-http-connection-manager-general.png 898w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-9732" class="wp-caption-text">ADP HTTP Connection Manager &#8211; General Tab</p></div>
<p>Client Certificate: &#8211;</p>
<div id="attachment_9733" style="width: 310px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-client-certificate-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9733" class="wp-image-9733 size-medium" src="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-client-certificate-1-300x175.png" alt=" ADP CSR Client Certificate Tab" width="300" height="175" srcset="https://zappysys.com/blog/wp-content/uploads/2022/06/adp-client-certificate-1-300x175.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/06/adp-client-certificate-1.png 701w" sizes="(max-width: 300px) 100vw, 300px" /></a><p id="caption-attachment-9733" class="wp-caption-text">ADP CSR Client Certificate Tab</p></div>
<ol>
<li style="list-style-type: none;"></li>
</ol>
</li>
<li>After you provide all the required details in HTTP Connection Manager for ADP API.</li>
<li>You can select HTTP Connection manager as the connection provider in the JSON Source/REST API and preview the data.</li>
<li>Here you can connect ADP API successfully using the HTTP connection manager.</li>
</ol>
<p><strong>Note:</strong> By default, when a <strong>PFX file</strong> expires, the <strong>ADFP API</strong> throws a generic <strong>SSL/TLS channel error</strong>, which can be misleading. To verify the certificate’s expiration date, we have to:</p>
<ol>
<li>Import the <strong>PFX file</strong> into the local certificate store (using the same blank password).</li>
<li>Use the <code>mmc</code> command from the Start menu.</li>
<li>Go to <strong>Add/Remove Snap-ins → Certificate → User Store → View Entry</strong> to check the expiration date.</li>
</ol>
<h3>Steps to Convert .cer and .key Files into a .PFX File</h3>
<p>If you have separate <strong>.cer</strong> and <strong>.key</strong> files, you’ll need to convert them into a single <strong>.PFX</strong> file (PKCS#12 format) to use with our tool, as it does not support separate certificate and key files.<br />
Converting to <strong>PFX</strong> is straightforward, and you can find many detailed guides online. Here are some helpful links:</p>
<ul>
<li><a tabindex="-1" href="https://www.sslshopper.com/ssl-converter.html">SSL Converter – sslshopper.com</a></li>
<li><a tabindex="-1" href="https://stackoverflow.com/questions/808669/convert-a-cert-pem-certificate-to-a-pfx-certificate">Convert .pem to .pfx – Stack Overflow</a></li>
</ul>
<h2><span id="Conclusion">Conclusion:</span></h2>
<p>This is how you can successfully connect ADP API using HTTP Connection over OAuth connection using ZappySys JSON Source/REST API.</p>
<p>The post <a href="https://zappysys.com/blog/connect-adp-api-using-http-connection-oauth-connection/">How To Connect ADP API using HTTP Connection over OAuth Connection</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call NetSuite RESTlet API in SSIS / ODBC</title>
		<link>https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 23 May 2022 21:18:19 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[NetSuite]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth1]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[rest api]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9657</guid>

					<description><![CDATA[<p>Introduction In our previous post we saw how to read API data in SSIS. This post we will cover how to call NetSuite RESTlet to read / write data in SSIS or ODBC Apps. For demo purpose we will use SSIS PowerPack REST API Task but concepts and many UI elements remain same for ODBC [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</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/2022/05/netsuite-logo.png"><img loading="lazy" decoding="async" class=" wp-image-9658 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png" alt="" width="144" height="114" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo.png 309w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-logo-300x238.png 300w" sizes="(max-width: 144px) 100vw, 144px" /></a>In our previous post we saw how to <a href="https://zappysys.com/blog/ssis-read-api-data-load-sql-table/">read API data in SSIS</a>. This post we will cover how to call <a href="https://docs.oracle.com/en/cloud/saas/netsuite/ns-online-help/section_N2979684.html">NetSuite RESTlet</a> to read / write data in SSIS or ODBC Apps. For demo purpose we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">SSIS PowerPack REST API Task</a> but concepts and many UI elements remain same for <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/">ODBC JSON Driver</a> too. This article assumes you know how to write Netsuite RESTlet and you have obtained Credentials to call RESTlet from extranal app.</p>
<h2></h2>
<h2></h2>
<h2>What is NetSuite RESTlets</h2>
<p>NetSuite added a really nice feature to expose business data and workflows as API by writing Javascript functions which they call it <strong>RESTlets</strong>. You can secure and customize these restlets as per your need.</p>
<p>You can automate CRUD (Create /Read / Write / Delete) operations in NetSuite by writing special functions in JavaScript and expose those functions as API URL which can be called by any external Systems (i.e. SSIS Packages , ODBC Apps like Power BI, Informatica, SSRS).</p>
<p>RESTlet can be secured few ways such as OAuth 1.0 and OAuth 2.0 authentication. We will cover both approach briefly in this article. You can choose any one as per your need</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>Creating NetSuite RESTlet / Obtain OAuth Credentials (Client ID and Secret)</h2>
<p>Below video shows how to obtain necessary credentials to call Netsuites API (RESTlet).</p>
<p>At mark 4:30 seconds it will show you How to use OAuth 2.0 for calling RESTlet</p>
<a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/"><img decoding="async" src="https://zappysys.com/blog/wp-content/plugins/wp-youtube-lyte/lyteCache.php?origThumbUrl=%2F%2Fi.ytimg.com%2Fvi%2FMAOMQp5dh0U%2Fhqdefault.jpg" alt="YouTube Video"></a><br /><br /></p>
<p>&nbsp;</p>
<h2>Create NetSuite RESTlet Connection</h2>
<p>There are few ways to authenticate NetSuite RESTlet. If you are using ZappySys Products then it makes it super easy to use either approach. Lets look at both approaches.</p>
<h3>Using OAuth 2.0 (Recommended)</h3>
<p>As per above video if you obtained Client ID and Secret for OAuth 2.0 you can follow below steps to configure OAuth connection to call RESTlet.</p>
<p>What you need to use OAuth 2.0.</p>
<ul>
<li>Your Account ID (it goes in URL)</li>
<li>Your Client ID and Secret (Obtained from Netsuite Portal) &#8211; See above video Mark 04:30</li>
<li>Register Redirect URL in NetSuite portal (we recommend you use <strong>https://zappysys.com/oauth</strong> as call back Url for Automatic Code extraction)</li>
</ul>
<p><strong>Steps to configure OAuth Connection</strong></p>
<ol>
<li>Right click on Connection Panel and choose Choose &#8220;New Connection..&#8221;. Select <strong>ZS-OAUTH</strong> type<br />
<strong><strong><br />
</strong></strong></p>
<div id="attachment_1569" style="width: 687px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1569" class="size-full wp-image-1569" src="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png" alt="Create new SSIS OAuth API Connection Manager" width="677" height="220" srcset="https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection.png 677w, https://zappysys.com/blog/wp-content/uploads/2017/07/ssis-oauth-create-new-connection-300x97.png 300w" sizes="(max-width: 677px) 100vw, 677px" /></a><p id="caption-attachment-1569" class="wp-caption-text">Create new SSIS OAuth API Connection Manager</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li> Enter following things<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On General Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
ClientID and Secret: <strong>&lt;get it from NetSuite&gt;</strong><br />
Authorization URL: <strong>https://&lt;accountID&gt;.</strong><a href="http://app.netsuite.com/app/login/oauth2/authorize.nl" target="_blank" rel="noopener noreferrer"><strong>app.netsuite.com/app/login/oauth2/authorize.nl</strong></a><br />
Token URL: <strong>https://&lt;accountID&gt;.suitetalk.api.netsuite.com/services/rest/auth/oauth2/v1/token<br />
</strong>Scope: <strong><strong><strong>restlet</strong></strong></strong></p>
<div id="attachment_9660" style="width: 642px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9660" class="size-full wp-image-9660" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png" alt="Configure NetSuite OAuth 2.0 Connection for API call" width="632" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection.png 632w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth2-api-connection-300x198.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-9660" class="wp-caption-text">Configure NetSuite OAuth 2.0 Connection for API call</p></div>
<p>&nbsp;</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
<strong>On Advanced Tab<br />
</strong>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
Callback / Redirect URL:  <strong>https://zappysys.com/oauth </strong> (this must be entered same way in NetSuite Portal)</p>
<div id="attachment_9659" style="width: 563px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9659" class="size-full wp-image-9659" src="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png" alt="OAuth2 Connection - Callback / Redirect URL" width="553" height="201" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url.png 553w, https://zappysys.com/blog/wp-content/uploads/2022/05/oauth2-connection-callback-redirect-url-300x109.png 300w" sizes="(max-width: 553px) 100vw, 553px" /></a><p id="caption-attachment-9659" class="wp-caption-text">OAuth2 Connection &#8211; Callback / Redirect URL</p></div></li>
<li>Now go back to General Tab and click <strong>Generate Token</strong> button</li>
<li>Follow login screen and try to finish the flow. At the end it will generate Tokens and populate on UI</li>
<li>Click OK to save</li>
</ol>
<h3>Using OAuth 1.0</h3>
<p>Another approach is use OAuth 1.0 (Older version). If you have enabled OAuth 1.0 in NetSuite then follow below steps (Create connection is same as before).</p>
<ol>
<li>Setup General Tab and Advanced Tab as below.<br />
On <strong>==== </strong><strong>General Tab====</strong>:<br />
Enter ClientID, ClientSecret, AccessToken, AccessToken Secret<br />
On <strong>==== </strong><strong>Advanced Tab ====</strong>:<br />
Check <strong>Do Not Include Empty Key/Value Pairs</strong><br />
Select Signature Method as <strong>HMAC-SHA256</strong><br />
For Extra Token Attribute enter <strong>realm=&lt;your-account-number&gt;_SB1</strong></li>
<li>Click OK to Save</li>
</ol>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9662" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-9661" src="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png" alt="" width="495" height="363" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber.png 495w, https://zappysys.com/blog/wp-content/uploads/2022/05/netsuite-oauth1-api-connection_realm_accountnumber-300x220.png 300w" sizes="(max-width: 495px) 100vw, 495px" /></a></p>
<h2></h2>
<h2>Call NetSuite RESTlet in SSIS</h2>
<ol>
<li>Create a new SSIS Package</li>
<li>Drag REST API Task from SSIS Toolbox<img decoding="async" class="figureimage" title="SSIS REST Api Web Service Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="SSIS REST Api Task - Drag and Drop" /></li>
<li>Double click the Task to configure</li>
<li>Select <strong>URL from Connection </strong></li>
<li>From Connection dropdown select OAuth connection we created in the earlier section (either OAuth 1 or OAuth 2)</li>
<li>Enter the URL as below. Assuming you copied URL from NetSuite Replace script ID and account number<br />
<pre class="crayon-plain-tag">https://&lt;account-number&gt;-sb1.restlets.api.netsuite.com/app/site/hosting/restlet.nl?script=&lt;scriptid&gt;&amp;deploy=1</pre>Enter <strong>&lt;account-number&gt;</strong><br />
Enter <strong>&lt;scriptid&gt;</strong></li>
<li>Change Method to POST if your script supports Parameters (Else you can supply id=xxxx and recordtype=xxxxx in the URL for GET request)</li>
<li>If its POST request then chnage ContentType to ApplicationJSON (application/json)</li>
<li>Enter your Input in the body. In below example our RESTlet takes sql query as input so we enter just one parameter named query but you can have different parameter(s)<br />
<pre class="crayon-plain-tag">Syntax:  { param1_name : &lt;value&gt; , param2_name : &lt;value&gt; ....  }</pre>
</li>
<li>Now click Test see everything works
<div id="attachment_9663" style="width: 1178px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9663" class="size-full wp-image-9663" src="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png" alt="Calling NetSuite RESTlet in SSIS (Using REST API Task)" width="1168" height="928" srcset="https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis.png 1168w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-300x238.png 300w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-768x610.png 768w, https://zappysys.com/blog/wp-content/uploads/2022/05/calling-netsuite-restlet-api-ssis-1024x814.png 1024w" sizes="(max-width: 1168px) 100vw, 1168px" /></a><p id="caption-attachment-9663" class="wp-caption-text">Calling NetSuite RESTlet in SSIS (Using REST API Task)</p></div></li>
</ol>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>We saw how easy it is to call NetSuite RESTlets or other NetSuite API in SSIS / other BI Apps using ODBC Drivers provided by ZappySys. <a href="https://zappysys.com/products/ssis-powerpack/download/">Download SSIS PowerPack</a> and try your self see how easy it is to consume virtually any API in SSIS.</p>
<p>The post <a href="https://zappysys.com/blog/call-netsuite-restlet-ssis-odbc/">How to call NetSuite RESTlet API in SSIS / ODBC</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Download Salesforce Attachment in SSIS</title>
		<link>https://zappysys.com/blog/download-salesforce-attachment-in-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Sat, 26 Dec 2020 20:25:11 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS Salesforce Source]]></category>
		<category><![CDATA[attachment]]></category>
		<category><![CDATA[salesforce]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=9190</guid>

					<description><![CDATA[<p>Introduction Download Salesforce Attachment in SSIS can be difficult the first time. In this new article, we will show how to download an Attachment from the Salesforce Source into a file using SSIS. Working with images is always tricky the first time. However, with the right article, this process is really simple. This article will show you how [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/download-salesforce-attachment-in-ssis/">Download Salesforce Attachment in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>Download Salesforce Attachment in SSIS can be difficult the first time. In this new article, we will show how to download an Attachment from the <a href="https://zappysys.com/products/ssis-powerpack/ssis-salesforce-source-connector/#:~:text=SSIS%20Salesforce%20Source%20Connector%20(CRM,.com%20Object%20Query%20Language).">Salesforce Source</a> into a file using SSIS. Working with images is always tricky the first time. However, with the right article, this process is really simple. This article will show you how simple it is to do it.</p>
<p>Salesforce is an extremely powerful CRM based in the cloud. This company was created in California, San Francisco and it is a very common request to get the information from the cloud into a file automatically. These can be achieved with our ZappySys SSIS PowerPack plus some SSIS tasks.</p>
<h2>Requirements</h2>
<p>In order to do it, we will need the following components:</p>
<ol>
<li><a href="https://docs.microsoft.com/en-us/sql/ssdt/previous-releases-of-sql-server-data-tools-ssdt-and-ssdt-bi?view=sql-server-ver15">SSDT for SSIS</a> installed</li>
<li><a href="https://zappysys.com/products/ssis-powerpack/download/">ZappySys SSIS Powerpack</a> installed</li>
<li>A connection to Salesforce. In order to create a connection to Salesforce, check <a href="https://zappysys.com/products/ssis-powerpack/download/">this video </a>or <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/">check our article related</a>.</li>
<li>Finally, we will need a file in Salesforce to download.</li>
</ol>
<h2>Getting Started</h2>
<h3>Creating the connection</h3>
<ol>
<li>First of all, in SSDT, create a new SSIS project</li>
<li>In order to create a connection in SSDT, go to the connection manager, and select a new connection.
<div id="attachment_9202" style="width: 560px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-create-gmail-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9202" class="size-full wp-image-9202" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-create-gmail-connection.png" alt="Salesforce Connection" width="550" height="315" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-create-gmail-connection.png 550w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-create-gmail-connection-300x172.png 300w" sizes="(max-width: 550px) 100vw, 550px" /></a><p id="caption-attachment-9202" class="wp-caption-text">ssis-create-salesforce-connection</p></div></li>
<li>Also, Select the ZS Salesforce connection. This new connection is created by the <a href="https://zappysys.com/products/ssis-powerpack/download/">ZS SSIS PowerPack</a> plugin mentioned in the requirements. With this connection, we can easily connect to Salesforce and get the Information.
<div id="attachment_9203" style="width: 520px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-connection-create.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9203" class="size-full wp-image-9203" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-connection-create.png" alt="Select SSIS Salesforce" width="510" height="488" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-connection-create.png 510w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-connection-create-300x287.png 300w" sizes="(max-width: 510px) 100vw, 510px" /></a><p id="caption-attachment-9203" class="wp-caption-text">Select SSIS Salesforce connection</p></div></li>
<li>Finally, write your email, password, and token. For more information about getting the token, please <a href="https://zappysys.com/blog/export-data-from-salesforce-to-sql-server-using-ssis/">check our article related</a>.
<div style="width: 682px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://i0.wp.com/zappysys.com/blog/wp-content/uploads/2017/09/export-data-from-salesforce-to-sql-server-using-ssis-salesforce-connection-manager.jpg?w=672&amp;ssl=1" alt="SSIS salesforce credentials" width="672" height="531" /><p class="wp-caption-text">Salesforce credentials in SSIS</p></div></li>
</ol>
<h3>Creating the package</h3>
<ol>
<li>First of All, Drag and drop the Data Flow Task from SSIS Toolbox and double-click it to edit.
<div id="attachment_7934" style="width: 470px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/09/ssis-drag-drop-data-flow-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7934" class="size-full wp-image-7934" 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 : Data Flow Task from SSIS Toolbox</p></div></li>
<li>Secondly, in the Data Flow, we will use the Salesforce Source to connect to Salesforce and get the attachments.
<div id="attachment_1818" style="width: 255px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/09/export-data-from-salesforce-to-sql-server-salesforce-source-ssis-component.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1818" class="wp-image-1818 size-full" title="Drag and Drop Salesforce Source" src="https://zappysys.com/blog/wp-content/uploads/2017/09/export-data-from-salesforce-to-sql-server-salesforce-source-ssis-component.jpg" alt="Drag and Drop Salesforce Source" width="245" height="192" /></a><p id="caption-attachment-1818" class="wp-caption-text">Drag and Drop: Salesforce Source from SSIS Toolbox</p></div></li>
<li>For this purpose, we will use the attachment table from Salesforce.<a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforece-picture.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-9192" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforece-picture.png" alt="" width="886" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforece-picture.png 886w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforece-picture-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforece-picture-768x523.png 768w" sizes="(max-width: 886px) 100vw, 886px" /></a></li>
<li>In addition, we will get the columns from the table. The image is in the body, however, we have additional columns like the id, name, ContenType, BodyLenght, createDate, and more:
<div id="attachment_9193" style="width: 896px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-columns.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9193" class="size-full wp-image-9193" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-columns.png" alt="Salesforece columns in SSIS" width="886" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-columns.png 886w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-columns-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-salesforce-columns-768x523.png 768w" sizes="(max-width: 886px) 100vw, 886px" /></a><p id="caption-attachment-9193" class="wp-caption-text">SSIS Salesforce Columns</p></div></li>
<li>Next, we will need to drag and drop SSIS Derived Column from the SSIS Toolbox below the Salesforce Source and connect it.
<div id="attachment_10219" style="width: 503px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10219" class="size-full wp-image-10219" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png" alt="Drag and drop the Derived Column" width="493" height="345" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png 493w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column-300x210.png 300w" sizes="(max-width: 493px) 100vw, 493px" /></a><p id="caption-attachment-10219" class="wp-caption-text">Drag and drop the Derived Column</p></div></li>
<li>Double-click on the derived column, to specify the path to store the image in a local folder.
<div id="attachment_9194" style="width: 934px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-derived-column-path-download-attachment-salesforece.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9194" class="size-full wp-image-9194" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-derived-column-path-download-attachment-salesforece.png" alt="saleforece download image" width="924" height="467" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-derived-column-path-download-attachment-salesforece.png 924w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-derived-column-path-download-attachment-salesforece-300x152.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-derived-column-path-download-attachment-salesforece-768x388.png 768w" sizes="(max-width: 924px) 100vw, 924px" /></a><p id="caption-attachment-9194" class="wp-caption-text">SSIS-derived column download image salesforce</p></div></li>
<li>Now let&#8217;s, drag and drop SSIS Export Column from the SSIS Toolbox &gt;&gt; Other Transforms.
<div id="attachment_10220" style="width: 443px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-export-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10220" class="size-full wp-image-10220" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-export-column.png" alt="Drag and drop Export Column" width="433" height="291" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-export-column.png 433w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-export-column-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-export-column-272x182.png 272w" sizes="(max-width: 433px) 100vw, 433px" /></a><p id="caption-attachment-10220" class="wp-caption-text">Drag and drop Export Column</p></div></li>
<li>Double-click on the Export column to download an image of the body. In the Extract Column map the Body column of File data and the Path Column to where you want to save that file.
<div id="attachment_9191" style="width: 909px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/download-salesforce-attachment-body.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9191" class="wp-image-9191 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/12/download-salesforce-attachment-body.png" alt="Download attachment salesforce" width="899" height="261" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/download-salesforce-attachment-body.png 899w, https://zappysys.com/blog/wp-content/uploads/2020/12/download-salesforce-attachment-body-300x87.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/12/download-salesforce-attachment-body-768x223.png 768w" sizes="(max-width: 899px) 100vw, 899px" /></a><p id="caption-attachment-9191" class="wp-caption-text">SSIS export column salesforce image</p></div></li>
<li>Finally, we will use the trash destination to get the image and finish the flow.
<div id="attachment_9195" style="width: 267px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-trash-destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9195" class="size-full wp-image-9195" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-trash-destination.png" alt="Destination ssis salesforce" width="257" height="84" /></a><p id="caption-attachment-9195" class="wp-caption-text">SSIS Trash destination</p></div></li>
<li>Now, we are ready. Your package should be something like this:
<div id="attachment_9196" style="width: 340px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-full-salesforce-download-package.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9196" class="wp-image-9196 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-full-salesforce-download-package.png" alt="Download Salesforce Attachment in SSIS " width="330" height="322" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-full-salesforce-download-package.png 330w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-full-salesforce-download-package-300x293.png 300w" sizes="(max-width: 330px) 100vw, 330px" /></a><p id="caption-attachment-9196" class="wp-caption-text">ssis-full-download-package</p></div></li>
<li>Run the package to test it.</li>
<li>If everything is fine, we will be able to see the file. As you can see Downloading Salesforce Attachment in SSIS is a straightforward process.</li>
</ol>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>In conclusion, we learned in this article how to Download Salesforce Attachment in SSIS. Basically, you need to use the ZappySys salesforce source, then use the derived column to specify the path and the Export column to get the image. Finally, the ZS Trash destination will be used  If you liked this article, do not hesitate to continue testing and using <a href="https://zappysys.com/">ZappySys PowerPack for SSIS.</a></p>
<p>The post <a href="https://zappysys.com/blog/download-salesforce-attachment-in-ssis/">Download Salesforce Attachment in SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call OneDrive API in SSIS (Upload, Download)</title>
		<link>https://zappysys.com/blog/call-onedrive-api-ssis-file-upload-download-delete/</link>
		
		<dc:creator><![CDATA[Ankur Saxena]]></dc:creator>
		<pubDate>Wed, 05 Aug 2020 14:08:12 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[microsoft graph api]]></category>
		<category><![CDATA[onedrive]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8965</guid>

					<description><![CDATA[<p>Introduction Microsoft Graph API is a unified way to access many Microsoft services API including OneDrive API. In our previous blog post we saw how to call Office 365 API Graph API. In this post, you will focus on how to access OneDrive API in SSIS and use REST API Task or connector like SSIS JSON / [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/call-onedrive-api-ssis-file-upload-download-delete/">How to call OneDrive API in SSIS (Upload, Download)</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/onedrive-connector/">API Connector for OneDrive</a> which makes it much simpler to <strong>Read/Write OneDrive 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).<br />
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png"><img loading="lazy" decoding="async" class="wp-image-9115 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png" alt="" width="161" height="119" /></a><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 API including <strong>OneDrive API</strong>. In our previous blog post we saw <a href="https://zappysys.com/blog/calling-office-365-api-using-ssis-graph-api-mail-calendar-contacts-onedrive-excel/" target="_blank" rel="noopener">how to call Office 365 API Graph API</a>. In this post, you will focus on how to access OneDrive API in SSIS and use REST API Task or connector like <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">SSIS JSON / REST API Source Connector</a> to load Read / Download / Upload data from OneDrive.</p>
<p>OneDrive allows to store files on the cloud and and we have seen growing requirements in downloading/Uploading files from there. This post will provide step by step details of how to Upload/Download files from OneDrive.</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>Register Microsoft App for OAuth Authentication</h2>
<p>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&#8217;s get started &#8211;</p>
<ol>
<li>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>Register a new application by clicking New Registration link.
<div id="attachment_9034" style="width: 758px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/NewRegistration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9034" 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><p id="caption-attachment-9034" class="wp-caption-text">New App Registration in Azure portal</p></div></li>
<li>Provide the name of the custom app and who can access the app in the organization.
<div id="attachment_9005" style="width: 620px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RegisterOneDriveApp-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9005" 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><p id="caption-attachment-9005" class="wp-caption-text">Register an OneDrive App</p></div></li>
<li>Go to the App overview and add a Redirect URL.
<div id="attachment_9044" style="width: 947px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9044" 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><p id="caption-attachment-9044" class="wp-caption-text">Add a Redirect URL</p></div></li>
<li>Click on &#8220;Add a Platform&#8221; under Platform Configuration section and then select &#8220;Web&#8221; under Web applications section to enter a Redirect URL.<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>
<div id="attachment_9007" style="width: 476px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/RedirectURI2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9007" 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><p id="caption-attachment-9007" class="wp-caption-text">Redirect URL</p></div></li>
<li>Create a Client Secret key which will be used to Authenticate the custom Azure app.
<div id="attachment_9010" style="width: 586px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9010" 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><p id="caption-attachment-9010" class="wp-caption-text">Add a Client Secret</p></div>
<div id="attachment_9011" style="width: 218px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9011" 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><p id="caption-attachment-9011" class="wp-caption-text">Secret Key Expiration Period</p></div>
<div id="attachment_9012" style="width: 1034px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/ClientSecret3.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9012" 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><p id="caption-attachment-9012" class="wp-caption-text">Specify Secret Key</p></div>
<div><div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>Note</strong> &#8211; Take a note of <strong>Client Secret</strong>, it will be required while configuring OAuth connection in the SSIS later.</div></div></div>
</li>
<li>Add API Permissions for OneDrive API.
<div id="attachment_10198" style="width: 1301px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10198" class="wp-image-10198 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1.jpg" alt="OneDrive API Permissions" width="1291" height="415" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1.jpg 1291w, https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1-300x96.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1-768x247.jpg 768w, https://zappysys.com/blog/wp-content/uploads/2020/08/APIPermissions1-1024x329.jpg 1024w" sizes="(max-width: 1291px) 100vw, 1291px" /></a><p id="caption-attachment-10198" class="wp-caption-text">OneDrive API Permissions</p></div></li>
<li>Select the following permissions from the Delegated Permissions section.<br />
<pre class="crayon-plain-tag">User.ReadBasic.All
Files.Read
offline_access</pre>
<div id="attachment_9009" style="width: 522px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/APIPermissions2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9009" 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><p id="caption-attachment-9009" class="wp-caption-text">Select Delegated Permissions</p></div></li>
<li>Take note of Client ID, it will be required while configuring OAuth connection in the SSIS later.
<div id="attachment_10199" style="width: 820px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10199" class="wp-image-10199 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41.jpg" alt="Client ID" width="810" height="274" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41.jpg 810w, https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41-300x101.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/08/ClientSecret41-768x260.jpg 768w" sizes="(max-width: 810px) 100vw, 810px" /></a><p id="caption-attachment-10199" class="wp-caption-text">Client ID</p></div></li>
</ol>
<h2>Get OneDrive File ID</h2>
<p>In this section, you will learn how to get the File ID of the CSV file through OneDrive API. So, let&#8217;s get started &#8211;</p>
<ol>
<li>Go to the <a href="https://developer.microsoft.com/en-us/graph/graph-explorer">Microsoft Graph Explorer</a>.</li>
<li>Sign in to Graph Explorer.
<div id="attachment_9153" style="width: 489px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2.jpg" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9153" class="wp-image-9153 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2.jpg" alt="SSIS GraphExplorer SignIn" width="479" height="388" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2.jpg 479w, https://zappysys.com/blog/wp-content/uploads/2020/08/ssis-GraphExplorer-2-300x243.jpg 300w" sizes="(max-width: 479px) 100vw, 479px" /></a><p id="caption-attachment-9153" class="wp-caption-text">SSIS GraphExplorer SignIn</p></div></li>
<li>Run below OneDrive API to get a list of the files from the OneDrive.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/root/children</pre>
<div id="attachment_9048" style="width: 1003px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9048" class="size-full wp-image-9048" src="https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1.jpg" alt="Microsoft Graph Explorer" width="993" height="509" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1.jpg 993w, https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1-300x154.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/GraphExplorer-1-768x394.jpg 768w" sizes="(max-width: 993px) 100vw, 993px" /></a><p id="caption-attachment-9048" class="wp-caption-text">Microsoft Graph Explorer</p></div>
<div><div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> Take a note of <strong>File ID</strong> of the CSV file. For this example, we will download invoices.csv file.</div></div></div>
</li>
</ol>
<h2>Create OAuth Connection in SSIS</h2>
<p>In this section, you will learn how to create an OAuth connection in SSIS to an Azure custom app. So, let&#8217;s get started &#8211;</p>
<ol>
<li>Create a new ZS-OAuth connection in SSIS.
<div id="attachment_9015" style="width: 486px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9015" class="size-full wp-image-9015" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth.jpg" alt="ZappySys OAuth Connection in SSIS" width="476" height="445" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth.jpg 476w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth-300x280.jpg 300w" sizes="(max-width: 476px) 100vw, 476px" /></a><p id="caption-attachment-9015" class="wp-caption-text">ZappySys OAuth Connection in SSIS</p></div></li>
<li>Configure OAuth connection with following settings.
<div>
<div></div>
</div>
<div class="su-table su-table-alternate">
<table style="width: 100%;border-collapse: collapse;border-style: solid;border-color: #dedede" border="1">
<tbody>
<tr style="height: 21px">
<td style="width: 23.0015%;height: 21px"><span style="font-size: 10pt">Client ID</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">Provide Client ID from App Registration steps</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Client Secret</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">Provide Client Secret from App Registration steps</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Authorization URL</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">https://login.microsoftonline.com/organizations/oauth2/v2.0/authorize</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Access Token URL</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">https://login.microsoftonline.com/organizations/oauth2/v2.0/token</span></td>
</tr>
<tr>
<td style="width: 23.0015%"><span style="font-size: 10pt">Scope/Permissions</span></td>
<td style="width: 76.9985%"><span style="font-size: 10pt">User.ReadBasic.All</span><br />
<span style="font-size: 10pt">Files.Read.All</span><br />
<span style="font-size: 10pt">offline_access</span></td>
</tr>
</tbody>
</table>
</div>
<div id="attachment_9016" style="width: 860px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9016" class="wp-image-9016 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2.jpg" alt="OAuth Connection Configuration" width="850" height="653" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2.jpg 850w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2-300x230.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth2-768x590.jpg 768w" sizes="(max-width: 850px) 100vw, 850px" /></a><p id="caption-attachment-9016" class="wp-caption-text">OAuth Connection Configuration</p></div></li>
<li>Go to the Advanced tab and provide Return URL.<br />
<pre class="crayon-plain-tag">https://zappysys.com/oauth</pre>
<div id="attachment_9021" style="width: 827px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9021" class="size-full wp-image-9021" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6.jpg" alt="Add Redirect URL" width="817" height="197" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6.jpg 817w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6-300x72.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth6-768x185.jpg 768w" sizes="(max-width: 817px) 100vw, 817px" /></a><p id="caption-attachment-9021" class="wp-caption-text">Add Redirect URL</p></div></li>
<li>Click on Generate Token will give a login screen which will allow to generate access and refresh token for the app.</li>
<li>Approve the requested permissions bu Accepting it.
<div id="attachment_9018" style="width: 638px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9018" class="size-full wp-image-9018" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4.jpg" alt="Approve Permissions Requested" width="628" height="522" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4.jpg 628w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth4-300x249.jpg 300w" sizes="(max-width: 628px) 100vw, 628px" /></a><p id="caption-attachment-9018" class="wp-caption-text">Approve Permissions Requested</p></div></li>
<li>Token has been generate successfully.
<div id="attachment_9019" style="width: 422px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9019" class="wp-image-9019 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5.jpg" alt="Refresh Token Successful" width="412" height="315" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5.jpg 412w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth5-300x229.jpg 300w" sizes="(max-width: 412px) 100vw, 412px" /></a><p id="caption-attachment-9019" class="wp-caption-text">Refresh Token Successful</p></div></li>
<li>Let&#8217;s test the connection to make sure it is working fine.
<div id="attachment_9020" style="width: 827px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9020" class="wp-image-9020 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7.jpg" alt="Connection Successful" width="817" height="694" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7.jpg 817w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7-300x255.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/OAuth7-768x652.jpg 768w" sizes="(max-width: 817px) 100vw, 817px" /></a><p id="caption-attachment-9020" class="wp-caption-text">Connection Successful</p></div></li>
</ol>
<h2>Download CSV File Through OneDrive REST API in SSIS</h2>
<p>In this section, you will learn how to download a CSV file through OneDrive API in SSIS and save it into a CSV file.</p>
<ol>
<li>Here is the OneDrive API which allows to read content of the file.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/&lt;File ID&gt;/content</pre>
</li>
<li>Replace &lt;File ID&gt; in above step#1 with the file ID that we have got in the <strong>Get OneDrive File ID</strong> section. Final URL will look something like below.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/01W7L3VCUBS27ILUQKENAK4LQGGTJ2R3TT/content</pre>
</li>
<li>Let&#8217;s create a SSIS package with Data Flow Task from SSIS Toolbox.<a href="https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow.png"><img loading="lazy" decoding="async" width="516" height="185" class="size-full wp-image-9073" src="https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow.png" alt="&quot;&quot;/content&lt;/pre" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow.png 516w, https://zappysys.com/blog/wp-content/uploads/2020/07/AddDataflow-300x108.png 300w" sizes="(max-width: 516px) 100vw, 516px" /></a></li>
<li>Replace &lt;File ID&gt; in above step#1 with the file ID that we have got in the <strong>Get OneDrive File ID</strong> section. Final URL will look something like below.<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/01W7L3VCWMCGPYZLM2IRAYWROSH4XMQT7A/content</pre>
</li>
<li>Configure REST API task as follows.
<div id="attachment_9084" style="width: 928px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9084" class="size-full wp-image-9084" src="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File.png" alt="Binary File Configuration in ZappySys REST API Task" width="918" height="625" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File.png 918w, https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File-768x523.png 768w" sizes="(max-width: 918px) 100vw, 918px" /></a><p id="caption-attachment-9084" class="wp-caption-text">Binary File Configuration in ZappySys REST API Task</p></div></li>
<li>Configure the responses setting as below.
<div id="attachment_9083" style="width: 696px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9083" class="wp-image-9083 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2.png" alt="Binary File Configuration in ZappySys REST API Task" width="686" height="613" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2.png 686w, https://zappysys.com/blog/wp-content/uploads/2020/07/Download-Binary-File2-300x268.png 300w" sizes="(max-width: 686px) 100vw, 686px" /></a><p id="caption-attachment-9083" class="wp-caption-text">Binary File Configuration in ZappySys REST API Task</p></div>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: Ensure that the <strong>Treat response as the binary</strong> checkbox is checked otherwise the file will be downloaded but corrupted as zip/mp3 etc. file format is binary.</div></div></li>
<li>Check if the request is made correctly by clicking Test Request/Response.
<div id="attachment_10201" style="width: 622px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10201" class="wp-image-10201 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3.png" alt="Example of Testing the Request" width="612" height="621" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3.png 612w, https://zappysys.com/blog/wp-content/uploads/2020/08/Download-Binary-File3-296x300.png 296w" sizes="(max-width: 612px) 100vw, 612px" /></a><p id="caption-attachment-10201" class="wp-caption-text">Example of Testing the Request</p></div></li>
<li>Let&#8217;s have a look at the folder where the file has been downloaded. Here is an example &#8211;
<div id="attachment_9082" style="width: 894px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9082" class="wp-image-9082 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample.png" alt="Downloaded File Example" width="884" height="128" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample.png 884w, https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample-300x43.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/DownloadedFileExample-768x111.png 768w" sizes="(max-width: 884px) 100vw, 884px" /></a><p id="caption-attachment-9082" class="wp-caption-text">Downloaded File Example</p></div></li>
</ol>
<div class="mceTemp"></div>
<h2>Download a Text File Through OneDrive API in SSIS</h2>
<p>Here is another technique that can be used to download a CSV/text file through OneDrive API without knowing it&#8217;s file ID but file name. Please check this <a href="https://zappysys.zendesk.com/hc/en-us/articles/115005010573-How-to-download-file-from-OneDrive-using-Graph-API">link</a> for more details.</p>
<h2>Download Excel Sheets Through OneDrive API in SSIS</h2>
<p>JSON Source also supports reading API response which returns 2D arrays. Such as <a href="https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/excel" target="_blank" rel="noopener">Office Excel Spreadsheet API</a> to read excel data. Check <a href="https://zappysys.com/blog/get-data-google-spreadsheet-using-ssis/" target="_blank" rel="noopener">this blog post</a> to learn a similar scenario to parse 2D arrays. There are few other options for parsing 2D arrays which are <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">documented here</a>.</p>
<div id="crayon-5efb7d9f087eb405096699" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-plain-wrap">
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/items/01CYZLFJDYxxxxxxx/workbook/worksheets('test')/range(address='A1:B200')</pre>
</div>
</div>
<h2>Upload a File Through OneDrive API in SSIS</h2>
<p>In this section, you will learn how to upload a file through OneDrive API in SSIS. Uploading a file has few additional steps and has been documented separately. Please check this <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004893713-How-to-upload-file-to-OneDrive-using-Office-365-Graph-API">link</a> for more details.</p>
<h2>Delete a File Through OneDrive API in SSIS</h2>
<p>In this section, you will learn how to delete a file from OneDrive through OneDrive APIs in SSIS.</p>
<ol>
<li>Add a REST API task and configure as follows. Make sure to use the File ID of the file which needs to be deleted from OneDrive. Example URL &#8211;<br />
<pre class="crayon-plain-tag">https://graph.microsoft.com/v1.0/me/drive/Items/01W7L3VCSEADQ457W54RBI3I47YGFJOD2I</pre>
<div id="attachment_9081" style="width: 818px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9081" class="wp-image-9081 size-full" src="https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File.png" alt="Delete OneDrive File" width="808" height="648" srcset="https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File.png 808w, https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File-300x241.png 300w, https://zappysys.com/blog/wp-content/uploads/2020/07/Delete-OneDrive-File-768x616.png 768w" sizes="(max-width: 808px) 100vw, 808px" /></a><p id="caption-attachment-9081" class="wp-caption-text">Delete OneDrive File</p></div></li>
<li>Execute the task and you will have file deleted from OneDrive.</li>
</ol>
<h2><span id="ConclusionWhats_next"><span id="ConclusionWhat8217s_next">Conclusion</span></span></h2>
<p>In this article, we have learned how to Upload/Download/Delete data/file from OneDrive API in SSIS. We used <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">SSIS REST API Task</a> to extract data through OneDrive API in SSIS. <a href="https://zappysys.com/products/ssis-powerpack/">Download SSIS PowerPack</a> to try many other automation scenarios not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/call-onedrive-api-ssis-file-upload-download-delete/">How to call OneDrive API in SSIS (Upload, Download)</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 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>
	</channel>
</rss>
