<?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>SSIS REST API Task Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/ssis/tasks/ssis-rest-api-web-service-task/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/ssis/tasks/ssis-rest-api-web-service-task/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Thu, 02 Apr 2026 19:28:01 +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>SSIS REST API Task Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/ssis/tasks/ssis-rest-api-web-service-task/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>SSIS tutorial: How to connect Blogger with SSIS</title>
		<link>https://zappysys.com/blog/ssis-tutorial-how-to-connect-blogger-with-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 27 Mar 2026 11:41:30 +0000</pubDate>
				<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS Upsert Destination]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=11893</guid>

					<description><![CDATA[<p>Introduction This tutorial walks you through the process of extracting blog posts and comments data from Blogger using the REST API and Zappysys SSIS connectors. In this guide, you will learn how to authenticate with the Blogger REST API, configure a Zappysys REST data source, and load extracted data into SQL Server. This approach eliminates [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-connect-blogger-with-ssis/">SSIS tutorial: How to connect Blogger with SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p class="intro-text"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/logo.png"><img decoding="async" class=" wp-image-11901 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2026/03/logo-150x150.png" alt="Blogger Logo" width="134" height="134" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2026/03/logo-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/logo.png 512w" sizes="(max-width: 134px) 100vw, 134px" /></a>This tutorial walks you through the process of extracting blog posts and comments data from Blogger using the REST API and Zappysys SSIS connectors. In this guide, you will learn how to authenticate with the Blogger REST API, configure a Zappysys REST data source, and load extracted data into SQL Server. This approach eliminates the need for custom code and provides a graphical interface for managing complex API integrations.</p>
<p class="intro-text">Zappysys provides a powerful REST connector that simplifies integrating cloud-based APIs into your SQL Server Integration Services packages. We will demonstrate a practical ETL pattern using ZappySys REST connectivity to extract data from Blogger and load it into SQL Server within SSIS.</p>
<p><!-- Prerequisites --></p>
<h2>Prerequisites</h2>
<p>Before you begin, make sure you have the following:</p>
<ul>
<li>First, you will need to have SSIS installed</li>
<li>Secondly, make sure to have SSDT</li>
<li>Thirdly, access to a Blogger blog with appropriate permissions to read public posts and comments.</li>
<li>Finally, do not forget to install ZappySys <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack.</a></li>
</ul>
<p><!-- Step-by-Step Guide --></p>
<h2>Steps</h2>
<h3>Create/Select a Project in the Google API Console</h3>
<ol>
<li>Navigate to the <a href="https://console.developers.google.com/">Google API Console</a>.</li>
<li>Click on the Project Dropdown at the top bar and either select an existing project or create a new one by clicking <strong>CREATE PROJECT</strong>.
<div id="attachment_11905" style="width: 807px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-or-select-project.png"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-11905" class="wp-image-11905 size-full" src="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-or-select-project.png" alt="" width="797" height="255" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-or-select-project.png 797w, https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-or-select-project-300x96.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-or-select-project-768x246.png 768w" sizes="(max-width: 797px) 100vw, 797px" /></a><p id="caption-attachment-11905" class="wp-caption-text">Google Console &#8211; Create or select a project</p></div></li>
<li>Once the project is set, click <strong>ENABLE APIS AND SERVICES</strong>.</li>
<li>Search for the <strong>Blogger API v3</strong> and click <strong>ENABLE</strong>.
<div id="attachment_11903" style="width: 690px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Enable-Blogger-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11903" class="wp-image-11903 size-full" src="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Enable-Blogger-API.png" alt="" width="680" height="265" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Enable-Blogger-API.png 680w, https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Enable-Blogger-API-300x117.png 300w" sizes="(max-width: 680px) 100vw, 680px" /></a><p id="caption-attachment-11903" class="wp-caption-text">Google Console &#8211; Enable Blogger API</p></div></li>
<li>Return to the main screen and click on the <strong>OAuth Consent Screen</strong> tab.</li>
<li>Select the <strong>External</strong> user type and click <strong>CREATE</strong>.</li>
<li>Provide the application name, user support email, and developer contact information, then click <strong>SAVE AND CONTINUE</strong>.</li>
<li>Click through the remaining scopes and summary pages (no additional scopes are required for this tutorial), and click <strong>SAVE AND CONTINUE</strong> on each.</li>
<li>Move to the <strong>Credentials</strong> tab.</li>
<li>Click <strong>CREATE CREDENTIALS</strong> in the top bar, choose <strong>OAuth Client ID</strong>, select <strong>Desktop App</strong> as the Application Type, and click <strong>Create</strong> to obtain your Client ID and Secret.
<div id="attachment_11904" style="width: 910px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11904" class="wp-image-11904 size-full" src="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-credentials.png" alt="" width="900" height="335" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-credentials.png 900w, https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-credentials-300x112.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/Google-Console-Create-credentials-768x286.png 768w" sizes="(max-width: 900px) 100vw, 900px" /></a><p id="caption-attachment-11904" class="wp-caption-text">Google Console &#8211; Create credentials</p></div></li>
<li>Download the credentials JSON file and save it in a secure location on your development machine.</li>
</ol>
<h3>Create the OAuth connection for Blogger</h3>
<ol>
<li>Create or select your SSIS project, and open the package.dtsx file.</li>
<li>Drag and drop the ZS REST API task from the Toolbox.</li>
<li>Inside<strong> Connection Manager</strong>, right-click and select <strong>New connection&#8230;</strong></li>
<li>Inside the SSIS connectors, select the <strong><strong>ZS-OAuth<br />
</strong></strong></p>
<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>Select the <strong>Google API provider</strong></li>
<li>Enter the <strong>Client</strong> ID and <strong>Client Secret</strong> you generated in the past step</li>
<li>Use Blogger URL scope: <code>https://www.googleapis.com/auth/blogger</code></li>
<li>Generate the token</li>
<li>Test the connection to ensure it is working correctly.</li>
<li>Click OK to save the connection.
<div id="attachment_11907" style="width: 713px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/OAuth-connection-Blogger-API.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11907" class="size-full wp-image-11907" src="https://zappysys.com/blog/wp-content/uploads/2026/03/OAuth-connection-Blogger-API.png" alt="" width="703" height="698" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/OAuth-connection-Blogger-API.png 703w, https://zappysys.com/blog/wp-content/uploads/2026/03/OAuth-connection-Blogger-API-300x298.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/OAuth-connection-Blogger-API-150x150.png 150w" sizes="(max-width: 703px) 100vw, 703px" /></a><p id="caption-attachment-11907" class="wp-caption-text">OAuth connection &#8211; Blogger API</p></div></li>
</ol>
<h3>Get information from a Blog</h3>
<ol>
<li>Create a string variable <code>{{User::BlogID}}</code> and enter the ID from the blog you want to get information from.</li>
<li>From the SSIS Toolbox, drag the<a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/"><strong> ZS REST API Task</strong></a> onto the Control Flow designer.</li>
<li>Double-click the task to open the editor.</li>
<li>Select the connection manager you created in the previous step.</li>
<li>In the URL Path field, enter: <code>https://www.googleapis.com/blogger/v3/blogs/{{User::BlogID}}/posts</code></li>
<li>Set the HTTP method to <strong>GET</strong>.</li>
<li>Click the Preview tab to test the API connection and view sample data.</li>
<li>If the preview is successful, click OK to configure the task.
<div id="attachment_11908" style="width: 917px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/REST-API-task-Blogger-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11908" class="size-full wp-image-11908" src="https://zappysys.com/blog/wp-content/uploads/2026/03/REST-API-task-Blogger-example.png" alt="" width="907" height="729" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/REST-API-task-Blogger-example.png 907w, https://zappysys.com/blog/wp-content/uploads/2026/03/REST-API-task-Blogger-example-300x241.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/REST-API-task-Blogger-example-768x617.png 768w" sizes="(max-width: 907px) 100vw, 907px" /></a><p id="caption-attachment-11908" class="wp-caption-text">REST API task &#8211; Blogger example</p></div></li>
</ol>
<h3>Save the information in a SQL table</h3>
<ol>
<li>Drag and drop a Data Flow into the Control Flow and double-click it.
<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>In the Data Flow, drag and drop the <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener"><strong>JSON source,</strong></a> then double-click it to configure it.
<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>Use the same configuration as in the REST API task, but first enable the <strong>Use credentials </strong>option.</li>
<li>Enter the <strong>URL</strong>, select the <strong>OAuth</strong> connection, and use the Method <strong>GET</strong>.</li>
<li>You can use the filter option to get the object you want to get data from: <code>$.Items[*]</code></li>
<li>Preview the data and click <strong>OK</strong> to save the configuration.
<div id="attachment_11911" style="width: 837px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/JSON-Source-Blogger-Example-Request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11911" class="size-full wp-image-11911" src="https://zappysys.com/blog/wp-content/uploads/2026/03/JSON-Source-Blogger-Example-Request.png" alt="" width="827" height="725" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/JSON-Source-Blogger-Example-Request.png 827w, https://zappysys.com/blog/wp-content/uploads/2026/03/JSON-Source-Blogger-Example-Request-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/JSON-Source-Blogger-Example-Request-768x673.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-11911" class="wp-caption-text">JSON Source &#8211; Blogger Example Request</p></div>
<div class="mceTemp"></div>
</li>
<li>Now drag and drop a destination component. In our case, we will use the Upsert destination component.
<div id="attachment_9644" style="width: 837px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9644" class="size-full wp-image-9644" src="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png" alt="SSIS - Data Flow - Drag and Drop Upsert Destination Component" width="827" height="385" srcset="https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination.png 827w, https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/08/ssis-data-flow-drag-drop-upsert-destination-768x358.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-9644" class="wp-caption-text">SSIS &#8211; Data Flow &#8211; Drag and Drop Upsert Destination Component</p></div></li>
<li>Double-click in the <a href="https://zappysys.com/products/ssis-powerpack/ssis-upsert-destination/">Upsert destination</a> component to configure it.</li>
<li>Select the Action you want to use.</li>
<li>Create or select a database connector.</li>
<li>Create or select a table.</li>
<li>Use the options <strong>Insert</strong> or/and <strong>Update.</strong></li>
<li>Map the column; if the columns have the same name, it will be automatic.</li>
<li>Select at least one column for a <strong>primary key</strong>.</li>
<li>Click <strong>OK</strong> to save the configuration.
<div id="attachment_11912" style="width: 968px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/Upsert-destination-Blogger-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11912" class="size-full wp-image-11912" src="https://zappysys.com/blog/wp-content/uploads/2026/03/Upsert-destination-Blogger-example.png" alt="" width="958" height="645" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/Upsert-destination-Blogger-example.png 958w, https://zappysys.com/blog/wp-content/uploads/2026/03/Upsert-destination-Blogger-example-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/03/Upsert-destination-Blogger-example-768x517.png 768w, https://zappysys.com/blog/wp-content/uploads/2026/03/Upsert-destination-Blogger-example-272x182.png 272w" sizes="(max-width: 958px) 100vw, 958px" /></a><p id="caption-attachment-11912" class="wp-caption-text">Upsert destination &#8211; Blogger example</p></div></li>
<li>Run the package, and you will see the data from Blogger in your database
<div id="attachment_11930" style="width: 350px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/03/Blogger-result.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11930" class="size-full wp-image-11930" src="https://zappysys.com/blog/wp-content/uploads/2026/03/Blogger-result.png" alt="" width="340" height="207" srcset="https://zappysys.com/blog/wp-content/uploads/2026/03/Blogger-result.png 340w, https://zappysys.com/blog/wp-content/uploads/2026/03/Blogger-result-300x183.png 300w" sizes="(max-width: 340px) 100vw, 340px" /></a><p id="caption-attachment-11930" class="wp-caption-text">Blogger &#8211; result</p></div></li>
</ol>
<p><!-- Code Examples --></p>
<h2>Code Examples</h2>
<h3>Sample REST API Request</h3>
<p>Here&#8217;s an example of retrieving blog posts using the Blogger REST API:</p><pre class="crayon-plain-tag">GET https://www.googleapis.com/blogger/v3/blogs/{blogId}/posts
Authorization: Bearer {access_token}
Content-Type: application/json</pre><p>
Example response:</p><pre class="crayon-plain-tag">{
  &quot;kind&quot;: &quot;blogger#posts&quot;,
  &quot;items&quot;: [
    {
      &quot;kind&quot;: &quot;blogger#post&quot;,
      &quot;id&quot;: &quot;7109703471293209437&quot;,
      &quot;title&quot;: &quot;Getting started with Blogger API&quot;,
      &quot;content&quot;: &quot;Learn how to integrate Blogger with your applications...&quot;,
      &quot;published&quot;: &quot;2026-03-15T10:30:00Z&quot;,
      &quot;updated&quot;: &quot;2026-03-20T14:15:00Z&quot;,
      &quot;url&quot;: &quot;http://example.blogspot.com/2026/03/getting-started.html&quot;,
      &quot;author&quot;: {
        &quot;displayName&quot;: &quot;John Doe&quot;
      }
    }
  ]
}</pre><p>
<h3>SQL Table Structure</h3>
<p>Recommended table structure for storing Blogger posts data:</p><pre class="crayon-plain-tag">CREATE TABLE BloggerPosts (
    PostID BIGINT PRIMARY KEY,
    BlogID BIGINT NOT NULL,
    Title NVARCHAR(MAX),
    Content NVARCHAR(MAX),
    AuthorName NVARCHAR(255),
    PublishedDate DATETIME,
    UpdatedDate DATETIME,
    PostURL NVARCHAR(MAX),
    CreatedDate DATETIME DEFAULT GETDATE(),
    ModifiedDate DATETIME DEFAULT GETDATE()
);</pre><p>
<!-- Conclusion --></p>
<h2>Conclusion</h2>
<p class="intro-text">You have successfully learned how to use Zappysys SSIS connectors to extract data from the Blogger<br />
platform using the REST API. With ZappySys SSIS PowerPack, connecting Blogger to your SQL Server becomes<br />
straightforward and reliable. By configuring the REST connector for Blogger and using the native SSIS destination,<br />
you can build a robust ETL pipeline for extracting blog data.</p>
<p class="intro-text">Explore the full capabilities of the <a href="https://zappysys.com/products/ssis-powerpack/">ZappySys SSIS PowerPack</a> to optimize your data integration<br />
tasks. By applying this pattern, you can extend your solution to include additional transformations, data<br />
validation, error handling, and scheduling through SQL Server Agent.</p>
<p><!-- References --></p>
<p><!-- Need Help --></p>
<h2>Need Help?</h2>
<p class="section-intro">If you encounter any issues, our support team is here to help:</p>
<ol>
<li><strong>Live Chat</strong> — Use the chat widget (bottom-right corner of this page)</li>
<li><strong>Email</strong> — support@zappysys.com</li>
<li><strong>Support Center</strong> — Visit the ZappySys Support Portal</li>
</ol>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-connect-blogger-with-ssis/">SSIS tutorial: How to connect Blogger with SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<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 loading="lazy" 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>SSIS tutorial: How to connect to Swagger</title>
		<link>https://zappysys.com/blog/ssis-tutorial-how-to-connect-to-swagger/</link>
		
		<dc:creator><![CDATA[ZappySys Team]]></dc:creator>
		<pubDate>Fri, 20 Feb 2026 00:11:27 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></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=11710</guid>

					<description><![CDATA[<p>Introduction In this article, we&#8217;ll learn how to integrate a documented API in Swagger with SQL Server Integration Services (SSIS) using ZappySys PowerPack. Swagger enables us to visualize and test REST endpoints, while ZappySys SSIS provides advanced components for consuming APIs and transforming data in ETL processes. Steps Get the Swagger endpoints Before connecting from [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-connect-to-swagger/">SSIS tutorial: How to connect to Swagger</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this article, we&#8217;ll learn how to integrate a documented API in Swagger with SQL Server Integration Services (SSIS) using ZappySys PowerPack.</p>
<p>Swagger enables us to visualize and test REST endpoints, while ZappySys SSIS provides advanced components for consuming APIs and transforming data in ETL processes.</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><a class="anchor" href="https://community.zappysys.com/t/ssis-tips-download-upload-files-from-azure-data-lake-storage-gen2-adls-v2/746#p-891-steps-2" name="p-891-steps-2" aria-label="Heading link"></a>Steps</h2>
<h3><a class="anchor" href="https://community.zappysys.com/t/ssis-tips-download-upload-files-from-azure-data-lake-storage-gen2-adls-v2/746#p-891-validating-your-azure-storage-account-is-gen2-adls-v2-3" name="p-891-validating-your-azure-storage-account-is-gen2-adls-v2-3" aria-label="Heading link"></a>Get the Swagger endpoints</h3>
<div>Before connecting from SSIS, identify the endpoints you want to use. In this example, we will use the <a href="https://petstore.swagger.io/#/">Petstore Swagger server </a>as a public API reference.</div>
<ol>
<li>Review the server’s endpoint list. In this example, we will explore the <strong>Pet</strong> category.
<div id="attachment_11712" style="width: 604px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Pet-category.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11712" class="size-full wp-image-11712" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Pet-category.png" alt="" width="594" height="547" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Pet-category.png 594w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Pet-category-300x276.png 300w" sizes="(max-width: 594px) 100vw, 594px" /></a><p id="caption-attachment-11712" class="wp-caption-text">Swagger &#8211; Pet category</p></div></li>
<li>From the list, we can see multiple endpoints and HTTP methods, including <strong>GET</strong>, <strong>POST</strong>, <strong>PUT</strong>, and <strong>DELETE.</strong></li>
<li>Click on an endpoint to expand it. For this example, we will use <strong><strong>Add a new pet to the store.<br />
</strong></strong></p>
<div id="attachment_11714" style="width: 1430px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11714" class="size-full wp-image-11714" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet.png" alt="" width="1420" height="742" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet.png 1420w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-300x157.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-1024x535.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-768x401.png 768w" sizes="(max-width: 1420px) 100vw, 1420px" /></a><p id="caption-attachment-11714" class="wp-caption-text">Swagger &#8211; Create a new pet</p></div></li>
<li>Click <strong>Try it out</strong>. Swagger will allow you to edit the request body and choose the content type (JSON or XML).</li>
<li>Click <strong>Execute</strong>. Swagger will display
<ul>
<li>The generated request in <strong>cURL</strong> format</li>
<li>The Request URL</li>
<li>The Response body</li>
<li>The HTTP status code</li>
</ul>
</li>
<li>In the Response JSON, we can see the new pet with status code 200, indicating success.</li>
<li>Now, with the <strong>CURL</strong> syntax, we can use that inside our tool.
<div id="attachment_11715" style="width: 1421px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-CURL.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11715" class="size-full wp-image-11715" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-CURL.png" alt="" width="1411" height="919" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-CURL.png 1411w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-CURL-300x195.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-CURL-1024x667.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-Create-a-new-pet-CURL-768x500.png 768w" sizes="(max-width: 1411px) 100vw, 1411px" /></a><p id="caption-attachment-11715" class="wp-caption-text">Swagger &#8211; Create a new pet CURL</p></div></li>
</ol>
<h3><a class="anchor" href="https://community.zappysys.com/t/ssis-tips-download-upload-files-from-azure-data-lake-storage-gen2-adls-v2/746#p-891-connect-azure-adls-gen2-in-ssis-4" name="p-891-connect-azure-adls-gen2-in-ssis-4" aria-label="Heading link"></a></h3>
<h3>POST request: Create Pet Request</h3>
<ol>
<li>Open Visual Studio and create a new <strong>Integration Services Project</strong>.</li>
<li>After the project is created, locate the <strong>SSIS Toolbox</strong> on the left panel.</li>
<li>Drag and drop the <strong>REST API Task</strong> onto the Control Flow surface and double-click it to configure
<div id="attachment_11713" style="width: 576px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-Drop-REST-API-Task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11713" class="size-full wp-image-11713" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-Drop-REST-API-Task.png" alt="" width="566" height="279" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-Drop-REST-API-Task.png 566w, https://zappysys.com/blog/wp-content/uploads/2026/02/Drag-and-Drop-REST-API-Task-300x148.png 300w" sizes="(max-width: 566px) 100vw, 566px" /></a><p id="caption-attachment-11713" class="wp-caption-text">Drag and Drop REST API Task</p></div></li>
<li>Use the cURL generated from Swagger. For reference, you can review our article about converting <a href="https://zappysys.com/blog/using-ssis-curl-syntax-to-ssis-api-task/">cURL to an SSIS API Task</a>.<br />
<pre class="crayon-plain-tag">curl -X 'POST' \
  'https://petstore.swagger.io/v2/pet' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  &quot;id&quot;: 123,
  &quot;category&quot;: {
    &quot;id&quot;: 456,
    &quot;name&quot;: &quot;Friendly&quot;
  },
  &quot;name&quot;: &quot;Zappy&quot;,
  &quot;photoUrls&quot;: [
    &quot;string&quot;
  ],
  &quot;tags&quot;: [
    {
      &quot;id&quot;: 0,
      &quot;name&quot;: &quot;tech&quot;
    }
  ],
  &quot;status&quot;: &quot;available&quot;
}'</pre>
</li>
<li><strong>-X POST</strong> represents the HTTP method. Set the Request Method to <strong>POST</strong>.</li>
<li>Enter the URL from the cURL command.</li>
<li>Each <strong>-H</strong> represents a Header. Add the corresponding headers inside the REST API Task.</li>
<li>The <strong>-d</strong> parameter represents the Body. Paste the JSON payload into the Body section.</li>
<li>Click <strong>Test Request/Response</strong> to validate the configuration.
<div id="attachment_11716" style="width: 1312px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-Create-a-new-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11716" class="size-full wp-image-11716" src="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-Create-a-new-pet.png" alt="" width="1302" height="667" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-Create-a-new-pet.png 1302w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-Create-a-new-pet-300x154.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-Create-a-new-pet-1024x525.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-Create-a-new-pet-768x393.png 768w" sizes="(max-width: 1302px) 100vw, 1302px" /></a><p id="caption-attachment-11716" class="wp-caption-text">SSIS &#8211; Create a new pet</p></div></li>
<li>You can use additional components such as <strong>JSON Source</strong> or <strong>XML Source,</strong> depending on how you plan to process the response.</li>
</ol>
<h3>POST request: Upload a file</h3>
<ol>
<li>Next, we will upload an image for the pet we created earlier
<div id="attachment_11717" style="width: 1422px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-upload-image.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11717" class="size-full wp-image-11717" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-upload-image.png" alt="" width="1412" height="680" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-upload-image.png 1412w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-upload-image-300x144.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-upload-image-1024x493.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-upload-image-768x370.png 768w" sizes="(max-width: 1412px) 100vw, 1412px" /></a><p id="caption-attachment-11717" class="wp-caption-text">Swagger &#8211; upload image</p></div></li>
<li>Generate the CURL code.<br />
<pre class="crayon-plain-tag">curl -X 'POST' \
  'https://petstore.swagger.io/v2/pet/123/uploadImage' \
  -H 'accept: application/json' \
  -H 'Content-Type: multipart/form-data' \
  -F 'file=@new.jpg;type=image/jpeg'</pre>
</li>
<li>Configure the REST API Task with:
<ul>
<li>Request Method: POST</li>
<li>URL</li>
<li>Headers</li>
<li>File parameter</li>
</ul>
</li>
<li>Check the option <strong>File upload.</strong></li>
<li>Specify the full file path (e.g., <em>file=@D:\Zappysys\new.jpg</em>).</li>
<li>Click Test Request to validate the upload.</li>
<li>You can find an article about <a href="https://zappysys.com/blog/rest-api-file-upload-using-ssis-multi-part-post/" target="_blank" rel="noopener">uploading files here</a>.
<div class="mceTemp"></div>
<div id="attachment_11730" style="width: 1322px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-upload-an-image.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11730" class="size-full wp-image-11730" src="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-upload-an-image.png" alt="" width="1312" height="719" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-upload-an-image.png 1312w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-upload-an-image-300x164.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-upload-an-image-1024x561.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-upload-an-image-768x421.png 768w" sizes="(max-width: 1312px) 100vw, 1312px" /></a><p id="caption-attachment-11730" class="wp-caption-text">SSIS &#8211; upload an image</p></div></li>
</ol>
<h3>GET request: Get the Pet information</h3>
<ol>
<li> Now we will get the pet we created earlier. This is the example
<div id="attachment_11724" style="width: 1432px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-get-pet-by-id.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11724" class="size-full wp-image-11724" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-get-pet-by-id.png" alt="" width="1422" height="592" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-get-pet-by-id.png 1422w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-get-pet-by-id-300x125.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-get-pet-by-id-1024x426.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-get-pet-by-id-768x320.png 768w" sizes="(max-width: 1422px) 100vw, 1422px" /></a><p id="caption-attachment-11724" class="wp-caption-text">Swagger &#8211; get pet by id</p></div></li>
<li>We generate the CURL<br />
<pre class="crayon-plain-tag">curl -X 'GET' \
  'https://petstore.swagger.io/v2/pet/123' \
  -H 'accept: application/json'</pre>
</li>
<li>Inside the Visual Studio project, drag and drop the <strong>SSIS Data Flow Task</strong> from the SSIS Toolbox. Double-click on the <em>Data Flow Task</em> to see the <em>Data Flow</em> designer.
<div id="attachment_11622" style="width: 472px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/08/Drag-and-Drop-SSIS-Data-Flow-Task-from-SSIS-Toolbox.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11622" class="size-full wp-image-11622" src="https://zappysys.com/blog/wp-content/uploads/2019/08/Drag-and-Drop-SSIS-Data-Flow-Task-from-SSIS-Toolbox.png" alt="" width="462" height="157" srcset="https://zappysys.com/blog/wp-content/uploads/2019/08/Drag-and-Drop-SSIS-Data-Flow-Task-from-SSIS-Toolbox.png 462w, https://zappysys.com/blog/wp-content/uploads/2019/08/Drag-and-Drop-SSIS-Data-Flow-Task-from-SSIS-Toolbox-300x102.png 300w" sizes="(max-width: 462px) 100vw, 462px" /></a><p id="caption-attachment-11622" 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 a <a title="SSIS API Source" href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source">JSON Source</a> onto the data flow designer surface, and double-click on it to edit it
<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>We use the method <strong>GET</strong></li>
<li>We enter the URL with the <strong>ID</strong> from the earlier response.</li>
<li>We can use the filter to get the object we need, and now we can check the data.</li>
<li>Preview the data, and you will see the Pet&#8217;s information
<div id="attachment_11725" style="width: 833px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-get-a-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11725" class="size-full wp-image-11725" src="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-get-a-pet.png" alt="" width="823" height="889" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-get-a-pet.png 823w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-get-a-pet-278x300.png 278w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-get-a-pet-768x830.png 768w" sizes="(max-width: 823px) 100vw, 823px" /></a><p id="caption-attachment-11725" class="wp-caption-text">SSIS &#8211; get a pet by ID</p></div></li>
</ol>
<h3>PUT request: Update an existing pet</h3>
<ol>
<li>We go to the updated pet example and run the example
<div id="attachment_11721" style="width: 1432px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-update-a-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11721" class="size-full wp-image-11721" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-update-a-pet.png" alt="" width="1422" height="662" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-update-a-pet.png 1422w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-update-a-pet-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-update-a-pet-1024x477.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-update-a-pet-768x358.png 768w" sizes="(max-width: 1422px) 100vw, 1422px" /></a><p id="caption-attachment-11721" class="wp-caption-text">Swagger &#8211; update a pet</p></div></li>
<li>Generate the CURL<br />
<pre class="crayon-plain-tag">curl -X 'PUT' \
  'https://petstore.swagger.io/v2/pet' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  &quot;id&quot;: 0,
  &quot;category&quot;: {
    &quot;id&quot;: 0,
    &quot;name&quot;: &quot;string&quot;
  },
  &quot;name&quot;: &quot;doggie2&quot;,
  &quot;photoUrls&quot;: [
    &quot;string&quot;
  ],
  &quot;tags&quot;: [
    {
      &quot;id&quot;: 0,
      &quot;name&quot;: &quot;string&quot;
    }
  ],
  &quot;status&quot;: &quot;available&quot;
}'</pre>
</li>
<li>Inside the JSON source, we configure the HTTP method to <strong>PUT.</strong></li>
<li>Change the url and the header.</li>
<li>Inside the Body we can change the values from the existing pet.</li>
<li>Test the connection and check the result.
<div id="attachment_11719" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-update-a-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11719" class="size-full wp-image-11719" src="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-update-a-pet.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-update-a-pet.png 828w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-update-a-pet-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-update-a-pet-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11719" class="wp-caption-text">SSIS &#8211; update a pet</p></div></li>
</ol>
<h3>DELETE request: Remove an existing pet</h3>
<ol>
<li>Now we will delete the pet using this example.
<div id="attachment_11722" style="width: 1424px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-delete-a-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11722" class="size-full wp-image-11722" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-delete-a-pet.png" alt="" width="1414" height="588" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-delete-a-pet.png 1414w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-delete-a-pet-300x125.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-delete-a-pet-1024x426.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-delete-a-pet-768x319.png 768w" sizes="(max-width: 1414px) 100vw, 1414px" /></a><p id="caption-attachment-11722" class="wp-caption-text">Swagger &#8211; delete a pet</p></div></li>
<li>Generate the CURL to delete the pet<br />
<pre class="crayon-plain-tag">curl -X 'DELETE' \
  'https://petstore.swagger.io/v2/pet/1234' \
  -H 'accept: application/json' \
  -H 'api_key: special-key'</pre>
</li>
<li>Inside the JSON source, configure the HTTP method to <strong>DELETE.</strong></li>
<li>Change the URL to include the pet&#8217;s ID.</li>
<li>Inside the header, we need to insert an API key.</li>
<li>Test the connection, and we will delete the pet.
<div id="attachment_11718" style="width: 838px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-delete-a-pet.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11718" class="size-full wp-image-11718" src="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-delete-a-pet.png" alt="" width="828" height="745" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-delete-a-pet.png 828w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-delete-a-pet-300x270.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/SSIS-delete-a-pet-768x691.png 768w" sizes="(max-width: 828px) 100vw, 828px" /></a><p id="caption-attachment-11718" class="wp-caption-text">aSSIS &#8211; delete a pet</p></div></li>
</ol>
<h3>Authentication method</h3>
<ol>
<li>Some APIs require authentication. You can configure authentication using an HTTP Connection Manager.</li>
<li>Enter the login URL if required.</li>
<li>Select the credential type (e.g., Basic – Username/Password).</li>
<li>Enter the credentials.</li>
<li>Click OK to save the configuration.</li>
<li>This connection can be reused across multiple REST API Tasks or JSON Sources.</li>
<li>For more details on <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">basic authentication, click here.</a> For <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">more details on the OAuth connection, click here</a>.
<div id="attachment_11726" style="width: 1430px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-SSIS-basic-authentication.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11726" class="wp-image-11726 size-full" src="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-SSIS-basic-authentication.png" alt="" width="1420" height="893" srcset="https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-SSIS-basic-authentication.png 1420w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-SSIS-basic-authentication-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-SSIS-basic-authentication-1024x644.png 1024w, https://zappysys.com/blog/wp-content/uploads/2026/02/Swagger-SSIS-basic-authentication-768x483.png 768w" sizes="(max-width: 1420px) 100vw, 1420px" /></a><p id="caption-attachment-11726" class="wp-caption-text">Swagger &#8211; SSIS basic authentication</p></div></li>
</ol>
<div class="mceTemp"></div>
<h2><a class="anchor" href="https://community.zappysys.com/t/ssis-tips-download-upload-files-from-azure-data-lake-storage-gen2-adls-v2/746#p-891-summary-9" name="p-891-summary-9" aria-label="Heading link"></a>Conclusion</h2>
<p>Integrating Swagger-documented APIs with ZappySys SSIS becomes significantly easier when using the generated <strong>cURL</strong> command as a reference. Swagger provides a clear and interactive way to understand API endpoints, request structures, headers, and payload formats, while cURL offers a direct, executable representation of the HTTP request.</p>
<p>By translating the cURL command into the REST API Task or JSON Source configuration, developers can confidently replicate API calls inside SSIS without guesswork. This approach ensures accuracy, reduces troubleshooting time, and provides a consistent workflow for handling GET, POST, PUT, DELETE operations, file uploads, and authentication scenarios.</p>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Download <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> today and see for yourself how easy it is to combine Swagger and ZappySys SSIS, enabling organizations to seamlessly integrate modern REST APIs into enterprise ETL processes and bridge the gap between cloud-based services and traditional SQL Server data platforms.</span></p>
<p><a class="anchor" href="https://community.zappysys.com/t/ssis-tips-download-upload-files-from-azure-data-lake-storage-gen2-adls-v2/746#p-891-still-need-help-10" name="p-891-still-need-help-10" aria-label="Heading link"></a><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>The post <a href="https://zappysys.com/blog/ssis-tutorial-how-to-connect-to-swagger/">SSIS tutorial: How to connect to Swagger</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>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 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>Get data from Google Search Console API in SSIS and ODBC Apps</title>
		<link>https://zappysys.com/blog/get-data-google-search-console-api-ssis-odbc-drivers/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 09 Oct 2019 20:22:28 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[oauth]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=8128</guid>

					<description><![CDATA[<p>Introduction In our previous few posts we saw how to call various google apis in SSIS.  In this post lets learn how to call Google Search Console API in SSIS or other ODBC Compatible Apps such as Power BI, Informatica, SSRS using API Drivers for ODBC About Google Search Console API (Google Webmaster API) If [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/get-data-google-search-console-api-ssis-odbc-drivers/">Get data from Google Search Console API in SSIS and ODBC Apps</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In our previous few posts we saw how to call various <a href="https://zappysys.com/blog/category/google-api/" target="_blank" rel="noopener">google apis</a> in SSIS.  In this post lets learn how to call Google Search Console API in SSIS or other ODBC Compatible Apps such as Power BI, Informatica, SSRS using <a href="https://zappysys.com/products/odbc-powerpack/">API Drivers for ODBC</a></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>About Google Search Console API (Google Webmaster API)</h2>
<p>If you are new to Google Search Console API (i.e. Webmaster API) then start <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/prereqs" target="_blank" rel="noopener">from this link</a>. You can also <a href="https://developers.google.com/apis-explorer/#p/webmasters/v3/" target="_blank" rel="noopener">check API Explorer</a> here to test API requests.</p>
<p>Search API can be called by supplying either <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/authorizing#APIKey" target="_blank" rel="noopener">API key</a> in URL  or <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/">use OAuth</a></p>
<p>Search Console V3 Covers following APIs (May add more in future)</p>
<div class="su-table su-table-alternate">
<table class="NYYWNC-h-b">
<tbody>
<tr>
<td><strong><span class="gwt-InlineLabel">API Name</span></strong></td>
<td><strong><span class="gwt-InlineLabel">Description</span></strong></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.searchanalytics.query</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Query your data with filters and parameters that you define. Returns zero or more rows grouped by the row keys that you define. You must define a date range of one or more days. When date is one of the group by values, any days without data are omitted from the result list. If you need to know which days have data, issue a broad date range query grouped by date for any metric, and see which day rows are returned.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.delete</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Deletes a sitemap from this site.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.get</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Retrieves information about a specific sitemap.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.list</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Lists the sitemaps-entries submitted for this site, or included in the sitemap index file (if sitemapIndex is specified in the request).</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sitemaps.submit</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Submits a sitemap for a site.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.add</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Adds a site to the set of the user&#8217;s sites in Search Console.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.delete</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Removes a site from the set of the user&#8217;s Search Console sites.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.get</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Retrieves information about specific site.</span></td>
</tr>
<tr>
<td class="NYYWNC-h-c"><span class="gwt-InlineLabel">webmasters.sites.list</span></td>
<td class="NYYWNC-h-a"><span class="gwt-InlineLabel">Lists the user&#8217;s Search Console sites.</span></td>
</tr>
</tbody>
</table>
</div>
<p><strong>Search Console API Call Example</strong></p>
<p>Here is simple example of Search Console API call. Below example returns all sites you added under your search console account.</p>
<p><strong>Request</strong></p><pre class="crayon-plain-tag">GET https://www.googleapis.com/webmasters/v3/sites?key={YOUR_API_KEY}</pre><p>
<strong>Response</strong></p><pre class="crayon-plain-tag">{
 "siteEntry": [
  {
   "siteUrl": "https://my-google-search-api-1.com/",
   "permissionLevel": "siteOwner"
  },
  {
   "siteUrl": "https://www.my-google-search-api-1.com/",
   "permissionLevel": "siteOwner"
  },
  {
   "siteUrl": "https://my-google-search-api-2.com/",
   "permissionLevel": "siteOwner"
  },
  {
   "siteUrl": "https://www.my-google-search-api-2.com/",
   "permissionLevel": "siteOwner"
  }
 ]
}</pre><p>
&nbsp;</p>
<h2>Step-By-Step &#8211; Call Search Console API in SSIS</h2>
<p>Now lets look at very simple API call to <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/sites/list" target="_blank" rel="noopener">list search console sites</a></p>
<ol>
<li>Open SSIS Package</li>
<li>Drag and drop ZS REST API Task from SSIS tool box
<div style="width: 565px" class="wp-caption alignnone"><img loading="lazy" decoding="async" class="size-full" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/rest-api-task/ssis-rest-api-web-service-task-drag.png" alt="Drag and Drop ZS REST API Task from SSIS Toolbox" width="555" height="199" /><p class="wp-caption-text">Drag and Drop ZS REST API Task from SSIS Toolbox</p></div></li>
<li>Now double click REST API Task and configure (Skip <strong>Step 5</strong> if you use <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/authorizing#APIKey" target="_blank" rel="noopener">API Key</a> instead of OAuth).</li>
<li>Enter API URL you like to call. For This example we will use simple URL as below<br />
<strong>OAuth based Authentication</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/</pre>
<strong>API Key based Authentication</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/?key={YOUR_API_KEY}</pre>
</li>
<li>If you want to use OAuth based credentials then perform the following steps
<ol>
<li>Select <strong>URL from Connection </strong></li>
<li>Click <strong>New ZS-OAUTH</strong> connection from Dropdown</li>
<li>On the OAuth UI select <strong>Google as Provider</strong></li>
<li>Enter Scopes as below<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/webmasters
https://www.googleapis.com/auth/webmasters.readonly</pre>
</li>
<li>Click Generate Token. When you get Login Prompt enter your Google Account information and <strong>click Accept</strong></li>
<li>Click OK to Save OAuth UI</li>
</ol>
</li>
<li>This is how it will look like if you use OAuth Connection
<div id="attachment_8131" style="width: 1037px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8131" class="size-full wp-image-8131" src="https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task.png" alt="Call Google Search Console API using SSIS REST API Task (OAuth Authentication)" width="1027" height="869" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task.png 1027w, https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task-300x254.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task-768x650.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/10/call-google-search-api-using-oauth-ssis-rest-api-task-1024x866.png 1024w" sizes="(max-width: 1027px) 100vw, 1027px" /></a><p id="caption-attachment-8131" class="wp-caption-text">Call Google Search Console API using SSIS REST API Task (OAuth Authentication)</p></div></li>
<li>Now click Test Request / Response to check if its working. You should get response like below</li>
</ol>
<p>&nbsp;</p>
<h2>Read from Search Console Analytics API (query)</h2>
<p>Now let&#8217;s look at how to <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/searchanalytics/query" target="_blank" rel="noopener">call Search Console Analytics API (i.e. query)</a> for Specified Site and extract data in tabular format using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZS JSON Source</a>. In below example we will obtain search Impression, clicks, position etc for specified site. We will aggregate this over date and country (dimensions).</p>
<p>In this section you will learn how to use JSON Source Adapter to extract data from JSON file (In this case its Web URL).</p>
<ol>
<li>Firstly, You need to <b>Download and Install</b> SSIS <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">ZappySys PowerPack.</a></li>
<li>Once you finished first step, Open Visual Studio and Create New SSIS Package Project.</li>
<li>Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the Data Flow designer surface.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source and configure like below
<ol>
<li>Enter URL as below. Notice two things, first we used <strong>&lt;&lt;somedata,FUN_URLENC&gt;&gt;</strong> <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">placeholder function</a> to encode <strong>:</strong> and <strong>//</strong> in the URL so it <a href="https://zappysys.zendesk.com/hc/en-us/articles/360012261713">become %2F %3A</a>. We use <pre class="crayon-plain-tag">--dont-escape--</pre>  suffix at the end.<br />
<strong>For OAuth based Credentials</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/&lt;&lt;https://mysite.com,FUN_URLENC&gt;&gt;/searchAnalytics/query--dont-escape--</pre>
<strong>For API Key based Credentials</strong><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/webmasters/v3/sites/&lt;&lt;https://mysite.com,FUN_URLENC&gt;&gt;/searchAnalytics/query/?key={YOUR_API_KEY}--dont-escape--</pre>
</li>
<li>Check Use Credentials and select OAuth connection (created earlier) (if you are using API key in URL then skip this step).</li>
<li>Select <strong>POST</strong> as HTTP Method</li>
<li>Enter Body for Query. Here are <a href="https://developers.google.com/webmaster-tools/search-console-api-original/v3/how-tos/search_analytics" target="_blank" rel="noopener">some examples</a> for various queries you can use. For our case we want to group by date and country so use below<br />
<pre class="crayon-plain-tag">{
"startDate": "2019-01-01",
"endDate": "2019-01-10",
"dimensions" : ["date","country"]
}</pre>
</li>
<li>Select <strong>Content Type</strong> as <pre class="crayon-plain-tag">application/json</pre>  from Content Type drop down.</li>
<li>Select Filter or enter as  <pre class="crayon-plain-tag">$.rows[*]</pre></li>
<li>Now go to Extract Multiple Arrays Tab and <strong>Check Array Flattening Option</strong> (on older version it was on the different Tab)</li>
</ol>
</li>
<li>Click Preview and you will see your Google Search Console API data as below.
<div id="attachment_8138" style="width: 914px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8138" class="size-full wp-image-8138" src="https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example.png" alt="Read from Google Search API Console (Analytics Query Endpoint) - JSON Source" width="904" height="827" srcset="https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example.png 904w, https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example-300x274.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/10/read-google-search-console-api-example-768x703.png 768w" sizes="(max-width: 904px) 100vw, 904px" /></a><p id="caption-attachment-8138" class="wp-caption-text">Read from Google Search API Console (Analytics Query Endpoint) &#8211; JSON Source</p></div></li>
</ol>
<h2>Loading Google Search Console API data into SQL Server / Other Target</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>
<p>&nbsp;</p>
<h2>Import Google Search Console API data in Reporting / other ETL tools (ODBC Usecase)</h2>
<p>There will be a time when you dont want to use SSIS connector like mentioned in previous sections but extract Google Search API data in Reporting Tools / Other ETL Platform.  Good news is you can use <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys ODBC Driver for JSON / REST API</a> in ODBC Apps. See few popular ODBC Apps below.</p>
<ul>
<li>Power BI connection for Google Search Console API</li>
<li>Excel connection for Google Search Console API</li>
<li>Informatica connection for Google Search Console API</li>
<li>MS Access connection for Google Search Console API</li>
<li>C# , PowerShell, VB.net connection for Google Search Console API</li>
</ul>
<div id="attachment_6416" style="width: 766px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="size-full wp-image-6416" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="Preview / Generate Query in JSON Driver / XML Driver" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Preview / Generate Query in JSON Driver / XML Driver</p></div>
<h2></h2>
<h2>Load Google Search Console API in SQL Server without any ETL</h2>
<p>Now let&#8217;s look at even more interesting integration scenario. If you have SQL Server and like to load Google Search Console API without any ETL then you can use <a href="https://zappysys.com/products/odbc-powerpack/data-gateway/" target="_blank" rel="noopener">Data Gateway</a></p>
<p>Read this article to learn how to <a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">load REST API in SQL Server</a> without any coding (Use just T-SQL) .</p>
<p>You can write query like below to load data inside SQL Table.</p><pre class="crayon-plain-tag">SELECT * FROM OPENQUERY([MY_LINKED_SERVER]
, 'SELECT * FROM $
WITH(
	 Src=''https://www.googleapis.com/webmasters/v3/sites/&lt;&lt;https://mysite.com,FUN_URLENC&gt;&gt;/searchAnalytics/query/?key={YOUR_API_KEY}--dont-escape--''
	,Filter=''$.rows[*]''
	,RequestData=''{
"startDate": "2019-01-01",
"endDate": "2019-01-10",
"dimensions" : ["date","country"]
}''
	,RequestContentTypeCode=''ApplicationJson''
	,Header=''cache-control: no-cache || Accept: */*''
	,RequestMethod=''POST''
	,EnableArrayFlattening=''True''
)')</pre><p>
<div id="attachment_5293" style="width: 899px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5293" class="size-full wp-image-5293" src="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png" alt="SSMS Output - Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)" width="889" height="481" srcset="https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway.png 889w, https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway-300x162.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/11/query-rest-api-sql-server-linked-server-openquery-zappysys-data-gateway-768x416.png 768w" sizes="(max-width: 889px) 100vw, 889px" /></a><p id="caption-attachment-5293" class="wp-caption-text">SSMS Output &#8211; Query REST API via Linked Server OPENQUERY statement (Connect to ZappySys Data Gateway)</p></div>
<h2>Conclusion</h2>
<p>So in this post we saw how easy it is to achieve total REST API integration in SSIS using JSON Connector. We also saw how to use ODBC Drivers to query REST API data inside Apps like Excel, MS Access, Informatica and other ODBC Apps using ODBC JSON / REST API driver. If you are SSIS User download <a href="https://zappysys.com/products/ssis-powerpack/">SSIS PowerPack and try for FREE</a> and if you don&#8217;t have SSIS in house and want to try more generic approach then <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">Download ODBC PowerPack Drivers for FREE Trial</a>.</p>
<p>The post <a href="https://zappysys.com/blog/get-data-google-search-console-api-ssis-odbc-drivers/">Get data from Google Search Console API in SSIS and ODBC Apps</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to refresh Power BI dataset with REST API using SSIS</title>
		<link>https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Wed, 22 May 2019 16:06:40 +0000</pubDate>
				<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS Connection Manager]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[SSIS Tasks]]></category>
		<category><![CDATA[dataset]]></category>
		<category><![CDATA[power bi]]></category>
		<category><![CDATA[refresh]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6963</guid>

					<description><![CDATA[<p>Introduction In this article, you will learn how to refresh a Power BI dataset with Power BI REST API using SSIS and ZappySys SSIS PowerPack. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Each Power BI report contains a dataset, which can be refreshed [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/">How to refresh Power BI dataset with REST API using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p style="text-align: justify;"><img loading="lazy" decoding="async" class="alignleft wp-image-3951" src="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png" alt="Power BI Integration" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310-300x300.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/06/power-bi-logo-310x310.png 310w" sizes="(max-width: 100px) 100vw, 100px" />In this article, you will learn how to refresh a <a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">Power BI</a> dataset with <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a> using SSIS and <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a>. Power BI is a Microsoft reporting product that can get data from virtually any source and display it nicely in a report or a dashboard. Each Power BI report contains a dataset, which can be refreshed to show relevant data in the report. Power BI also has a <em>Scheduled refresh</em> capability, in case you want to refresh a dataset periodically. However, you are limited to only 8 specific times per day you can refresh a dataset (as of May 23, 2019). In the Power BI Premium license you can do it 48 times per day. But what if you need to refresh it more frequently? Or if you desire to refresh it at a non-predefined time; which is not known in advance? E.g. after an ETL process has finished? Here Power BI REST API comes into rescue and lets you refresh a dataset on demand.</p>
<p>Here are a few use cases when you may want to refresh a dataset from a SSIS package, using Power BI REST API:</p>
<ul>
<li>The need to refresh a dataset more often than Power BI allows.</li>
<li>The requirement to refresh a dataset just after some process is finished; e.g. after an ETL process.</li>
<li>The ability to have absolute control <em>when</em> to refresh <em>multiple</em> datasets. Sometimes, refreshing multiple huge datasets at once could cause memory problems in the Power BI service. So, having an orchestrated refresh would solve this problem.</li>
</ul>
<p>We will use these ZappySys SSIS PowerPack connectors/connections in this article:</p>
<div class="content_block" id="custom_post_widget-6991"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/oauth-connection/ssis-oauth-connection-manager.png" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/onlinehelp/ssis-powerpack/index.htm#page=ssis-oauth-connection-manager.htm" target="_blank" rel="noopener">OAuth Connection Manager</a></div>
</div></div>
<div class="content_block" id="custom_post_widget-6984"><div style="display: table-row; background: #f7f7f7;">
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc;"><img loading="lazy" decoding="async" style="vertical-align: middle; width: 50px; height: 50px; max-width: 50px;" src="//zappysys.com/images/SSIS-PowerPack/ssis-rest-api-web-service-task.png" alt="Web API Destination" width="50" height="50" /></div>
<div style="display: table-cell; padding: 1em; border: 1px solid #ccc; border-left: none; width: 100%;"><a href="//zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a></div>
</div></div>
<p>Let&#8217;s begin!</p>
<h2>Prerequisites</h2>
<ol>
<li>You have a Power BI account and you have basic Power BI skills.</li>
<li>An uploaded Power BI report to Power BI service.</li>
<li>A <a href="https://azure.microsoft.com/" data-linktype="external">Microsoft Azure</a> subscription (there is a <a href="https://azure.microsoft.com/en-us/free/" target="_blank" rel="noopener">free</a> option with a 200 USD credit).</li>
<li><a href="https://azure.microsoft.com/en-us/services/active-directory/" target="_blank" rel="noopener">Azure Active Directory</a> set up.</li>
<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="SQL Server Data Tools">SSDT</abbr> or <abbr title="Business Intelligence Development Studio">BIDS</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><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>
</ol>
<h2>Getting started</h2>
<p>Suppose you have a simple report and you want to refresh its dataset using Power BI REST API and SSIS. So far, the dataset has not been refreshed at all:</p>
<div id="attachment_7033" style="width: 573px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7033" class="wp-image-7033 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828.png" alt="Preparing to refresh Power BI dataset using SSIS and Power BI REST API." width="563" height="235" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828.png 563w, https://zappysys.com/blog/wp-content/uploads/2019/05/refresh-power-bi-dataset-using-rest-api-and-ssis-e1558968134828-300x125.png 300w" sizes="(max-width: 563px) 100vw, 563px" /><p id="caption-attachment-7033" class="wp-caption-text">Preparing to refresh the Power BI dataset using SSIS and Power BI REST API.</p></div>
<p>To start, create an SSIS package and follow the steps below to accomplish the goal.</p>
<h2>Step By Step &#8211; How to refresh a Power BI dataset with REST API using SSIS</h2>
<h3>Create an OAuth application</h3>
<div class="content_block" id="custom_post_widget-7035"><h4>Create an Azure Active Directory OAuth application</h4>
<ol>
 	<li>Firstly, go to <a href="https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredAppsPreview" target="_blank" rel="noopener">Azure Active Directory, click App Registrations</a>, and then register a new application:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-10621" src="https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider.png" alt="" width="646" height="802" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider.png 646w, https://zappysys.com/blog/wp-content/uploads/2019/05/20-register-azure-active-directory-application-to-use-in-ssis-or-odbc-wider-242x300.png 242w" sizes="(max-width: 646px) 100vw, 646px" />Select option <em>Web</em> and enter this URL into the <em>Redirect URI</em> field:
<code>https://login.microsoftonline.com/common/oauth2/nativeclient</code></li>
 	<li>Once created, copy/paste the <em>Application (client) ID</em> into a notepad, we will need it later:
<img loading="lazy" decoding="async" class="alignnone wp-image-7041 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287.png" alt="" width="691" height="164" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287.png 691w, https://zappysys.com/blog/wp-content/uploads/2019/05/21-save-client-id-of-azure-active-directory-application-to-use-from-ssis-or-odbc-e1696948772287-300x71.png 300w" sizes="(max-width: 691px) 100vw, 691px" /></li>
 	<li>Next, go to <em>Certificates &amp; secrets</em> and create a new client secret. Copy a new client secret, we will need it later:
<img loading="lazy" decoding="async" class="alignnone wp-image-7038 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459.png" alt="" width="499" height="460" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459.png 499w, https://zappysys.com/blog/wp-content/uploads/2019/05/40-create-a-new-client-secret-in-azure-active-directory-oauth-application-to-use-from-ssis-or-odbc-e1696949525459-300x277.png 300w" sizes="(max-width: 499px) 100vw, 499px" /></li>
 	<li>Then go to <i>Overview </i>and hit <em>Endpoints. </em>Proceed by copying the <em>Authorization</em> and <em>Token</em> URLs and paste them into a notepad; we will use them later:
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-10616" src="https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2.png" alt="" width="646" height="621" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2.png 646w, https://zappysys.com/blog/wp-content/uploads/2019/05/90-copy-azure-active-directory-oauth-application-authorization-and-token-endpoints-2-300x288.png 300w" sizes="(max-width: 646px) 100vw, 646px" /></li>
</ol></div>
<h3>Create OAuth Connection Manager in SSIS package</h3>
<ol>
<li>Drag and drop <em>REST API Task</em> from SSIS Toolbox, double click, select <strong>Url from connection,</strong> and then select <strong>&lt;New ZS-OAUTH Connection&gt;</strong> item:
<div id="attachment_7096" style="width: 604px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7096" class="wp-image-7096 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109.png" alt="Creating OAuth Connection Manager to connect to Power BI OAuth Application from SSIS." width="594" height="399" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109.png 594w, https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109-300x202.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/110-create-ssis-oauth-connection-for-powerbi-rest-api-application-1-e1559316589109-272x182.png 272w" sizes="(max-width: 594px) 100vw, 594px" /><p id="caption-attachment-7096" class="wp-caption-text">Creating OAuth Connection Manager to connect to Power BI OAuth Application from SSIS.</p></div></li>
<li>Input <strong>Client ID</strong> from <em>Step 2</em> when we were creating an Azure Active Directory OAuth Application.
<div class="mceTemp"></div>
<div id="attachment_10630" style="width: 652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10630" class="wp-image-10630 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png" alt="" width="642" height="652" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png 642w, https://zappysys.com/blog/wp-content/uploads/2019/05/120-configure-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1-295x300.png 295w" sizes="(max-width: 642px) 100vw, 642px" /><p id="caption-attachment-10630" class="wp-caption-text">Configuring OAuth Connection Manager to authenticate to Power BI OAuth Application using SSIS.</p></div></li>
<li>Then proceed and input the <em>Client Secret</em> from <em style="font-style: italic;">Step 3, </em><em>Create an Azure Active Directory OAuth application</em> section.</li>
<li>Please go on, and fill in <em>Authorization Url </em>and <em>Access Token Url </em>properties with values we copied in <em>Step 4</em><em style="font-style: italic;">, </em><em>Create an Azure Active Directory OAuth application</em> section.</li>
<li>In <em>Scopes / Permissions</em> field input these scopes:<br />
<code>https://analysis.windows.net/powerbi/api/Dataset.ReadWrite.All<br />
offline_access</code></li>
<li>Then go to the <em>Advanced</em> tab and in the <em>Callback/Return Url</em> field input this value:<br />
<code>https://login.microsoftonline.com/common/oauth2/nativeclient</code></p>
<div id="attachment_10631" style="width: 652px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10631" class="wp-image-10631 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png" alt="" width="642" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1.png 642w, https://zappysys.com/blog/wp-content/uploads/2019/05/130-configure-redirect-url-for-ssis-oauth-connection-manager-for-powerbi-rest-api-application-1-300x179.png 300w" sizes="(max-width: 642px) 100vw, 642px" /><p id="caption-attachment-10631" class="wp-caption-text">Setting Callback/Return Url (Redirect URI) in OAuth Connection Manager to authenticate to Power BI OAuth Application using SSIS.</p></div></li>
<li>Then go back to the tab <em>General </em>and click the <em>Generate Token</em> button.</li>
<li>Once asked for credentials, log in with your organization user; this will generate <em>Refresh</em> and <em>Access</em> tokens.</li>
</ol>
<h3>Retrieve the ID of the Power BI dataset you want to refresh</h3>
<ol>
<li>Go to <a href="https://app.powerbi.com/groups/me/settings/datasets" target="_blank" rel="noopener">Power BI datasets</a>.</li>
<li>Then click on <strong>Datasets</strong>.</li>
<li>Proceed and click the dataset you want to refresh.</li>
<li>Finally, copy the ID of the dataset from the URL, we will use it in the next section.</li>
</ol>
<div id="attachment_7114" style="width: 723px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7114" class="wp-image-7114 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796.png" alt="Getting Power BI dataset ID to refresh it in an HTTP request to Power BI REST API." width="713" height="396" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796.png 713w, https://zappysys.com/blog/wp-content/uploads/2019/05/140-get-the-id-of-the-dataset-in-power-bi-to-refresh-it-using-rest-api-and-ssis-e1559663902796-300x167.png 300w" sizes="(max-width: 713px) 100vw, 713px" /><p id="caption-attachment-7114" class="wp-caption-text">Getting Power BI dataset ID to refresh it in an HTTP request to Power BI REST API.</p></div>
<h3>Configure REST API Task to refresh a Power BI dataset</h3>
<p>We configured OAuth Connection Manager and retrieved the ID of the dataset we want to refresh, now it&#8217;s time to configure REST API Task and refresh the dataset. So do the following:</p>
<ol>
<li>Go to the <strong>SSIS package</strong> and open the <strong>REST API Task</strong> for configuration.</li>
<li>Input <em>URL</em> in such a format:<br />
<code><strong>https://api.powerbi.com/v1.0/myorg/datasets/DATASET-ID/refreshes</strong></code> Replace <em>DATASET-ID</em> with an actual ID of the dataset. E.g.:<br />
<code>https://api.powerbi.com/v1.0/myorg/datasets/a38c78fc-8c87-45e3-b961-6dcd3ac1eada/refreshes</code> <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>: If your dataset resides in a Workspace, use this format instead:<br />
<code><strong>https://api.powerbi.com/v1.0/WORKSPACE-ID/datasets/DATASET-ID/refreshes</strong></code></div></div></li>
<li>Then set <strong>POST</strong> as <em>HTTP Request Method.</em></li>
<li>In the <em>Body</em> field, input this JSON:<br />
<code><strong>{ "notifyOption": "MailOnFailure" }</strong></code></li>
<li>Press the <em>Test Request/Response</em> button to test the request and refresh the dataset at the same time.</li>
</ol>
<div id="attachment_7117" style="width: 671px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7117" class="wp-image-7117 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis.png" alt="Configuring REST API Task to refresh Power BI dataset using Power BI REST API and SSIS." width="661" height="610" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis.png 661w, https://zappysys.com/blog/wp-content/uploads/2019/05/150-configure-REST-API-Task-to-refresh-power-bi-dataset-using-rest-api-and-ssis-300x277.png 300w" sizes="(max-width: 661px) 100vw, 661px" /><p id="caption-attachment-7117" class="wp-caption-text">Configuring a REST API Task to refresh a Power BI dataset using Power BI REST API and SSIS.</p></div>
<h3>Run the package</h3>
<p>Hit <strong>F5</strong> and execute the package:</p>
<div id="attachment_7123" style="width: 297px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7123" class="wp-image-7123 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/160-run-SSIS-package-to-refresh-power-bi-dataset-rest-api.png" alt="Executing SSIS package and refreshing Power BI dataset." width="287" height="147" /><p id="caption-attachment-7123" class="wp-caption-text">Executing SSIS package and refreshing Power BI dataset.</p></div>
<h2>The Results</h2>
<p>Now it&#8217;s time to check the results and see if the dataset was refreshed successfully:</p>
<ol style="margin-left: 0;">
<li>Again, go to <a href="https://app.powerbi.com/groups/me/settings/datasets" target="_blank" rel="noopener">Power BI datasets</a>.</li>
<li>Then click on <strong>Datasets</strong>.</li>
<li>Click the dataset you refreshed.</li>
<li>Then click &#8220;Refresh history&#8221; to check the refresh history. We expect two manual refreshes to be there.</li>
</ol>
<div id="attachment_7124" style="width: 667px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7124" class="wp-image-7124 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api.png" alt="Results: Successful Power BI dataset refresh using Power BI REST API and SSIS." width="657" height="234" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api.png 657w, https://zappysys.com/blog/wp-content/uploads/2019/05/170-checking-the-result-of-refreshing-power-bi-dataset-using-ssis-and-rest-api-300x107.png 300w" sizes="(max-width: 657px) 100vw, 657px" /><p id="caption-attachment-7124" class="wp-caption-text">Results: Successful Power BI dataset refresh using Power BI REST API and SSIS.</p></div>
<div class="content_block" id="custom_post_widget-6976"><h2>Debugging HTTP requests</h2>
<p style="text-align: justify;">A common thing you have to do when working with HTTP requests is to debug those requests; e.g. to check what headers, body or URL was passed. <span id="Debug_Web_API_call_using_Fiddler"></span>To test how things look behind the scenes we strongly suggest to use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> - a popular web debugging tool.</p>
<p style="text-align: justify;">Inside it, you can double-click the URL entry (Right side) to see Request and Response Panels. The top panel is Request (URL, Headers, Body) and Bottom Panel is Response. For https:// (secure URL) make sure you enable HTTPS option in Fiddler (Tools &gt; Options &gt; HTTPS &gt; Check Decrypt https request):</p>

<div id="attachment_2344" class="wp-caption alignnone">

<a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignnone wp-image-2344 size-full" style="border: 0px; max-width: 100%; height: auto; box-shadow: rgba(0, 0, 0, 0.176) 0px 1px 2px;" src="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png" alt="Debugging Web API call using Fiddler in SSIS" width="1287" height="564" data-attachment-id="2344" data-permalink="https://zappysys.com/blog/pass-authorization-header-redirected-location/ssis-rest-api-call-debug-via-fiddler/#main" data-orig-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=1287%2C564&amp;ssl=1" data-orig-size="1287,564" data-comments-opened="0" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ssis-rest-api-call-debug-via-fiddler" data-image-description="&lt;p&gt;Debugging Web API call using Fiddler in SSIS&lt;/p&gt; " data-medium-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=300%2C131&amp;ssl=1" data-large-file="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png?fit=720%2C316&amp;ssl=1" srcset="https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler.png 1287w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-300x131.png 300w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-768x337.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/05/ssis-rest-api-call-debug-via-fiddler-1024x449.png 1024w" sizes="(max-width: 1287px) 100vw, 1287px" /></a>

</div></div>
<h2><span id="Deployment_to_Production">Deployment to Production</span></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>Conclusion</h2>
<p style="text-align: justify;">You learned how to refresh a Power BI dataset with REST API using SSIS. To accomplish the goal, firstly, we created the Azure Active Directory application and configured OAuth Connection Manager based on it. Then we retrieved the Power BI dataset ID and used it in the ZappySys SSIS PowerPack connector REST API Task. Finally, using the same REST API Task we made the HTTP request to Power BI REST API &#8220;<em>refreshes&#8221;</em> method and successfully refreshed the dataset. If you need to make a call to another <a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">Power BI REST API</a> method, then just configure the REST API Task according to the documentation (for getting data use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a> instead). Finally, if you make many requests to the Power BI REST API service, make sure you check its <a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">limitations</a>.</p>
<h2>References</h2>
<p><a href="https://powerbi.microsoft.com/en-us/" target="_blank" rel="noopener">https://powerbi.microsoft.com/en-us/</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/refreshdataset</a></p>
<p><a href="https://docs.microsoft.com/en-us/rest/api/power-bi/" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/rest/api/power-bi/</a></p>
<p><a href="https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/power-bi/developer/api-rest-api-limitations</a></p>
<p>The post <a href="https://zappysys.com/blog/refresh-power-bi-dataset-rest-api-using-ssis/">How to refresh Power BI dataset with REST API using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to read YouTube API data in SSIS (Videos, Channels, Playlists)</title>
		<link>https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Mon, 06 May 2019 18:06:07 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS CSV Generator Transform]]></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 REST API Task]]></category>
		<category><![CDATA[SSIS WEB API Destination]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[youtube]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6894</guid>

					<description><![CDATA[<p>Introduction In last few articles we saw how to read data from various Google Services. In this article we will see how to read YouTube API data in SSIS. This blog mainly focus on SSIS approach but steps mentioned to call Google APIs can be useful for any developer regardless which programming language or toolset [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/">How to read YouTube API data in SSIS (Videos, Channels, Playlists)</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/youtube-connector/">API Connector for YouTube</a> which makes it much simpler to <strong>Read/Write YouTube Data in SSIS</strong> compared to the steps listed in this article. You can still use steps from this article but if you are new to API or want to avoid learning curve with API then use newer approach.</p>
<p>Please visit <a href="https://zappysys.com/api/integration-hub/">this page to see all</a> Pre-Configured ready to use API connectors which you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source</a> / <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination</a> OR <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, Informatica).</p>
</div></div>
<a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png"><img loading="lazy" decoding="async" class=" wp-image-6904 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png" alt="" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo.png 400w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-logo-300x300.png 300w" sizes="(max-width: 100px) 100vw, 100px" /></a>In last <a href="https://zappysys.com/blog/category/google-api/">few articles</a> we saw how to read data from various Google Services. In this article we will see how to read YouTube API data in SSIS. This blog mainly focus on SSIS approach but steps mentioned to call Google APIs can be useful for any developer regardless which programming language or toolset you use.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<div class="content_block" id="custom_post_widget-2523"><h2><span id="Prerequisites">Prerequisites</span></h2>
Before we perform the steps listed in this article, you will need to make sure the following prerequisites are met:
<ol style="margin-left: 1.5em;">
 	<li><abbr title="SQL Server Integration Services">SSIS</abbr> designer installed. Sometimes it is referred to as <abbr title="Business Intelligence Development Studio">BIDS</abbr> or <abbr title="SQL Server Data Tools">SSDT</abbr> (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from the Microsoft site</a>).</li>
 	<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
 	<li>Make sure <span style="text-decoration: underline;"><a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">ZappySys SSIS PowerPack</a></span> is installed (<a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">download it</a>, if you haven't already).</li>
 	<li>(<em>Optional step</em>)<em>.</em> <a href="https://zappysys.zendesk.com/hc/en-us/articles/360035974593" target="_blank" rel="noopener">Read this article</a>, if you are planning to deploy packages to a server and schedule their execution later.</li>
</ol></div>
<h2>Connect to YouTube API in SSIS (OAuth Connection)</h2>
<p>Very first step to call any Google API is to create an API project for Google Service and then enable APIs you like to call in Console. In our case we need to enable YouTube API.</p>
<p><a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">Check this article</a> to learn how to create API Project and obtain Client ID and Client Secret to connect to YouTube API. For ease of use use Default Application provided by ZappySys but we still recommend using your own Custom Application  on OAuth Connection.</p>
<p>Before we try our first YouTube API example, we recommend you to get familiar with <a href="https://developers.google.com/youtube/v3/docs/" target="_blank" rel="noopener">YouTube API here</a>. Once you done with above steps you can perform the following steps to call YouTube API in SSIS.</p>
<ol>
<li>Open existing SSIS Project or Create new One in Visual Studio (i.e. SSDT)</li>
<li>Create a new SSIS Package. Right click in the Connection Manager Panel and click <strong>&#8220;New Connection&#8230;&#8221;</strong>.<br />
<img decoding="async" class="figureimage" title="SSIS Create New Connection" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/ssis-new-connection.png" alt="SSIS Create New Connection" /></li>
<li>When Dialog box opens select <strong>ZS-OAUTH</strong> connection type.
<div id="attachment_4724" style="width: 681px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-4724" class="size-full wp-image-4724" src="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png" alt="SSIS Connection Maangers List: Select O-AUTH Connection Manager" width="671" height="549" srcset="https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager.png 671w, https://zappysys.com/blog/wp-content/uploads/2018/08/ssis-connection-managers-list-select-zs-oauth-connection-manager-300x245.png 300w" sizes="(max-width: 671px) 100vw, 671px" /></a><p id="caption-attachment-4724" class="wp-caption-text">SSIS Connection Managers List: Select O-AUTH Connection Manager</p></div></li>
<li>Once OAuth UI opens, Configure Google connection like below.
<ol>
<li>Select Service Type as <strong>Google</strong></li>
<li>You can select Default App for ease of use or Select Custom Application (Enter Client Id and Secret Obtained using <a href="https://zappysys.com/blog/register-google-oauth-application-get-clientid-clientsecret/" target="_blank" rel="noopener">these steps</a> )</li>
<li>In the Scope Enter below &#8211; One scope per line for calling correct YouTube API. Refer to <a href="https://developers.google.com/youtube/v3/docs/" target="_blank" rel="noopener">YouTube API documentation</a> incase you need extra permissions. For read only operation we just need below scopes. Last scope is only needed if you need to use <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">YouTube Analytics Reports</a><br />
<pre class="crayon-plain-tag">https://www.googleapis.com/auth/youtube
https://www.googleapis.com/auth/youtube.readonly
https://www.googleapis.com/auth/yt-analytics.readonly</pre>
</li>
</ol>
</li>
<li>Click Generate Token to obtain Refresh Token (You may see Login Prompt, and then Grant Permission Confirmation Screen)
<div id="attachment_6855" style="width: 930px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6855" class="size-full wp-image-6855" src="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png" alt="Connect to Google API using OAuth 2.0 (Youtube API Example)" width="920" height="1032" srcset="https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token.png 920w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-267x300.png 267w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-768x861.png 768w, https://zappysys.com/blog/wp-content/uploads/2016/04/ssis-oauth-connection-manager-generate-access-token-913x1024.png 913w" sizes="(max-width: 920px) 100vw, 920px" /></a><p id="caption-attachment-6855" class="wp-caption-text">Connect to Google API using OAuth 2.0 (YouTube API Example)</p></div></li>
<li>Click OK to save UI.</li>
</ol>
<h2>Call YouTube REST API Example</h2>
<p>Now lets look at how to call YouTube API <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a> this task is more suitable to call GET, POST, DELETE, PUT requests without parsing data in Rows and Columns. If you need to parse data and load into Database table then see next section (Use JSON Source)</p>
<ol>
<li>From SSIS Toolbox look for items starting with “ZS”. Drag and Drop <b>[ZS Rest API Task]</b> to Designer Surface.<br />
<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 it to configure like below.
<ol>
<li>Select URL From Connection option</li>
<li>Select OAuth connection created in previous section.</li>
<li>Enter URL like below (For example <a href="https://developers.google.com/youtube/v3/docs/playlists/list" target="_blank" rel="noopener">get all playlists</a>). Replace xxxxxxxxxxx with your own channel ID (Its usually found in URL when you visit Youtube Channel Homepage)<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;channelId=xxxxxxxxxxxxx</pre>
</li>
<li>Click Test Request Button</li>
</ol>
</li>
<li>Here is how it looks like
<div id="attachment_6896" style="width: 854px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6896" class="size-full wp-image-6896" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png" alt="Call Youtube API in SSIS Example (Dynamic URL)" width="844" height="640" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url.png 844w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url-300x227.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-call-youtube-api-with-dynamic-url-768x582.png 768w" sizes="(max-width: 844px) 100vw, 844px" /></a><p id="caption-attachment-6896" class="wp-caption-text">Call Youtube API in SSIS Example (Dynamic URL)</p></div></li>
</ol>
<p>That&#8217;s it we have successfully configured Connection for YouTube API in SSIS. In the next section we will see how to use this connection and read various data from YouTube API.</p>
<h2>Read YouTube Playlists in SSIS</h2>
<p>Once we done creating OAuth Connection Manager we can move forward to read YouTube data inside Data Flow.</p>
<p>Configure SSIS JSON / REST API Source</p>
<ol>
<li>Now, Drag and Drop SSIS <b>Data Flow Task</b> from SSIS Toolbox.<br />
<img decoding="async" class="figureimage" title="SSIS Data Flow Task - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/drag-and-drop-data-flow-task.png" alt="SSIS Data Flow Task - Drag and Drop" /></li>
<li>Double click on the Data Flow task to see Data Flow designer surface.</li>
<li>From the SSIS toolbox drag and drop JSON Source on the dataflow designer surface.<br />
<img decoding="async" class="figureimage" title="SSIS JSON Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/json-source/ssis-json-source-adapter-drag.png" alt="SSIS JSON Source - Drag and Drop" /></li>
<li>Double click JSON Source and enter URL as below (Use variable or Hardcode Channel Id). maxResults controls how many rows you want to get in each response. Rep<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;maxResults=50&amp;channelId={{User::varChannelId}}
--OR-- 
https://www.googleapis.com/youtube/v3/playlists?part=snippet,id&amp;maxResults=50&amp;channelId=xxxxxxxxxxxxxxxxxxxxxx</pre>
</li>
<li>Check Use Credentials and select existing OAuth connection or Create New one</li>
<li>Select Array Filter (Items node) or type <pre class="crayon-plain-tag">$.items[*]</pre>  as below.
<div id="attachment_6900" style="width: 857px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6900" class="size-full wp-image-6900" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png" alt="Get Playlists for YouTube Channel" width="847" height="738" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists.png 847w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-get-playlists-768x669.png 768w" sizes="(max-width: 847px) 100vw, 847px" /></a><p id="caption-attachment-6900" class="wp-caption-text">Get Playlists for YouTube Channel</p></div></li>
<li>That&#8217;s it you can now Click <strong>Preview</strong> to see sample data. In the next section we will configure Pagination to read all records if you have more than 100 rows.</li>
</ol>
<h3>Configure YouTube REST API Pagination</h3>
<p>Most REST APIs dont return data in one big response. So you have to make sure you implement looping / pagination to read more records. Luckily ZappySys supports <a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/">many different Pagination Settings</a>. Here is how to configure YouTube REST API Pagination.</p>
<ol>
<li>Go to Pagination Tab found on JSON Source and select following 3 settings</li>
<li>Select Pagination Mode as <pre class="crayon-plain-tag">Response Attribute Mode</pre></li>
<li>Enter Next Link as <pre class="crayon-plain-tag">$.nextPageToken</pre></li>
<li>Enter Suffix for Next URL as <pre class="crayon-plain-tag">&amp;pageToken=&lt;%nextlink%&gt;</pre></li>
</ol>
<div id="attachment_6899" style="width: 555px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6899" class="size-full wp-image-6899" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png" alt="YouTube REST API Pagination Settings" width="545" height="246" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination.png 545w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-rest-api-pagination-300x135.png 300w" sizes="(max-width: 545px) 100vw, 545px" /></a><p id="caption-attachment-6899" class="wp-caption-text">YouTube REST API Pagination Settings</p></div>
<h2>Read YouTube Playlist Videos in SSIS</h2>
<p>So in previous section we saw simple API call to read all playlists from YouTube. Now lets see how to get information about <a href="https://developers.google.com/youtube/v3/docs/playlistItems/list" target="_blank" rel="noopener">Playlist Videos</a>.</p>
<p>For that everything should remain same as previous section except change URL as below. Where xxxxxxxxxxxxxxxxxxxxx is your Playlist ID obtained from Previous Call.</p><pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/playlistItems?part=snippet,id&amp;maxResults=50&amp;playlistId=xxxxxxxxxxxxxxxxxxxxx</pre><p>
<h2>Get all Videos for YouTube Channel</h2>
<p>If you want to get all video name and ID for specific channel then use below URL. Click here to <a href="https://developers.google.com/youtube/v3/docs/search/list" target="_blank" rel="noopener">read more</a>. Replace xxxxxxxxxxxxxxxxxxx with your Channel ID.</p><pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/search?channelId=xxxxxxxxxxxxxxxxxxx&amp;part=snippet,id&amp;order=date&amp;maxResults=50</pre><p>
&nbsp;</p>
<h2>Read YouTube Video Views, Likes, Dislikes (Extended Videos)</h2>
<p>Another common request from YouTube API is get Video Information such as Views, Likes, Dislikes, Comment Count etc. For that you can <a href="https://developers.google.com/youtube/v3/docs/videos/list" target="_blank" rel="noopener">use this api</a> . However the issue is this endpoint requires you to pass Comma separated Ids of Video. You can only pass 25 Ids in one requests so if you have 200 videos for which you need to get information then you have to make 8 requests (25 Ids in each Request). In below screenshot you can see we used <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler to debug web requests</a>.</p>
<p>So here is how high level process to fetch extended information for all Videos in your channel. Full <a href="https://zappysys.com/blog/wp-content/uploads/2019/05/Google_Youtube_API_Demo.zip">SSIS Package is attached here (SSIS 2012 Format)</a>.</p>
<ol>
<li>Get all videos for your channel by calling (Assuming you will paginate in below request.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/search?channelId=xxxxxxxxxxxxxxxxxxx&amp;part=snippet,id&amp;order=date&amp;maxResults=50</pre>
</li>
<li>Build Video Id groups for 25 Ids from above result and submit requests. For example if above request returns 200 Videos then your request to fetch extended information may look like below.<br />
<pre class="crayon-plain-tag">https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID1,ID2,ID3........ID25
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID26,ID27,ID28........ID50
........
........
https://www.googleapis.com/youtube/v3/videos?part=snippet,contentDetails,statistics&amp;id=ID176,ID177,ID178........ID200</pre>
</li>
<li>Parse response coming from each Request Above&#8230;. Each Response will give you details about 25 videos you requesting.</li>
</ol>
<p>Here is the flow of our complete data flow to read extended information for all videos. You can read extended information one by one too but it wont be good idea if you have many videos.</p>
<p>We have used Following Components to achieve Bulk Mode</p>
<ul>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON Source (REST API Source)</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-csv-parser-transform/" target="_blank" rel="noopener">CSV Parser Transform</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/" target="_blank" rel="noopener">Web API Destination</a></li>
<li><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-parser-transform/" target="_blank" rel="noopener">JSON Parser Transform</a></li>
</ul>
<div id="attachment_6901" style="width: 1306px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6901" class="size-full wp-image-6901" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png" alt="Get YouTube Video View Clicks, Likes, Dislikes (Bulk Mode for all videos)" width="1296" height="823" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes.png 1296w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-768x488.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-get-youtube-video-view-count-likes-dislikes-1024x650.png 1024w" sizes="(max-width: 1296px) 100vw, 1296px" /></a><p id="caption-attachment-6901" class="wp-caption-text">Get YouTube Video View Clicks, Likes, Dislikes (Bulk Mode for all videos)</p></div>
<h2>Read data from YouTube Analytics / Reporting API (Metrics, Dimensions Report)</h2>
<p>So far we have seen basic YouTube APIs to extract your Channel information. However there is another very powerful API endpoint to query custom reports from YouTube. Check <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">this YouTube Analytics API endpoint</a>. In this section we will learn how to extract useful information from YouTube using Analytics API.</p>
<h3>Step-By-Step</h3>
<p>Let&#8217;s look at an example to read total views, estimated watch time, average view duration and some other metrics by date for channel you have access.</p>
<ol>
<li>Go to Data Flow, Drag ZS JSON Source from SSIS Toolbox</li>
<li>Double click to configure.</li>
<li>Check Use Credentials. Select OAuth connection we created in previous section.</li>
<li>In the URL field, Enter Below Sample URL. Change Parameters as per your need or leave it default.<br />
For example:<br />
<strong>ids=channel==MINE</strong>   (where MINE can be replaced by other channel id or keep it as MINE to get data for your own channel)<br />
<strong>metrics</strong> (can be changed from any <a href="https://developers.google.com/youtube/analytics/metrics" target="_blank" rel="noopener">valid list here</a>)<br />
<strong>dimensions</strong> (can be changed to any valid <a href="https://developers.google.com/youtube/analytics/dimensions" target="_blank" rel="noopener">list from here</a>)<br />
<strong>startDate</strong> (Must be YYYY-MM-DD format)<br />
<strong>endDate</strong> (Must be YYYY-MM-DD format)<br />
<pre class="crayon-plain-tag">https://youtubeanalytics.googleapis.com/v2/reports?ids=channel==MINE&amp;metrics=views,estimatedMinutesWatched,averageViewDuration,averageViewPercentage,subscribersGained&amp;dimensions=day&amp;startDate=2019-03-01&amp;endDate=2019-04-01</pre>
</li>
<li>Change Filter to <pre class="crayon-plain-tag">$.rows[*]</pre></li>
<li>Go to <strong>2D Array Transform</strong> tab.<br />
Select Method as <pre class="crayon-plain-tag">Simple 2-dimensional array</pre>
EnterColumn Filter as  <pre class="crayon-plain-tag">$.columnHeaders[*].name</pre>
<div id="attachment_6909" style="width: 906px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6909" class="size-full wp-image-6909" src="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png" alt="YouTube Analytics API Advanced Transformation" width="896" height="270" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api.png 896w, https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/advanced-transform-youtube-analytics-api-768x231.png 768w" sizes="(max-width: 896px) 100vw, 896px" /></a><p id="caption-attachment-6909" class="wp-caption-text">YouTube Analytics API Advanced Transformation</p></div></li>
<li>That&#8217;s it now Preview your data. See below over all steps.
<div id="attachment_6910" style="width: 978px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6910" class="size-full wp-image-6910" src="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png" alt="Read data from YouTube Analytics API (Custom Reports using Dimensions, Metrics Query)" width="968" height="741" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics.png 968w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics-300x230.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/ssis-youtube-analytics-report-api-dimensions-metrics-768x588.png 768w" sizes="(max-width: 968px) 100vw, 968px" /></a><p id="caption-attachment-6910" class="wp-caption-text">Read data from YouTube Analytics API (Custom Reports using Dimensions, Metrics Query)</p></div></li>
</ol>
<h3>Build YouTube Analytics / Reporting API Query (API Playground)</h3>
<p>With Analytics API You can extract many interesting data. You can use Test Tool found <a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">on this page to build</a> some interesting queries. Scroll to <strong>Common Use Cases</strong> section on that link. On the right side you can select Credentials Type as OAuth and click Execute.</p>
<p><a href="https://developers.google.com/youtube/analytics/reference/reports/query" target="_blank" rel="noopener">https://developers.google.com/youtube/analytics/reference/reports/query</a></p>
<div id="attachment_6911" style="width: 944px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6911" class="size-full wp-image-6911" src="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg" alt="YouTube Analytics / Reporting API Explorer (Testing API Calls)" width="934" height="688" srcset="https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder.jpg 934w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder-300x221.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2019/05/youtube-analytics-api-explorer-test-query-builder-768x566.jpg 768w" sizes="(max-width: 934px) 100vw, 934px" /></a><p id="caption-attachment-6911" class="wp-caption-text">YouTube Analytics / Reporting API Explorer (Testing API Calls)</p></div>
<h2>Loading YouTube API Data into SQL Server</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>Download Sample SSIS Package</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/05/Google_Youtube_API_Demo.zip">SSIS Package is attached here (SSIS 2012 Format)</a>.</p>
<h2>Conclusion</h2>
<p>In this article we saw how to extract information from REST API such as YouTube REST API using OAuth 2.0. We also learned techniques like Pagination, JSON Parsing, Request Batching using multiple components to achieve full scale API integration. 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>
<p>The post <a href="https://zappysys.com/blog/read-youtube-api-data-ssis-videos-channels-playlists/">How to read YouTube API data in SSIS (Videos, Channels, Playlists)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Read Freshdesk data in SSIS &#8211; REST API Call</title>
		<link>https://zappysys.com/blog/read-freshdesk-data-ssis-rest-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 09 Apr 2019 15:42:16 +0000</pubDate>
				<category><![CDATA[HTTP Connection]]></category>
		<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[freshdesk]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=6722</guid>

					<description><![CDATA[<p>Introduction In this post we will learn how to read Freshdesk data in SSIS using ZappySys JSON / REST API Source. We will see how to authenticate, paginate / parse and load Freshdesk data into SQL Server Table in just few clicks. If you don&#8217;t use Freshdesk and considering using Zendesk instead then check our previous [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/read-freshdesk-data-ssis-rest-api-call/">Read Freshdesk data in SSIS &#8211; REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/freshdesk-logo.png"><img loading="lazy" decoding="async" class=" wp-image-6732 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2019/04/freshdesk-logo.png" alt="" width="146" height="101" /></a>In this post we will learn how to read Freshdesk data in SSIS using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZappySys JSON / REST API Source</a>. We will see how to authenticate, paginate / parse and load Freshdesk data into SQL Server Table in just few clicks. If you don&#8217;t use Freshdesk and considering using Zendesk instead then check our previous post on how to <a href="https://zappysys.com/blog/read-zendesk-data-in-ssis-call-rest-api/" target="_blank" rel="noopener">Read Zendesk data in SSIS</a>.</p>
<p><a href="https://freshdesk.com" target="_blank" rel="noopener">Freshdesk</a> is a cloud based / managed service like Zendesk to for Support / Customer service.</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>Getting Started</h2>
<p>So let&#8217;s get started. We will see step by step instructions to configure Freshdesk API connection, setup JSON Source to read data from Freshdesk and finally load data into SQL Server table. We will use <a href="https://developers.freshdesk.com/api/#list_all_tickets" target="_blank" rel="noopener">List Tickets API</a> in this article for demo purpose but read other useful information on that page if you are new to REST API.</p>
<h3>Setup Freshdesk REST API Connection</h3>
<p>Very first step to call any Freshdesk API in SSIS is to configure HTTP connection (<a href="https://developers.freshdesk.com/api/#authentication">Basic Authentication</a> &#8211; Using UserID/ Password).</p>
<ol>
<li>Open Visual Studio (i.e. SSDT) to create new SSIS Package</li>
<li>From Control Flow SSIS Toolbox drag REST API task</li>
<li>Select URL From HTTP Connection Option from Drop down</li>
<li>Click New HTTP Connection</li>
<li>Configure HTTP connection like below.</li>
<li>Enter any Valid URL (This will be ignored if you Override URL on REST API Task)</li>
<li>Select Basic Authentication (Use User ID and Password)
<div id="attachment_6725" style="width: 1024px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6725" class="size-full wp-image-6725" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection.png" alt="Configure Freshdesk REST API Connection in SSIS - Basic Authentication (User ID / Password)" width="1014" height="705" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection.png 1014w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection-300x209.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-freshdesk-rest-api-connection-768x534.png 768w" sizes="(max-width: 1014px) 100vw, 1014px" /></a><p id="caption-attachment-6725" class="wp-caption-text">Configure Freshdesk REST API Connection in SSIS &#8211; Basic Authentication (User ID / Password)</p></div></li>
<li>Click OK to close HTTP Connection</li>
<li>On Main UI of REST API Task, check Use Direct URL and enter below URL (Change YourDomain Part)<br />
https://{your-domain}.freshdesk.com/api/v2/tickets</li>
<li>Click Test Request / Response. If you see OK status then you have successfully called Freshdesk API. That&#8217;s all.
<div id="attachment_6726" style="width: 734px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6726" class="size-full wp-image-6726" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png" alt="Calling Freshdesk REST API in SSIS ( Read Tickets example)" width="724" height="677" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api.png 724w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-call-freshdesk-rest-api-300x281.png 300w" sizes="(max-width: 724px) 100vw, 724px" /></a><p id="caption-attachment-6726" class="wp-caption-text">Calling Freshdesk REST API in SSIS ( Read Tickets example)</p></div></li>
</ol>
<p>In the section we will see how to Parse REST API response and load data into SQL Table.</p>
<h3>Read Freshdesk data in SSIS</h3>
<p>Now let&#8217;s look at steps to configure SSIS JSON Source to read from Freshdesk REST API.</p>
<ol>
<li>Drag Data Flow task from toolbox. Double click to go to Data Flow designer</li>
<li>Drag ZS JSON Source (For File / REST API)</li>
<li>Configure JSON Source like below.</li>
<li>Check Use Connection option and select HTTP connection created in the previous section.</li>
<li>Enter API URL from which you like to read data. In out example we want to read tickets created after 2019-01-01 so we will call API like below. You can skip ?updated_since=2019-01-01 if you like to read all tickets.<br />
<pre class="crayon-plain-tag">https://{your-domain}.freshdesk.com/api/v2/tickets?updated_since=2019-01-01</pre>
</li>
<li>You can also Use <a href="https://zappysys.com/onlinehelp/ssis-powerpack/scr/ssis-format-specifiers.htm" target="_blank" rel="noopener">Variable Placeholder</a> in URL to make things dynamic like below<br />
<pre class="crayon-plain-tag">https://{your-domain}.freshdesk.com/api/v2/tickets?updated_since={{User::MyDateVar,yyyy-MM-dd}}</pre>
</li>
<li>Click Preview to see sample data.
<div id="attachment_6730" style="width: 1116px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6730" class="size-full wp-image-6730" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example.png" alt="Read Freshdesk data in SSIS - Fetch Tickets example (With REST API pagination)" width="1106" height="799" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example.png 1106w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example-768x555.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-read-freshdesk-data-in-ssis-rest-api-fetch-tickets-example-1024x740.png 1024w" sizes="(max-width: 1106px) 100vw, 1106px" /></a><p id="caption-attachment-6730" class="wp-caption-text">Read Freshdesk data in SSIS &#8211; Fetch Tickets example (With REST API pagination)</p></div></li>
<li>Configure Pagination like below. Basically you have to select Pagination Mode = <strong>URL Parameter Mode</strong>. Enter Page num indicator as <pre class="crayon-plain-tag">page</pre>
<div id="attachment_6728" style="width: 724px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6728" class="size-full wp-image-6728" src="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode.png" alt="Configure REST API pagination (URL Parameter Mode)" width="714" height="210" srcset="https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode.png 714w, https://zappysys.com/blog/wp-content/uploads/2019/04/ssis-rest-api-pagination-url-parameter-mode-300x88.png 300w" sizes="(max-width: 714px) 100vw, 714px" /></a><p id="caption-attachment-6728" class="wp-caption-text">Configure REST API pagination (URL Parameter Mode)</p></div></li>
<li>Thats it. Now click OK to save UI.</li>
</ol>
<h3>Load Freshdesk data into SQL Server Table</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>Conclusion</h2>
<p>In this article we saw how easy it is to read data from any REST API service like Freshdesk REST API and load into Relational DB like SQL Server. Try <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack for FREE</a> and explore many other 70+ Tasks /Components not discussed in this article.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/read-freshdesk-data-ssis-rest-api-call/">Read Freshdesk data in SSIS &#8211; REST API Call</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
