<?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 PowerPack Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/tag/ssis-powerpack/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/tag/ssis-powerpack/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Sat, 20 Dec 2025 01:37:50 +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 PowerPack Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/tag/ssis-powerpack/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>How to download files from SharePoint Online using SSIS</title>
		<link>https://zappysys.com/blog/download-files-sharepoint-online-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 29 Dec 2023 07:08:08 +0000</pubDate>
				<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[download files from sharepoint online]]></category>
		<category><![CDATA[sharepoint online]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS API Destination]]></category>
		<category><![CDATA[SSIS SharePoint Online Connector]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10880</guid>

					<description><![CDATA[<p>Introduction In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate SharePoint Online into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful SharePoint Online Connector that [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/download-files-sharepoint-online-using-ssis/">How to download files from SharePoint Online using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg"><img loading="lazy" decoding="async" class="alignleft wp-image-3731" src="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg" alt="sharepoint icon" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon.jpg 225w, https://zappysys.com/blog/wp-content/uploads/2018/05/sharepoint-icon-150x150.jpg 150w" sizes="(max-width: 100px) 100vw, 100px" /></a>In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate SharePoint Online into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/">SharePoint Online Connector</a> that makes downloading files from SharePoint Online a breeze. In this guide, we&#8217;ll walk you through the process of downloading files from SharePoint Online using SSIS and the <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/ssis">ZappySys SSIS PowerPack SharePoint Online Connector</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>Download files from SharePoint Online with SSIS:</h2>
<p>In this section, we will learn how to configure and use SharePoint Online Connector in the API Source &amp; API Destination to download files from SharePoint Online.</p>
<ol>
<li>Begin with opening Visual Studio and Creating a New Project.</li>
<li>Select Integration Service Project and in the new project window set the appropriate name and location for the project. Click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol style="list-style-type: lower-alpha;">
<li>SSIS ToolBox on the left sidebar</li>
<li>Solution Explorer and Property Window on the right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window at the bottom</li>
</ol>
<div id="attachment_10258" style="width: 710px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/upload-files-google-drive-using-ssis/zappysys-ssis-project-with-toolbox/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10258" class="wp-image-10258" src="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png" alt="zappysys ssis project with toolbox" width="700" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png 1024w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-768x490.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox.png 1287w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-10258" class="wp-caption-text">SSIS Toolbox &#8211; ZappySys Tasks</p></div>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in the SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div></div></li>
<li>Now, Drag and Drop the SSIS Data Flow Task from the SSIS Toolbox. Double-click on the Data Flow Task to see the Data Flow Designer.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10260" src="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double-click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10263" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png" alt="" width="684" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png 684w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection-300x282.png 300w" sizes="(max-width: 684px) 100vw, 684px" /></a></li>
</ol>
<h2>Configuring the SharePoint Online Connector</h2>
<ol>
<li>Use a preinstalled SharePoint Online Connector from the Popular Connector List or press the Search Online radio button to download SharePoint Online Connector. Once downloaded simply use it in the configuration:
<div id="attachment_10888" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-sharepoint-walkthrough.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10888" class="wp-image-10888 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-sharepoint-walkthrough.png" alt="SSIS ZS API Connection Manager - Select SharePoint Online Connector" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-sharepoint-walkthrough.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-sharepoint-walkthrough-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-sharepoint-walkthrough-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10888" class="wp-caption-text">SSIS ZS API Connection Manager &#8211; Select SharePoint Online Connector</p></div></li>
<li>Proceed with selecting the desired Authentication Type. Then select API Base URL (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed.</li>
<li>After configuring all the required properties in the API Connection Manager, please click on the &#8220;Test Connection&#8221; button to confirm that the connection is established successfully.<br />
<h3>Method1: Connect to SharePoint Online using User Credentials [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/help/authentication/UserCreds"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div class="mceTemp"></div>
<div id="attachment_10884" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-generate-token-user-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10884" class="wp-image-10884 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-generate-token-user-credentials.png" alt="SSIS ZS API Connection Manager - Generate Token - SharePoint Online with User Credentials" width="866" height="814" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-generate-token-user-credentials.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-generate-token-user-credentials-300x282.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-generate-token-user-credentials-768x722.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10884" class="wp-caption-text">SSIS ZS API Connection Manager &#8211; Generate Token &#8211; SharePoint Online with User Credentials</p></div>
<h3>Method2: Connect to SharePoint Online using Application Credentials [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/sharepoint-connector/help/authentication/AppCreds"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div class="mceTemp"></div>
<div id="attachment_10892" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-application-creds-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10892" class="size-full wp-image-10892" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-application-creds-generate-token.png" alt="SSIS API Source - Generate Token - SharePoint Online with Application Credentials" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-application-creds-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-application-creds-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-application-creds-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10892" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; SharePoint Online with Application Credentials</p></div></li>
</ol>
<h2>How to download a single file from SharePoint Online</h2>
<p>In the API Source Component, we&#8217;ve chosen the API Connection Manager. Next, we need to configure the remaining properties of the component to download the single file from SharePoint Online.</p>
<ol>
<li>Choose the <strong>Download file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>Please choose DriveId from the drop-down menu.</li>
<li>Please set the <strong>FileId</strong> that indicates which file you wish to download. This is an essential parameter for the download process.</li>
<li>Please set the local folder&#8217;s physical path which indicates the desired file being downloaded by setting the <strong>TargetFilePath</strong> parameter.</li>
<li>If you intend to replace the local file with the one being downloaded, please select the &#8216;<strong>AlwaysOverwrite</strong>&#8216; option from the dropdown menu labeled &#8216;<strong>FileOverwriteMode</strong>&#8216;. Alternatively, you can choose &#8216;FileIfExists&#8217; or &#8216;SkipIfExists&#8217; based on your specific needs.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div class="mceTemp"></div>
<div id="attachment_10885" style="width: 1123px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-single-file-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10885" class="size-full wp-image-10885" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-single-file-upload.png" alt="SSIS API Source - SharePoint Online - Download Single File" width="1113" height="861" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-single-file-upload.png 1113w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-single-file-upload-300x232.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-single-file-upload-768x594.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-sharepoint-single-file-upload-1024x792.png 1024w" sizes="(max-width: 1113px) 100vw, 1113px" /></a><p id="caption-attachment-10885" class="wp-caption-text">SSIS API Source &#8211; SharePoint Online &#8211; Download Single File</p></div>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call. With just a few clicks, we have successfully configured the call to SharePoint Online using the <strong>ZappySys SharePoint Online Connector</strong> for downloading a Single file from SharePoint Online.</p>
<h2>How to download multiple files from SharePoint Online</h2>
<p>In the API Destination Component, we have chosen the API Connection Manager. Now, we must proceed to configure the remaining properties of the component to facilitate the download of multiple files from SharePoint Online. Additionally, we should make use of an OLE DB Source and Derived Column component to map the files for the download process.</p>
<ol>
<li>Drag and drop the OLE DB Source Component from the SSIS Toolbox. Double-click on the OLE D B Source Component to initiate its configuration.
<div id="attachment_7289" style="width: 515px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7289" class="wp-image-7289 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png" alt="OLE DB Source - Drag and Drop" width="505" height="190" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png 505w, https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop-300x113.png 300w" sizes="(max-width: 505px) 100vw, 505px" /></a><p id="caption-attachment-7289" class="wp-caption-text">OLE DB Source &#8211; Drag and Drop</p></div></li>
<li>Create a new OLE DB Connection Manager and configure your SQL Server settings for the connection. Next, select the Data access mode, specify the name of the table or view, or write an SQL Command. Afterward, click on the &#8216;Preview&#8217; button to view a preview and check the &#8216;Columns&#8217; tab for the source columns.
<div class="mceTemp"></div>
<div id="attachment_10887" style="width: 774px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-sharepoint-filesdata-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10887" class="size-full wp-image-10887" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-sharepoint-filesdata-sql.png" alt="SSIS OLE DB Source - Configure SQL Connection and fetch the table data" width="764" height="797" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-sharepoint-filesdata-sql.png 764w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-sharepoint-filesdata-sql-288x300.png 288w" sizes="(max-width: 764px) 100vw, 764px" /></a><p id="caption-attachment-10887" class="wp-caption-text">SSIS OLE DB Source &#8211; Configure SQL Connection and fetch the table data</p></div></li>
<li>Next, drag and drop the Derived Column Component from the SSIS Toolbox. Double-click on the Derived Column Component to begin its configuration.
<div id="attachment_10219" style="width: 503px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10219" class="size-full wp-image-10219" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png" alt="Drag and drop the Derived Column" width="493" height="345" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png 493w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column-300x210.png 300w" sizes="(max-width: 493px) 100vw, 493px" /></a><p id="caption-attachment-10219" class="wp-caption-text">Drag and drop the Derived Column</p></div></li>
<li>Now, add a new Derived Column by setting the expression to concatenate FilePath and FileName. Click &#8216;OK&#8217; to save the configuration.
<div class="mceTemp"></div>
<div id="attachment_10886" style="width: 964px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-sharepoint-set-expression.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10886" class="size-full wp-image-10886" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-sharepoint-set-expression.png" alt="SSIS Derived Column - Add New Column and Set Expression" width="954" height="622" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-sharepoint-set-expression.png 954w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-sharepoint-set-expression-300x196.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-sharepoint-set-expression-768x501.png 768w" sizes="(max-width: 954px) 100vw, 954px" /></a><p id="caption-attachment-10886" class="wp-caption-text">SSIS Derived Column &#8211; Add New Column and Set Expression</p></div></li>
<li>Now, drag and drop the API Destination Component from the SSIS Toolbox. Double-click on the API Destination Component to begin its configuration.
<div id="attachment_10697" style="width: 879px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10697" class="wp-image-10697 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png" alt="Drag and Drop the SSIS API Destination Component" width="869" height="548" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png 869w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop-768x484.png 768w" sizes="(max-width: 869px) 100vw, 869px" /></a><p id="caption-attachment-10697" class="wp-caption-text">Drag and Drop the SSIS API Destination Component</p></div></li>
<li>Double-click on the <strong>API Destination</strong> component to configure it for downloading multiple files from SharePoint Online.
<ol style="list-style-type: lower-alpha;">
<li>Choose the <strong>Download file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>Please specify the &#8216;FileOverwriteMode&#8217; option as &#8216;AlwaysOverwrite,&#8217; or you can choose &#8216;FailIfExists&#8217; or &#8216;SkipIfExists&#8217; options based on your requirements.<br />
Please refer to the sample screenshot below.</p>
<div class="mceTemp"></div>
<div id="attachment_10899" style="width: 982px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-sharepoint.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10899" class="size-full wp-image-10899" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-sharepoint.png" alt="SSIS API Destination Component - Configure Settings Tab to download File from SharePoint Online" width="972" height="701" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-sharepoint.png 972w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-sharepoint-300x216.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-sharepoint-768x554.png 768w" sizes="(max-width: 972px) 100vw, 972px" /></a><p id="caption-attachment-10899" class="wp-caption-text">SSIS API Destination Component &#8211; Configure Settings Tab to download Files from SharePoint Online</p></div></li>
<li>Now, go to the Mappings tab and specify the source columns with the corresponding target properties.<br />
Note: Here We&#8217;re mapping FileID with $$Id and FileNameWithPath with $$ResponseDataFile. You can create mappings based on your Source columns<br />
Please refer to the sample screenshot below</p>
<div class="mceTemp"></div>
<div id="attachment_10890" style="width: 807px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-configure-mappingstab-download-multiplefile.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10890" class="wp-image-10890 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-configure-mappingstab-download-multiplefile.png" alt="SSIS API Destination Component - Configure the Mappings Tab to download multiple files from SharePoint Online" width="797" height="732" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-configure-mappingstab-download-multiplefile.png 797w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-configure-mappingstab-download-multiplefile-300x276.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-configure-mappingstab-download-multiplefile-768x705.png 768w" sizes="(max-width: 797px) 100vw, 797px" /></a><p id="caption-attachment-10890" class="wp-caption-text">SSIS API Destination Component &#8211; Configure the Mappings Tab to download multiple files from SharePoint Online</p></div></li>
</ol>
</li>
<li>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button from the Settings tab to initiate the API call. With just a few clicks, we have successfully configured the call to SharePoint Online using the ZappySys SharePoint Online Connector for downloading multiple files from SharePoint Online.<br />
Please refer to the sample screenshot below.</p>
<div class="mceTemp"></div>
<div id="attachment_10891" style="width: 913px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-download-multiplefiles-success.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10891" class="size-full wp-image-10891" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-download-multiplefiles-success.png" alt="Download Multiple files from SharePoint Online" width="903" height="333" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-download-multiplefiles-success.png 903w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-download-multiplefiles-success-300x111.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-sharepoint-download-multiplefiles-success-768x283.png 768w" sizes="(max-width: 903px) 100vw, 903px" /></a><p id="caption-attachment-10891" class="wp-caption-text">Download Multiple files from SharePoint Online</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>In this blog, we learned how to connect with SharePoint Online using SSIS API Connection Manager and download single or multiple files from SharePoint Online using a combination of SSIS components, including the <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source component</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination component</a>, OLE DB Source component, and Derived Column component.</p>
<p>The post <a href="https://zappysys.com/blog/download-files-sharepoint-online-using-ssis/">How to download files from SharePoint Online using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to download files from OneDrive using SSIS</title>
		<link>https://zappysys.com/blog/download-files-onedrive-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 08 Dec 2023 13:58:43 +0000</pubDate>
				<category><![CDATA[SSIS API Destination]]></category>
		<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[download files from onedrive]]></category>
		<category><![CDATA[onedrive]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS OneDrive Connector]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10862</guid>

					<description><![CDATA[<p>Introduction In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate OneDrive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful OneDrive Connector that makes downloading [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/download-files-onedrive-using-ssis/">How to download files from OneDrive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png"><img loading="lazy" decoding="async" class="alignleft wp-image-9115 " src="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo-150x150.png" alt="Download File from OneDrive in SSIS" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png 261w" sizes="(max-width: 100px) 100vw, 100px" /></a>In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate OneDrive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful <a href="https://zappysys.com/api/integration-hub/onedrive-connector/">OneDrive Connector</a> that makes downloading files from OneDrive a breeze. In this guide, we&#8217;ll walk you through the process of downloading files from OneDrive using SSIS and the <a href="https://zappysys.com/api/integration-hub/onedrive-connector/ssis">ZappySys SSIS PowerPack OneDrive Connector</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>Download files from OneDrive with SSIS</h2>
<p>In this section, we will learn how to configure and use OneDrive Connector in the API Source &amp; API Destination to download files from OneDrive.</p>
<ol>
<li>Begin with opening Visual Studio and Creating a New Project.</li>
<li>Select Integration Service Project and in the new project window set the appropriate name and location for the project. Click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol style="list-style-type: lower-alpha;">
<li>SSIS ToolBox on the left sidebar</li>
<li>Solution Explorer and Property Window on the right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window at the bottom</li>
</ol>
<div id="attachment_10258" style="width: 710px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/upload-files-google-drive-using-ssis/zappysys-ssis-project-with-toolbox/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10258" class="wp-image-10258" src="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png" alt="zappysys ssis project with toolbox" width="700" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png 1024w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-768x490.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox.png 1287w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-10258" class="wp-caption-text">SSIS Toolbox &#8211; ZappySys Tasks</p></div>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in the SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div></div></li>
<li>Now, Drag and Drop the SSIS Data Flow Task from the SSIS Toolbox. Double-click on the Data Flow Task to see the Data Flow Designer.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10260" src="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double-click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10263" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png" alt="" width="684" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png 684w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection-300x282.png 300w" sizes="(max-width: 684px) 100vw, 684px" /></a></li>
</ol>
<h2>Configuring the OneDrive Connector</h2>
<ol>
<li>Use a preinstalled OneDrive Connector from the Popular Connector List or press the Search Online radio button to download OneDrive Connector. Once downloaded simply use it in the configuration:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10851" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough.png" alt="ssis onedrive template selection walkthrough" width="783" height="719" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough.png 783w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough-300x275.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough-768x705.png 768w" sizes="(max-width: 783px) 100vw, 783px" /></a></li>
<li>Proceed with selecting the desired Authentication Type. Then select API Base URL (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed.</li>
<li>After configuring all the required properties in the API Connection Manager, please click on the &#8220;Test Connection&#8221; button to confirm that the connection is established successfully.<br />
<h3>Method1: Connect to OneDrive using User Credentials [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/onedrive-connector/help/authentication/UserCreds"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10850" style="width: 755px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10850" class="wp-image-10850 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials.png" alt="SSIS API Source - Generate Token - OneDrive with User Credentials" width="745" height="784" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials.png 745w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials-285x300.png 285w" sizes="(max-width: 745px) 100vw, 745px" /></a><p id="caption-attachment-10850" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; OneDrive with User Credentials</p></div>
<h3>Method2: Connect to OneDrive using Application Credentials [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/onedrive-connector/help/authentication/AppCreds"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10849" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10849" class="size-full wp-image-10849" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token.png" alt="SSIS API Source - Generate Token - OneDrive with Application Credentials" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10849" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; OneDrive with Application Credentials</p></div></li>
</ol>
<h2>How to download a single file from OneDrive</h2>
<p>In the API Source Component, we&#8217;ve chosen the API Connection Manager. Next, we need to configure the remaining properties of the component to download the single file from OneDrive.</p>
<ol>
<li>Choose the <strong>Download file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>Please choose DriveId from the drop-down menu.</li>
<li>Please set the <strong>FileId</strong> that indicates which file you wish to download. This is an essential parameter for the download process.</li>
<li>Please set the local folder&#8217;s physical path which indicates the desired file being downloaded by setting the <strong>TargetFilePath</strong> parameter.</li>
<li>If you intend to replace the local file with the one being downloaded, please select the &#8216;<strong>AlwaysOverwrite</strong>&#8216; option from the dropdown menu labeled &#8216;<strong>FileOverwriteMode</strong>&#8216;. Alternatively, you can choose &#8216;FileIfExists&#8217; or &#8216;SkipIfExists&#8217; based on your specific needs.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div id="attachment_10865" style="width: 724px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-download.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10865" class="size-full wp-image-10865" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-download.png" alt="SSIS API Source - OneDrive - Download Single File" width="714" height="893" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-download.png 714w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-download-240x300.png 240w" sizes="(max-width: 714px) 100vw, 714px" /></a><p id="caption-attachment-10865" class="wp-caption-text">SSIS API Source &#8211; OneDrive &#8211; Download Single File</p></div>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call. With just a few clicks, we have successfully configured the call to OneDrive using the <strong>ZappySys OneDrive Connector</strong> for downloading a Single file from OneDrive.</p>
<h2>How to download multiple files from OneDrive</h2>
<p>In the API Destination Component, we have chosen the API Connection Manager. Now, we must proceed to configure the remaining properties of the component to facilitate the download of multiple files from OneDrive. Additionally, we should make use of an OLE DB Source and Derived Column component to map the files for the download process.</p>
<ol>
<li>Drag and drop the OLE DB Source Component from the SSIS Toolbox. Double-click on the OLE DB Source Component to initiate its configuration.
<div id="attachment_7289" style="width: 515px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7289" class="wp-image-7289 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png" alt="OLE DB Source - Drag and Drop" width="505" height="190" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png 505w, https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop-300x113.png 300w" sizes="(max-width: 505px) 100vw, 505px" /></a><p id="caption-attachment-7289" class="wp-caption-text">OLE DB Source &#8211; Drag and Drop</p></div></li>
<li>Create a new OLE DB Connection Manager and configure your SQL Server settings for the connection. Next, select the Data access mode, specify the name of the table or view, or write an SQL Command. Afterward, click on the &#8216;Preview&#8217; button to view a preview and check the &#8216;Columns&#8217; tab for the source columns.
<div id="attachment_10874" style="width: 832px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-onedrive-filesdata-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10874" class="wp-image-10874 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-onedrive-filesdata-sql.png" alt="SSIS OLE DB Source - Configure SQL Connection and fetch the table data" width="822" height="718" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-onedrive-filesdata-sql.png 822w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-onedrive-filesdata-sql-300x262.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-oledb-source-read-onedrive-filesdata-sql-768x671.png 768w" sizes="(max-width: 822px) 100vw, 822px" /></a><p id="caption-attachment-10874" class="wp-caption-text">SSIS OLE DB Source &#8211; Configure SQL Connection and fetch the table data</p></div></li>
<li>Next, drag and drop the Derived Column Component from the SSIS Toolbox. Double-click on the Derived Column Component to begin its configuration.
<div id="attachment_10219" style="width: 503px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10219" class="size-full wp-image-10219" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png" alt="Drag and drop the Derived Column" width="493" height="345" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png 493w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column-300x210.png 300w" sizes="(max-width: 493px) 100vw, 493px" /></a><p id="caption-attachment-10219" class="wp-caption-text">Drag and drop the Derived Column</p></div></li>
<li>Now, add a new Derived Column by setting the expression to concatenate FilePath and FileName. Click &#8216;OK&#8217; to save the configuration.
<div id="attachment_10873" style="width: 858px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-onedrive-set-expression.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10873" class="wp-image-10873 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-onedrive-set-expression.png" alt="SSIS Derived Column - Add New Column and Set Expression" width="848" height="622" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-onedrive-set-expression.png 848w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-onedrive-set-expression-300x220.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-derived-column-add-newcolumn-onedrive-set-expression-768x563.png 768w" sizes="(max-width: 848px) 100vw, 848px" /></a><p id="caption-attachment-10873" class="wp-caption-text">SSIS Derived Column &#8211; Add New Column and Set Expression</p></div></li>
<li>Now, drag and drop the API Destination Component from the SSIS Toolbox. Double-click on the API Destination Component to begin its configuration.
<div id="attachment_10697" style="width: 879px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10697" class="wp-image-10697 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png" alt="Drag and Drop the SSIS API Destination Component" width="869" height="548" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png 869w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop-768x484.png 768w" sizes="(max-width: 869px) 100vw, 869px" /></a><p id="caption-attachment-10697" class="wp-caption-text">Drag and Drop the SSIS API Destination Component</p></div></li>
<li>Double-click on the <strong>API Destination</strong> component to configure it for downloading multiple files from OneDrive.
<ol style="list-style-type: lower-alpha;">
<li>Choose the <strong>Download file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>Please specify the &#8216;FileOverwriteMode&#8217; option as &#8216;AlwaysOverwrite,&#8217; or you can choose &#8216;FailIfExists&#8217; or &#8216;SkipIfExists&#8217; options based on your requirements.<br />
Please refer to the sample screenshot below.</p>
<div id="attachment_10872" style="width: 827px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-onedrive.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10872" class="size-full wp-image-10872" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-onedrive.png" alt="SSIS API Destination Component - Configure Settings Tab" width="817" height="674" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-onedrive.png 817w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-onedrive-300x247.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-configure-settingstab-download-multiplefile-onedrive-768x634.png 768w" sizes="(max-width: 817px) 100vw, 817px" /></a><p id="caption-attachment-10872" class="wp-caption-text">SSIS API Destination Component &#8211; Configure Settings Tab</p></div></li>
<li>Now, go to the Mappings tab and specify the source columns with the corresponding target properties.<br />
Note: Here We&#8217;re mapping FileID with $$Id and FileNameWithPath with $$ResponseDataFile. You can create mappings based on your Source columns<br />
Please refer to the sample screenshot below</p>
<div id="attachment_10871" style="width: 811px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-configure-mappingstab-download-multiplefile.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10871" class="size-full wp-image-10871" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-configure-mappingstab-download-multiplefile.png" alt="SSIS API Destination Component - Configure Mappings Tab" width="801" height="500" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-configure-mappingstab-download-multiplefile.png 801w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-configure-mappingstab-download-multiplefile-300x187.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-configure-mappingstab-download-multiplefile-768x479.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-configure-mappingstab-download-multiplefile-436x272.png 436w" sizes="(max-width: 801px) 100vw, 801px" /></a><p id="caption-attachment-10871" class="wp-caption-text">SSIS API Destination Component &#8211; Configure Mappings Tab</p></div></li>
</ol>
</li>
<li>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button from the Settings tab to initiate the API call. With just a few clicks, we have successfully configured the call to OneDrive using the ZappySys OneDrive Connector for downloading multiple files from OneDrive.<br />
Please refer to the sample screenshot below.</p>
<div id="attachment_10870" style="width: 958px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-download-multiplefiles-success.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10870" class="size-full wp-image-10870" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-download-multiplefiles-success.png" alt="Download Multiple files from OneDrive" width="948" height="329" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-download-multiplefiles-success.png 948w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-download-multiplefiles-success-300x104.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-destination-onedrive-download-multiplefiles-success-768x267.png 768w" sizes="(max-width: 948px) 100vw, 948px" /></a><p id="caption-attachment-10870" class="wp-caption-text">Download Multiple files from OneDrive</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>In this blog, we learned how to connect with OneDrive using SSIS API Connection Manager and download single or multiple files from OneDrive using a combination of SSIS components, including the <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source component</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination component</a>, OLE DB Source component, and Derived Column component.</p>
<p>The post <a href="https://zappysys.com/blog/download-files-onedrive-using-ssis/">How to download files from OneDrive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to upload files on OneDrive using SSIS</title>
		<link>https://zappysys.com/blog/upload-files-onedrive-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 08 Dec 2023 06:03:06 +0000</pubDate>
				<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[Foreach Loop Container]]></category>
		<category><![CDATA[onedrive]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis advanced file system task]]></category>
		<category><![CDATA[upload files to OneDrive]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10847</guid>

					<description><![CDATA[<p>Introduction In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate OneDrive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful OneDrive Connector that makes uploading [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/upload-files-onedrive-using-ssis/">How to upload files on OneDrive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png"><img loading="lazy" decoding="async" class="alignleft wp-image-9115" src="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png" alt="Download File from OneDrive in SSIS" width="100" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo.png 261w, https://zappysys.com/blog/wp-content/uploads/2020/08/microsoft-onedrive-logo-150x150.png 150w" sizes="(max-width: 100px) 100vw, 100px" /></a>In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate OneDrive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful <a href="https://zappysys.com/api/integration-hub/onedrive-connector/">OneDrive Connector</a> that makes uploading files to OneDrive a breeze. In this guide, we&#8217;ll walk you through the process of uploading files to OneDrive using SSIS and the <a href="https://zappysys.com/api/integration-hub/onedrive-connector/ssis">ZappySys SSIS PowerPack OneDrive Connector</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>Upload files to OneDrive with SSIS:</h2>
<p>In this section, we will learn how to configure and use OneDrive Connector in the API Source to upload files on OneDrive.</p>
<ol>
<li>Begin with opening Visual Studio and Creating a New Project.</li>
<li>Select Integration Service Project and in the new project window set the appropriate name and location for the project. Click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol style="list-style-type: lower-alpha;">
<li>SSIS ToolBox on the left sidebar</li>
<li>Solution Explorer and Property Window on the right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window at the bottom</li>
</ol>
<div id="attachment_10258" style="width: 710px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/upload-files-google-drive-using-ssis/zappysys-ssis-project-with-toolbox/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10258" class="wp-image-10258" src="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png" alt="zappysys ssis project with toolbox" width="700" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png 1024w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-768x490.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox.png 1287w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-10258" class="wp-caption-text">SSIS Toolbox &#8211; ZappySys Tasks</p></div>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in the SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div></div></li>
<li>Now, Drag and Drop the SSIS Data Flow Task from the SSIS Toolbox. Double-click on the Data Flow Task to see the Data Flow Designer.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10260" src="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double-click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10263" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png" alt="" width="684" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png 684w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection-300x282.png 300w" sizes="(max-width: 684px) 100vw, 684px" /></a></li>
</ol>
<h2>Configuring the OneDrive Connector</h2>
<ol>
<li>Use a preinstalled OneDrive Connector from the Popular Connector List or press the Search Online radio button to download OneDrive Connector. Once downloaded simply use it in the configuration:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10851" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough.png" alt="ssis onedrive template selection walkthrough" width="783" height="719" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough.png 783w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough-300x275.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-template-selection-onedrive-walkthrough-768x705.png 768w" sizes="(max-width: 783px) 100vw, 783px" /></a></li>
<li>Proceed with selecting the desired Authentication Type. Then select API Base URL (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed.</li>
<li>After configuring all the required properties in the API Connection Manager, please click on the &#8220;Test Connection&#8221; button to confirm that the connection is established successfully.<br />
<h3>Method1: Connect to OneDrive using User Credentials [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/onedrive-connector/help/authentication/UserCreds"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10850" style="width: 755px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10850" class="wp-image-10850 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials.png" alt="SSIS API Source - Generate Token - OneDrive with User Credentials" width="745" height="784" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials.png 745w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-generate-token-user-credentials-285x300.png 285w" sizes="(max-width: 745px) 100vw, 745px" /></a><p id="caption-attachment-10850" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; OneDrive with User Credentials</p></div>
<h3>Method2: Connect to OneDrive using Application Credentials [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/onedrive-connector/help/authentication/AppCreds"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10849" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10849" class="size-full wp-image-10849" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token.png" alt="SSIS API Source - Generate Token - OneDrive with Application Credentials" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-application-creds-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10849" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; OneDrive with Application Credentials</p></div></li>
</ol>
<h2>How to upload a local file to OneDrive</h2>
<p>In the API Source Component, we&#8217;ve chosen the API Connection Manager. Next, we need to configure the remaining properties of the component to upload a local file to OneDrive.</p>
<ol>
<li>Choose the <strong>Upload file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>Select the desired Drive ID from the <strong>DriveId</strong> drop-down.</li>
<li>Specify the desired source file path for the file being uploaded by setting the <strong>SourceFilePath</strong> parameter.</li>
<li>Specify the desired Target Path by setting the <strong>TargetFilePath</strong> parameter.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div id="attachment_10852" style="width: 685px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10852" class="size-full wp-image-10852" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-upload.png" alt="SSIS API Source - OneDrive - Upload Single File" width="675" height="808" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-upload.png 675w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-single-file-upload-251x300.png 251w" sizes="(max-width: 675px) 100vw, 675px" /></a><p id="caption-attachment-10852" class="wp-caption-text">SSIS API Source &#8211; OneDrive &#8211; Upload Single File</p></div>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call. With just a few clicks, we have successfully configured the call to OneDrive using the <strong>ZappySys OneDrive Connector</strong> for uploading a local file to OneDrive.</p>
<h2>How to upload multiple files to OneDrive</h2>
<p>In the API Source Component, we&#8217;ve selected the API Connection Manager. Next, we need to configure the remaining properties of the component to upload multiple files to OneDrive. Additionally, we should utilize a Foreach Loop Container to iterate through each file one by one in a loop.</p>
<ol>
<li>Create 3 SSIS variables as described below.<br />
<table border="1">
<tbody>
<tr>
<th>Variable Name</th>
<th>Datatype</th>
<th>Value</th>
</tr>
<tr>
<td>varFileLists</td>
<td>Object</td>
<td>System.Object</td>
</tr>
<tr>
<td>varFileName</td>
<td>String</td>
<td>fake.extension</td>
</tr>
<tr>
<td>varFullFilePath</td>
<td>String</td>
<td>C:/fake/fake.extension</td>
</tr>
</tbody>
</table>
</li>
<li>Go to Control Flow, From the SSIS toolbox drag and drop <strong>ZS Advanced File System Task</strong> on the control flow designer surface, and double click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10363" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop.png" alt="SSIS Advanced File System Task - Drag &amp; Drop" width="580" height="241" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop.png 580w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop-300x125.png 300w" sizes="(max-width: 580px) 100vw, 580px" /></a></li>
<li>Select the &#8220;Get file list as ADO.NET Data Table&#8221; action from the Action drop-down menu. Set the file path in the Path textbox. Choose the variable (Object type) where you want to store the file list, and then click the OK button to save the settings.
<div id="attachment_10364" style="width: 722px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10364" class="size-full wp-image-10364" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable.png" alt="SSIS Advanced File System Task - Get file list as ADO.net Data Table" width="712" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable.png 712w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable-300x263.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-10364" class="wp-caption-text">SSIS Advanced File System Task &#8211; Get file list as ADO.net Data Table</p></div></li>
<li>Now, drag and drop the &#8220;Foreach Loop Container&#8221; from the SSIS Toolbox and connect it with the &#8220;ZS Advanced File System Task.&#8221; Double-click on the &#8220;Foreach Loop Container&#8221; to edit its properties.
<div id="attachment_10365" style="width: 750px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10365" class="size-full wp-image-10365" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive.png" alt="SSIS Foreach Loop Container - Drag &amp; Drop" width="740" height="531" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive.png 740w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive-300x215.png 300w" sizes="(max-width: 740px) 100vw, 740px" /></a><p id="caption-attachment-10365" class="wp-caption-text">SSIS Foreach Loop Container &#8211; Drag &amp; Drop</p></div></li>
<li>In the Foreach Loop Editor&#8217;s &#8220;Collection&#8221; tab, choose the Enumerator as &#8220;Foreach ADO Enumerator.&#8221; In the &#8220;ADO object source variable&#8221; field, select your SSIS object-typed variable. Select the &#8220;Rows in the first table&#8221; radio option.
<div id="attachment_10371" style="width: 747px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10371" class="size-full wp-image-10371" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration.png" alt="SSIS Foreach Loop Editor - Collection - Select Variable &amp; Enumeration mode" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration.png 737w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration-300x257.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-10371" class="wp-caption-text">SSIS Foreach Loop Editor &#8211; Collection &#8211; Select Variable &amp; Enumeration mode</p></div></li>
<li>In the Foreach Loop Editor&#8217;s &#8220;Variable Mappings&#8221; tab, select the variables that you want to map to the values from the collection, and then click the &#8220;OK&#8221; button to save your selections.
<div id="attachment_10370" style="width: 747px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10370" class="size-full wp-image-10370" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings.png" alt="SSIS Foreach Loop Editor - Variable Mappings tab" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings.png 737w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings-300x257.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-10370" class="wp-caption-text">SSIS Foreach Loop Editor &#8211; Variable Mappings</p></div></li>
<li>Inside the Foreach Loop Container, drag and drop the Data Flow Task, and then rename it according to your preference.
<div id="attachment_10854" style="width: 830px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-dataflow-task-inside-foreachloop-container-multiplefiles-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10854" class="size-full wp-image-10854" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-dataflow-task-inside-foreachloop-container-multiplefiles-upload.png" alt="SSIS Data Flow Task - Drag &amp; Drop inside Foreach Loop Container" width="820" height="428" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-dataflow-task-inside-foreachloop-container-multiplefiles-upload.png 820w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-dataflow-task-inside-foreachloop-container-multiplefiles-upload-300x157.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-dataflow-task-inside-foreachloop-container-multiplefiles-upload-768x401.png 768w" sizes="(max-width: 820px) 100vw, 820px" /></a><p id="caption-attachment-10854" class="wp-caption-text">SSIS Data Flow Task &#8211; Drag &amp; Drop inside Foreach Loop Container</p></div></li>
<li>Double-click on the Data Flow Task to see the Data Flow Designer, From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double-click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="SSIS API Source - Drag &amp; Drop" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Double-click on the <strong>API Source</strong> component to configure it for uploading multiple files to OneDrive.
<ol style="list-style-type: lower-alpha;">
<li>Choose the <strong>Upload file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>Please specify the desired SSIS Variable [varFileName] containing the uploaded file name by setting the <strong>TargetFilePath</strong> parameter.</li>
<li>To specify the desired local SSIS variable [varFullFilePath], which holds the file path, set the <strong>SourceFilePath</strong> parameter.<br />
When configuring the SSIS variable directly in the Raw Edit, JSON may become invalid due to the requirement of slashes within the local file path. To address this, we use a JSONENC Placeholder Function for proper escaping.<br />
<pre class="crayon-plain-tag">&lt;&lt;{{User::varUserFullFilePath}},FUN_JSONENC&gt;&gt;</pre></li>
<li>If you wish to upload the local file to a specific folder in OneDrive, please set the folderName in the <strong>TargetFilePath </strong>parameter.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div id="attachment_10857" style="width: 833px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-multiple-files-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10857" class="size-full wp-image-10857" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-multiple-files-upload.png" alt="SSIS API Source - OneDrive - Upload Multiple files configuration" width="823" height="619" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-multiple-files-upload.png 823w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-multiple-files-upload-300x226.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-api-source-onedrive-multiple-files-upload-768x578.png 768w" sizes="(max-width: 823px) 100vw, 823px" /></a><p id="caption-attachment-10857" class="wp-caption-text">SSIS API Source &#8211; OneDrive &#8211; Upload Multiple files configuration</p></div>
<p>To configure dynamic filenames and file paths, you can set variables. Click on &#8220;Raw Edit,&#8221; and in the &#8220;Edit Parameters&#8221; popup, you can use SSIS variables, as shown in the above image.</p>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call.<br />
After that, you can execute the SSIS Package and check the execution to upload multiple files on OneDrive. Below is the sample screenshot attached.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-uploaded-multiple-files-onedrive.png"><img loading="lazy" decoding="async" class="size-medium_large wp-image-10859" src="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-uploaded-multiple-files-onedrive-768x274.png" alt="Multiple files uploaded on OneDrive using SSIS" width="720" height="257" srcset="https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-uploaded-multiple-files-onedrive-768x274.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-uploaded-multiple-files-onedrive-300x107.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-uploaded-multiple-files-onedrive-1024x365.png 1024w, https://zappysys.com/blog/wp-content/uploads/2023/12/ssis-uploaded-multiple-files-onedrive.png 1317w" sizes="(max-width: 720px) 100vw, 720px" /></a><br />
<span style="font-size: 14px;">Multiple files uploaded on OneDrive using SSIS</span></p>
<p>With just a few clicks, we have successfully configured the call to OneDrive using the <strong>ZappySys OneDrive Connector</strong> for uploading multiple files to OneDrive.</li>
</ol>
<h2>Conclusion</h2>
<p>In this blog, we learned how to connect with OneDrive using SSIS API Connection Manager and upload single or multiple files to OneDrive using a combination of SSIS components, including the <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source component</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/">SSIS ZS Advanced File System Task</a>, Foreach Loop Container, and SSIS variables.</p>
<p>The post <a href="https://zappysys.com/blog/upload-files-onedrive-using-ssis/">How to upload files on OneDrive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to download files from Google Drive using SSIS</title>
		<link>https://zappysys.com/blog/download-files-google-drive-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sun, 05 Nov 2023 10:28:32 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[Google APIs]]></category>
		<category><![CDATA[Google Drive]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS API Destination]]></category>
		<category><![CDATA[SSIS Google Drive Connector]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10649</guid>

					<description><![CDATA[<p>Introduction In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate Google Drive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful Google Drive Connector that [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/download-files-google-drive-using-ssis/">How to download files from Google Drive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo.png"><img loading="lazy" decoding="async" class="alignleft wp-image-11097" src="https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo-150x150.png" alt="" width="106" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo-300x284.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo-768x727.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo.png 980w" sizes="(max-width: 106px) 100vw, 106px" /></a>In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate Google Drive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful <a href="https://zappysys.com/api/integration-hub/google-drive-connector/">Google Drive Connector</a> that makes downloading files from Google Drive a breeze. In this guide, we&#8217;ll walk you through the process of downloading files from Google Drive using SSIS and the <a href="https://zappysys.com/api/integration-hub/google-drive-connector/ssis">ZappySys SSIS PowerPack Google Drive Connector</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>Download files from Google Drive with SSIS:</h2>
<p>In this section, we will learn how to configure and use Google Drive Connector in the API Source &amp; API Destination to download files from Google Drive.</p>
<ol>
<li>Begin with opening Visual Studio and Creating a New Project.</li>
<li>Select Integration Service Project and in the new project window set the appropriate name and location for the project. Click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol style="list-style-type: lower-alpha;">
<li>SSIS ToolBox on the left sidebar</li>
<li>Solution Explorer and Property Window on the right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window at the bottom</li>
</ol>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox.png">-`<img loading="lazy" decoding="async" class="alignnone wp-image-10258" src="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png" alt="zappysys ssis project with toolbox" width="700" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png 1024w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-768x490.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox.png 1287w" sizes="(max-width: 700px) 100vw, 700px" /></a><br />
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in the SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div></div></li>
<li>Now, Drag and Drop the SSIS Data Flow Task from the SSIS Toolbox. Double-click on the Data Flow Task to see the Data Flow Designer.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10260" src="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double-click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10263" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png" alt="" width="684" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png 684w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection-300x282.png 300w" sizes="(max-width: 684px) 100vw, 684px" /></a></li>
</ol>
<h2>Configuring the Google Drive Connector</h2>
<ol>
<li>Use a preinstalled Google Drive Connector from the Popular Connector List or press the Search Online radio button to download Google Drive Connector. Once downloaded simply use it in the configuration:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10354" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough.png" alt="ssis googledrive template selection walkthrough" width="781" height="686" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough.png 781w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough-300x264.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough-768x675.png 768w" sizes="(max-width: 781px) 100vw, 781px" /></a></li>
<li>Proceed with selecting the desired Authentication Type. Then select API Base URL (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed.</li>
<li>After configuring all the required properties in the API Connection Manager, please click on the &#8220;Test Connection&#8221; button to confirm that the connection is established successfully.<br />
<h3>Method1: Connect to Google Drive using User Account [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/google-drive-connector/help/authentication/OAuth"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10355" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10355" class="size-full wp-image-10355" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token.png" alt="SSIS API Source - Generate Token - Google Drive with User Account" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10355" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; Google Drive with User Account</p></div>
<h3>Method2: Connect to Google Drive using Service Account [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/google-drive-connector/help/authentication/ServiceAccount"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10353" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10353" class="size-full wp-image-10353" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token.png" alt="SSIS API Source - Generate Token - Google Drive with Service Account" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10353" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; Google Drive with Service Account</p></div></li>
</ol>
<h2>How to download a single file from Google Drive</h2>
<p>In the API Source Component, we&#8217;ve chosen the API Connection Manager. Next, we need to configure the remaining properties of the component to download the single file from Google Drive.</p>
<ol>
<li>Choose the <strong>Download a file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>To access detailed API documentation for downloading files, you can click on the following link: <a href="https://developers.google.com/drive/api/reference/rest/v3/files/get"><strong>Help for: Download a File</strong></a>.</li>
<li>Please choose a File ID from the drop-down menu to indicate which file you wish to download. This is an essential parameter for the download process.</li>
<li>Please indicate the desired filename for the file being downloaded by setting the <strong>FileName</strong> parameter.</li>
<li>If you intend to replace the local file with the one being downloaded, please select the &#8216;<strong>AlwaysOverwrite</strong>&#8216; option from the dropdown menu labeled &#8216;<strong>FileOverwriteMode</strong>&#8216;. Alternatively, you can choose &#8216;FileIfExists&#8217; or &#8216;SkipIfExists&#8217; based on your specific needs.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div id="attachment_10690" style="width: 896px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-source-googledrive-single-file-download.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10690" class="wp-image-10690 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-source-googledrive-single-file-download.png" alt="SSIS API Source - Google Drive - Download Single File" width="886" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-source-googledrive-single-file-download.png 886w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-source-googledrive-single-file-download-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-source-googledrive-single-file-download-768x523.png 768w" sizes="(max-width: 886px) 100vw, 886px" /></a><p id="caption-attachment-10690" class="wp-caption-text">SSIS API Source &#8211; Google Drive &#8211; Download Single File</p></div>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call. With just a few clicks, we have successfully configured the call to Google Drive using the <strong>ZappySys Google Drive Connector</strong> for downloading a Single file from Google Drive.</p>
<h2>How to download multiple files from Google Drive</h2>
<p>In the API Destination Component, we have chosen the API Connection Manager. Now, we must proceed to configure the remaining properties of the component to facilitate the download of multiple files from Google Drive. Additionally, we should make use of an OLE DB Source and Derived Column component to map the files for the download process.</p>
<ol>
<li>Drag and drop the OLE DB Source Component from the SSIS Toolbox. Double-click on the OLE DB Source Component to initiate its configuration.
<div id="attachment_7289" style="width: 515px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7289" class="wp-image-7289 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png" alt="OLE DB Source - Drag and Drop" width="505" height="190" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop.png 505w, https://zappysys.com/blog/wp-content/uploads/2019/06/oledb-source-drag-and-drop-300x113.png 300w" sizes="(max-width: 505px) 100vw, 505px" /></a><p id="caption-attachment-7289" class="wp-caption-text">OLE DB Source &#8211; Drag and Drop</p></div></li>
<li>Create a new OLE DB Connection Manager and configure your SQL Server settings for the connection. Next, select the Data access mode, specify the name of the table or view, or write an SQL Command. Afterward, click on the &#8216;Preview&#8217; button to view a preview and check the &#8216;Columns&#8217; tab for the source columns.
<div id="attachment_10693" style="width: 835px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-oledb-source-read-googledrive-filesdata-sql.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10693" class="size-full wp-image-10693" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-oledb-source-read-googledrive-filesdata-sql.png" alt="SSIS OLE DB Source - Configure SQL Connection and fetch the table data" width="825" height="717" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-oledb-source-read-googledrive-filesdata-sql.png 825w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-oledb-source-read-googledrive-filesdata-sql-300x261.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-oledb-source-read-googledrive-filesdata-sql-768x667.png 768w" sizes="(max-width: 825px) 100vw, 825px" /></a><p id="caption-attachment-10693" class="wp-caption-text">SSIS OLE DB Source &#8211; Configure SQL Connection and fetch the table data</p></div></li>
<li>Next, drag and drop the Derived Column Component from the SSIS Toolbox. Double-click on the Derived Column Component to begin its configuration.
<div id="attachment_10219" style="width: 503px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10219" class="size-full wp-image-10219" src="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png" alt="Drag and drop the Derived Column" width="493" height="345" srcset="https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column.png 493w, https://zappysys.com/blog/wp-content/uploads/2020/12/ssis-drag-and-drop-derived-column-300x210.png 300w" sizes="(max-width: 493px) 100vw, 493px" /></a><p id="caption-attachment-10219" class="wp-caption-text">Drag and drop the Derived Column</p></div></li>
<li>Now, add a new Derived Column by setting the expression to concatenate FilePath and FileName. Click &#8216;OK&#8217; to save the configuration.
<div id="attachment_10695" style="width: 869px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-derived-column-add-newcolumn-set-expression.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10695" class="wp-image-10695 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-derived-column-add-newcolumn-set-expression.png" alt="SSIS Derived Column - Add New Column &amp; Set Expression" width="859" height="622" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-derived-column-add-newcolumn-set-expression.png 859w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-derived-column-add-newcolumn-set-expression-300x217.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-derived-column-add-newcolumn-set-expression-768x556.png 768w" sizes="(max-width: 859px) 100vw, 859px" /></a><p id="caption-attachment-10695" class="wp-caption-text">SSIS Derived Column &#8211; Add New Column &amp; Set Expression</p></div></li>
<li>Now, drag and drop the API Destination Component from the SSIS Toolbox. Double-click on the API Destination Component to begin its configuration.
<div id="attachment_10697" style="width: 879px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10697" class="wp-image-10697 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png" alt="Drag and Drop the SSIS API Destination Component" width="869" height="548" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop.png 869w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-drag-and-drop-768x484.png 768w" sizes="(max-width: 869px) 100vw, 869px" /></a><p id="caption-attachment-10697" class="wp-caption-text">Drag and Drop the SSIS API Destination Component</p></div></li>
<li>Double-click on the <strong>API Destination</strong> component to configure it for uploading multiple files to Google Drive.
<ol style="list-style-type: lower-alpha;">
<li>Choose the <strong>Download a file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>To access detailed API documentation for downloading files, you can click on the following link: <a href="https://developers.google.com/drive/api/reference/rest/v3/files/get"><strong>Help for: Download File</strong></a>.</li>
<li>Please specify the &#8216;FileOverwriteMode&#8217; option as &#8216;AlwaysOverwrite,&#8217; or you can choose &#8216;FailIfExists&#8217; or &#8216;SkipIfExists&#8217; options based on your requirements.<br />
Please refer to the sample screenshot below.</p>
<div id="attachment_10700" style="width: 816px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-settingstab-download-multiplefile.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10700" class="wp-image-10700 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-settingstab-download-multiplefile.png" alt="SSIS API Destination Component - Configure Settings Tab" width="806" height="669" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-settingstab-download-multiplefile.png 806w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-settingstab-download-multiplefile-300x249.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-settingstab-download-multiplefile-768x637.png 768w" sizes="(max-width: 806px) 100vw, 806px" /></a><p id="caption-attachment-10700" class="wp-caption-text">SSIS API Destination Component &#8211; Configure Settings Tab</p></div></li>
<li>Now, go to the Mappings tab and specify the source columns with the corresponding target properties.<br />
Note: Here We&#8217;re mapping FileID with $$Id and FileNameWithPath with $$ResponseDataFile. You can create mappings based on your Source columns<br />
Please refer to the sample screenshot below</p>
<div id="attachment_10699" style="width: 646px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-mappingstab-download-multiplefile.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10699" class="wp-image-10699 size-full" src="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-mappingstab-download-multiplefile.png" alt="SSIS API Destination Component - Configure Mappings Tab" width="636" height="442" srcset="https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-mappingstab-download-multiplefile.png 636w, https://zappysys.com/blog/wp-content/uploads/2023/10/ssis-api-destination-configure-mappingstab-download-multiplefile-300x208.png 300w" sizes="(max-width: 636px) 100vw, 636px" /></a><p id="caption-attachment-10699" class="wp-caption-text">SSIS API Destination Component &#8211; Configure Mappings Tab</p></div></li>
</ol>
</li>
<li>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button from the Settings tab to initiate the API call. With just a few clicks, we have successfully configured the call to Google Drive using the ZappySys Google Drive Connector for downloading multiple files from Google Drive.<br />
Please refer to the sample screenshot below.</p>
<div id="attachment_10705" style="width: 1191px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/11/ssis-api-destination-download-multiplefiles-success.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10705" class="size-full wp-image-10705" src="https://zappysys.com/blog/wp-content/uploads/2023/11/ssis-api-destination-download-multiplefiles-success.png" alt="Download Multiple files from Google Drive" width="1181" height="381" srcset="https://zappysys.com/blog/wp-content/uploads/2023/11/ssis-api-destination-download-multiplefiles-success.png 1181w, https://zappysys.com/blog/wp-content/uploads/2023/11/ssis-api-destination-download-multiplefiles-success-300x97.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/11/ssis-api-destination-download-multiplefiles-success-768x248.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/11/ssis-api-destination-download-multiplefiles-success-1024x330.png 1024w" sizes="(max-width: 1181px) 100vw, 1181px" /></a><p id="caption-attachment-10705" class="wp-caption-text">Download Multiple files from Google Drive</p></div></li>
</ol>
<h2>Conclusion</h2>
<p>In this blog, we learned how to connect with Google Drive using SSIS API Connection Manager and download single or multiple files from Google Drive using a combination of SSIS components, including the <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source component</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/">SSIS API Destination component</a>, OLE DB Source component, and Derived Column component.</p>
<p>The post <a href="https://zappysys.com/blog/download-files-google-drive-using-ssis/">How to download files from Google Drive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to upload files on Google Drive using SSIS</title>
		<link>https://zappysys.com/blog/upload-files-google-drive-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 07 Sep 2023 12:18:50 +0000</pubDate>
				<category><![CDATA[Google API]]></category>
		<category><![CDATA[SSIS API Source]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[Foreach Loop Container]]></category>
		<category><![CDATA[google api]]></category>
		<category><![CDATA[Google Drive]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[ssis advanced file system task]]></category>
		<category><![CDATA[upload files]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=10255</guid>

					<description><![CDATA[<p>Introduction In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate Google Drive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful Google Drive Connector that [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/upload-files-google-drive-using-ssis/">How to upload files on Google Drive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><strong>Introduction</strong></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo.png"><img loading="lazy" decoding="async" class="alignleft wp-image-11097" src="https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo-300x284.png" alt="" width="106" height="100" srcset="https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo-300x284.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo-768x727.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/11/google_drive_logo.png 980w" sizes="(max-width: 106px) 100vw, 106px" /></a>In today&#8217;s data-driven world, the ability to seamlessly integrate and transfer files between different platforms is crucial for efficient business operations. If you&#8217;re a user of SQL Server Integration Services (SSIS) and looking to integrate Google Drive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful <a href="https://zappysys.com/api/integration-hub/google-drive-connector/">Google Drive Connector</a> that makes uploading files to Google Drive a breeze. In this guide, we&#8217;ll walk you through the process of uploading files to Google Drive using SSIS and the <a href="https://zappysys.com/api/integration-hub/google-drive-connector/ssis">ZappySys SSIS PowerPack Google Drive Connector</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>Upload files to Google Drive with SSIS:</h2>
<p>In this section, we will learn how to configure and use Google Drive Connector in the API Source to upload files on Google Drive.</p>
<ol>
<li>Begin with opening Visual Studio and Creating a New Project.</li>
<li>Select Integration Service Project and in the new project window set the appropriate name and location for the project. Click OK.</li>
<li>In the new SSIS project screen you will find the following:
<ol style="list-style-type: lower-alpha;">
<li>SSIS ToolBox on the left sidebar</li>
<li>Solution Explorer and Property Window on the right bar</li>
<li>Control flow, data flow, event Handlers, Package Explorer in tab windows</li>
<li>Connection Manager Window at the bottom</li>
</ol>
<div id="attachment_10258" style="width: 710px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/upload-files-google-drive-using-ssis/zappysys-ssis-project-with-toolbox/#main"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10258" class="wp-image-10258" src="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png" alt="zappysys ssis project with toolbox" width="700" height="447" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-1024x653.png 1024w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-300x191.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox-768x490.png 768w, https://zappysys.com/blog/wp-content/uploads/2023/08/zappysys-ssis-project-with-toolbox.png 1287w" sizes="(max-width: 700px) 100vw, 700px" /></a><p id="caption-attachment-10258" class="wp-caption-text">SSIS Toolbox &#8211; ZappySys Tasks</p></div>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff7b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE</strong>: If you don&#8217;t see ZappySys SSIS PowerPack Task or Components in the SSIS Toolbox, please refer to <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004935754-I-don-t-see-PowerPack-components-in-SSIS-Toolbox">this help link</a>.</div></div></li>
<li>Now, Drag and Drop the SSIS Data Flow Task from the SSIS Toolbox. Double-click on the Data Flow Task to see the Data Flow Designer.<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10260" src="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png" alt="" width="460" height="155" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task.png 460w, https://zappysys.com/blog/wp-content/uploads/2023/08/drag-and-drop-data-flow-task-300x101.png 300w" sizes="(max-width: 460px) 100vw, 460px" /></a></li>
<li>From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double-click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Select <strong>New Connection</strong> to create a new connection:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10263" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png" alt="" width="684" height="643" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection.png 684w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-new-connection-300x282.png 300w" sizes="(max-width: 684px) 100vw, 684px" /></a></li>
</ol>
<h2>Configuring the Google Drive Connector</h2>
<ol>
<li>Use a preinstalled Google Drive Connector from the Popular Connector List or press the Search Online radio button to download Google Drive Connector. Once downloaded simply use it in the configuration:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10354" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough.png" alt="ssis googledrive template selection walkthrough" width="781" height="686" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough.png 781w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough-300x264.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-template-selection-googledrive-walkthrough-768x675.png 768w" sizes="(max-width: 781px) 100vw, 781px" /></a></li>
<li>Proceed with selecting the desired Authentication Type. Then select API Base URL (in most cases default one is the right one). Finally, fill in all the required parameters and set optional parameters if needed.</li>
<li>After configuring all the required properties in the API Connection Manager, please click on the &#8220;Test Connection&#8221; button to confirm that the connection is established successfully.<br />
<h3>Method1: Connect to Google Drive using User Account [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/google-drive-connector/help/authentication/OAuth"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10355" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10355" class="size-full wp-image-10355" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token.png" alt="SSIS API Source - Generate Token - Google Drive with User Account" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10355" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; Google Drive with User Account</p></div>
<h3>Method2: Connect to Google Drive using Service Account [OAuth]</h3>
<p>You may press a link <a href="https://zappysys.com/api/integration-hub/google-drive-connector/help/authentication/ServiceAccount"><strong>Steps to Configure</strong></a> which will help set certain parameters.</p>
<div id="attachment_10353" style="width: 876px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10353" class="size-full wp-image-10353" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token.png" alt="SSIS API Source - Generate Token - Google Drive with Service Account" width="866" height="773" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token.png 866w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token-300x268.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-serviceaccount-generate-token-768x686.png 768w" sizes="(max-width: 866px) 100vw, 866px" /></a><p id="caption-attachment-10353" class="wp-caption-text">SSIS API Source &#8211; Generate Token &#8211; Google Drive with Service Account</p></div></li>
</ol>
<h2>How to upload a local file to Google Drive</h2>
<p>In the API Source Component, we&#8217;ve chosen the API Connection Manager. Next, we need to configure the remaining properties of the component to upload a local file to Google Drive.</p>
<ol>
<li>Choose the <strong>Upload a file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>To access detailed API documentation for uploading files, you can click on the following link: <a href="https://developers.google.com/drive/api/reference/rest/v3/files/create"><strong>Help for: Upload File</strong></a>.</li>
<li>Please specify the desired filename for the uploaded file by setting the <strong>FileName</strong> parameter.</li>
<li>Specify the desired local file path by setting the <strong>DiskFilePath</strong> parameter.</li>
<li>If you wish to upload the local file to a specific folder in Google Drive, please choose the folder ID from the dropdown menu labeled <strong>ParentFolderId</strong>. Otherwise, you can skip this parameter as it&#8217;s optional.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div id="attachment_10357" style="width: 896px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-single-file-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10357" class="size-full wp-image-10357" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-single-file-upload.png" alt="SSIS API Source - Google Drive - Upload Single File" width="886" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-single-file-upload.png 886w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-single-file-upload-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-single-file-upload-768x523.png 768w" sizes="(max-width: 886px) 100vw, 886px" /></a><p id="caption-attachment-10357" class="wp-caption-text">SSIS API Source &#8211; Google Drive &#8211; Upload Single File</p></div>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call. With just a few clicks, we have successfully configured the call to Google Drive using the <strong>ZappySys Google Drive Connector</strong> for uploading a local file to Google Drive.</p>
<h2>How to upload multiple files to Google Drive</h2>
<p>In the API Source Component, we&#8217;ve selected the API Connection Manager. Next, we need to configure the remaining properties of the component to upload multiple files to Google Drive. Additionally, we should utilize a Foreach Loop Container to iterate through each file one by one in a loop.</p>
<ol>
<li>Create 3 SSIS variables as described below.<br />
<table border="1">
<tbody>
<tr>
<th>Variable Name</th>
<th>Datatype</th>
<th>Value</th>
</tr>
<tr>
<td>varFileLists</td>
<td>Object</td>
<td>System.Object</td>
</tr>
<tr>
<td>varFileName</td>
<td>String</td>
<td>fake.extension</td>
</tr>
<tr>
<td>varFullFilePath</td>
<td>String</td>
<td>C:/fake/fake.extension</td>
</tr>
</tbody>
</table>
</li>
<li>Go to Control Flow, From the SSIS toolbox drag and drop <strong>ZS Advanced File System Task</strong> on the control flow designer surface, and double click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop.png"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10363" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop.png" alt="SSIS Advanced File System Task - Drag &amp; Drop" width="580" height="241" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop.png 580w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-drag-and-drop-300x125.png 300w" sizes="(max-width: 580px) 100vw, 580px" /></a></li>
<li>Select the &#8220;Get file list as ADO.NET Data Table&#8221; action from the Action drop-down menu. Set the file path in the Path textbox. Choose the variable (Object type) where you want to store the file list, and then click the OK button to save the settings.
<div id="attachment_10364" style="width: 722px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10364" class="size-full wp-image-10364" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable.png" alt="SSIS Advanced File System Task - Get file list as ADO.net Data Table" width="712" height="623" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable.png 712w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-advanced-file-system-task-store-filelists-adotable-in-object-variable-300x263.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-10364" class="wp-caption-text">SSIS Advanced File System Task &#8211; Get file list as ADO.net Data Table</p></div></li>
<li>Now, drag and drop the &#8220;Foreach Loop Container&#8221; from the SSIS Toolbox and connect it with the &#8220;ZS Advanced File System Task.&#8221; Double-click on the &#8220;Foreach Loop Container&#8221; to edit its properties.
<div id="attachment_10365" style="width: 750px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10365" class="size-full wp-image-10365" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive.png" alt="SSIS Foreach Loop Container - Drag &amp; Drop" width="740" height="531" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive.png 740w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-foreach-loop-container-drag-and-drop-googledrive-300x215.png 300w" sizes="(max-width: 740px) 100vw, 740px" /></a><p id="caption-attachment-10365" class="wp-caption-text">SSIS Foreach Loop Container &#8211; Drag &amp; Drop</p></div></li>
<li>In the Foreach Loop Editor&#8217;s &#8220;Collection&#8221; tab, choose the Enumerator as &#8220;Foreach ADO Enumerator.&#8221; In the &#8220;ADO object source variable&#8221; field, select your SSIS object-typed variable. Select the &#8220;Rows in the first table&#8221; radio option.
<div id="attachment_10371" style="width: 747px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10371" class="size-full wp-image-10371" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration.png" alt="SSIS Foreach Loop Editor - Collection - Select Variable &amp; Enumeration mode" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration.png 737w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-collection-tab-configuration-300x257.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-10371" class="wp-caption-text">SSIS Foreach Loop Editor &#8211; Collection &#8211; Select Variable &amp; Enumeration mode</p></div></li>
<li>In the Foreach Loop Editor&#8217;s &#8220;Variable Mappings&#8221; tab, select the variables that you want to map to the values from the collection, and then click the &#8220;OK&#8221; button to save your selections.
<div id="attachment_10370" style="width: 747px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10370" class="size-full wp-image-10370" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings.png" alt="SSIS Foreach Loop Editor - Variable Mappings tab" width="737" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings.png 737w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-googledrive-multiplefiles-upload-foreach-loop-editor-variablemappings-300x257.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-10370" class="wp-caption-text">SSIS Foreach Loop Editor &#8211; Variable Mappings</p></div></li>
<li>Inside the Foreach Loop Container, drag and drop the Data Flow Task, and then rename it according to your preference.
<div id="attachment_10374" style="width: 716px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-dataflow-task-inside-foreachloop-container-googledrive-multiplefiles-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10374" class="size-full wp-image-10374" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-dataflow-task-inside-foreachloop-container-googledrive-multiplefiles-upload.png" alt="SSIS Data Flow Task - Drag &amp; Drop inside Foreach Loop Container" width="706" height="420" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-dataflow-task-inside-foreachloop-container-googledrive-multiplefiles-upload.png 706w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-dataflow-task-inside-foreachloop-container-googledrive-multiplefiles-upload-300x178.png 300w" sizes="(max-width: 706px) 100vw, 706px" /></a><p id="caption-attachment-10374" class="wp-caption-text">SSIS Data Flow Task &#8211; Drag &amp; Drop inside Foreach Loop Container</p></div></li>
<li>Double-click on the Data Flow Task to see the Data Flow Designer, From the SSIS toolbox drag and drop API Source (Predefined Templates) on the data flow designer surface, and double click on it to edit it:<br />
<a href="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg"><img loading="lazy" decoding="async" class="alignnone size-full wp-image-10262" src="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg" alt="SSIS API Source - Drag &amp; Drop" width="659" height="292" srcset="https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop.jpg 659w, https://zappysys.com/blog/wp-content/uploads/2023/08/ssis-api-source-drag-and-drop-300x133.jpg 300w" sizes="(max-width: 659px) 100vw, 659px" /></a></li>
<li>Double-click on the <strong>API Source</strong> component to configure it for uploading multiple files to Google Drive.
<ol style="list-style-type: lower-alpha;">
<li>Choose the <strong>Upload a file</strong> endpoint from the &#8220;Select Table/Endpoint&#8221; dropdown menu.</li>
<li>To access detailed API documentation for uploading files, you can click on the following link: <a href="https://developers.google.com/drive/api/reference/rest/v3/files/create"><strong>Help for: Upload File</strong></a>.</li>
<li>Please specify the desired SSIS Variable [varFileName] which contains file name for the uploaded file by setting the <strong>FileName</strong> parameter.</li>
<li>To specify the desired local SSIS variable [varFullFilePath], which holds the file path, set the <strong>DiskFilePath</strong> parameter.<br />
When configuring the SSIS variable directly in the Raw Edit, JSON may become invalid due to the requirement of slashes within the local file path. To address this, we use a JSONENC Placeholder Function for proper escaping.<br />
<pre class="crayon-plain-tag">&lt;&lt;{{User::varUserFullFilePath}},FUN_JSONENC&gt;&gt;</pre></li>
<li>If you wish to upload the local file to a specific folder in Google Drive, please choose the folder ID from the dropdown menu labeled <strong>ParentFolderId</strong>. Otherwise, you can skip this parameter as it&#8217;s optional.</li>
</ol>
<p>Please refer to the sample screenshot below.</p>
<div id="attachment_10369" style="width: 896px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-multiple-files-upload.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10369" class="size-full wp-image-10369" src="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-multiple-files-upload.png" alt="SSIS API Source - Google Drive - Upload Multiple files - configuration" width="886" height="603" srcset="https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-multiple-files-upload.png 886w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-multiple-files-upload-300x204.png 300w, https://zappysys.com/blog/wp-content/uploads/2023/09/ssis-api-source-googledrive-multiple-files-upload-768x523.png 768w" sizes="(max-width: 886px) 100vw, 886px" /></a><p id="caption-attachment-10369" class="wp-caption-text">SSIS API Source &#8211; Google Drive &#8211; Upload Multiple files configuration</p></div>
<p>To configure dynamic filenames and file paths, you can set variables. Click on &#8220;Raw Edit,&#8221; and in the &#8220;Edit Parameters&#8221; popup, you can use SSIS variables, as shown in the image below.</p>
<p>Once you have configured all the mentioned properties above, please click on the &#8220;Preview Data&#8221; button to initiate the API call. With just a few clicks, we have successfully configured the call to Google Drive using the <strong>ZappySys Google Drive Connector</strong> for uploading multiple files to Google Drive.</li>
</ol>
<h2>Conclusion</h2>
<p>In this blog, we learned how to connect with Google Drive using SSIS API Connection Manager and upload single or multiple files to Google Drive using a combination of SSIS components, including the <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/">SSIS API Source component</a>, <a href="https://zappysys.com/products/ssis-powerpack/ssis-file-system-task-advanced/">SSIS ZS Advanced File System Task</a>, Foreach Loop Container, and SSIS variables.</p>
<p>The post <a href="https://zappysys.com/blog/upload-files-google-drive-using-ssis/">How to upload files on Google Drive using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Monitor, Run SSIS Package using Stored procedure / T-SQL</title>
		<link>https://zappysys.com/blog/monitor-run-ssis-package-using-stored-procedure-t-sql/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 10 May 2018 04:14:08 +0000</pubDate>
				<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=3460</guid>

					<description><![CDATA[<p>Introduction In this post, you will learn how to Monitor and Run SSIS Package using Stored Procedure (T-SQL Code) &#8211; Packages stored in SSIS Catalog.  Calling SSIS Packages via T-SQL / Stored procedure code can be useful if you want to trigger SSIS package execution from your SQL code on certain conditions (i.e. Load data [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/monitor-run-ssis-package-using-stored-procedure-t-sql/">Monitor, Run SSIS Package using Stored procedure / T-SQL</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p>In this post, you will learn how to <strong>Monitor</strong> and <strong>Run SSIS Package using Stored Procedure (T-SQL Code) &#8211; Packages stored in SSIS Catalog</strong>.  Calling SSIS Packages via T-SQL / Stored procedure code can be useful if you want to trigger SSIS package execution from your SQL code on certain conditions (i.e. Load data from SSIS Package before executing certain SQL code).</p>
<p>Techniques mentioned in this article applies to <a href="https://zappysys.com/onlinehelp/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a> or <strong>Native SSIS</strong> Packages.  Now let&#8217;s look at each piece step-by-step.</p>
<h2>How to run SSIS package using Stored Procedure / T-SQL Code</h2>
<p>Let&#8217;s look at simple example of Calling SSIS package deployed to SSIS Catalog. Basically, there are three steps (setting parameters is optional).</p>
<ol>
<li><strong>Required &#8211;</strong> Call <a href="https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-create-execution-ssisdb-database?view=sql-server-2017" target="_blank" rel="noopener">catalog.create_execution</a> System stored proc &#8211; This Creates new execution and returns you execution_id which can be saved to a variable</li>
<li><strong>Optional &#8211; </strong>Call <a href="https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017" target="_blank" rel="noopener">catalog.set_execution_parameter_value</a> System stored proc &#8211; Call this multiple times if you want to set parameters</li>
<li><strong>Required &#8211; </strong>Call <a href="https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-2017" target="_blank" rel="noopener">catalog.start_execution</a> to execute the package</li>
</ol>
<p>Now let&#8217;s look at the example. Below example is the simplest way to call SSIS package using SQL code. Below code creates a new SSIS execution and returns immediately without waiting to finish package execution (asynchronous execution).</p><pre class="crayon-plain-tag">USE SSISDB -- &lt;&lt;&lt; Change your SSIS Catalog DB name if its other than SSISDB
go
declare @my_execution_id bigint

declare @my_folder_name varchar(255)= 'MyFolder'
declare @my_project_name varchar(255) = 'MyProject'
declare @my_package_name varchar(255) = 'MyPackage.dtsx'

--////////////////////////////////////////////////////////
--First create Execution and get ExecutionID in a variable
--////////////////////////////////////////////////////////
exec catalog.create_execution 
	@folder_name = @my_folder_name
	,@project_name = @my_project_name
	,@package_name = @my_package_name
	,@reference_id = null
	,@execution_id = @my_execution_id output

--////////////////////////////////////////////////////////
--Start Execution
--////////////////////////////////////////////////////////
exec catalog.start_execution @my_execution_id</pre><p>
<h2>How to wait until SSIS package is finished (Set SYNCHRONIZED)</h2>
<p>By default SSIS Catalog Package execution is in asynchronous mode. So what if you really want to wait until SSIS package execution is done (Synchronous mode) ? Just add one more sored procedure call before calling <strong>catalog.start_execution</strong> (see below)</p><pre class="crayon-plain-tag">USE SSISDB -- &lt;&lt;&lt; Change your SSIS Catalog DB name if its other than SSISDB
go
declare @my_execution_id bigint

declare @my_folder_name varchar(255)= 'MyFolder'
declare @my_project_name varchar(255) = 'MyProject'
declare @my_package_name varchar(255) = 'MyPackage.dtsx'

--////////////////////////////////////////////////////////
--First create Execution and get ExecutionID in a variable
--////////////////////////////////////////////////////////
exec catalog.create_execution 
	@folder_name = @my_folder_name
	,@project_name = @my_project_name
	,@package_name = @my_package_name
	,@reference_id = null
	,@execution_id = @my_execution_id output

--////////////////////////////////////////////////////////
--Wait until package execution is done
--////////////////////////////////////////////////////////
EXEC [catalog].[set_execution_parameter_value] 
	@my_execution_id,  
	@object_type=50, 
	@parameter_name=N'SYNCHRONIZED', 
	@parameter_value=1

--////////////////////////////////////////////////////////
--Start Execution
--////////////////////////////////////////////////////////
exec catalog.start_execution @my_execution_id</pre><p>
&nbsp;</p>
<h2>Set SSIS Package Parameters via SQL Code for execution</h2>
<p>Now lets look at common scenario to pass package parameters.</p><pre class="crayon-plain-tag">USE SSISDB -- &lt;&lt;&lt; Change your SSIS Catalog DB name if its other than SSISDB
go
declare @my_execution_id bigint

declare @my_folder_name varchar(255)= 'ZappySys'
declare @my_project_name varchar(255) = 'DownloadFileFromCloud'
declare @my_package_name varchar(255) = 'DownloadFileFromCloud.dtsx'

--////////////////////////////////////////////////////////
--First create Execution and get ExecutionID in a variable
--////////////////////////////////////////////////////////
exec catalog.create_execution 
	@folder_name = @my_folder_name
	,@project_name = @my_project_name
	,@package_name = @my_package_name
	,@reference_id = null
	,@execution_id = @my_execution_id output

--////////////////////////////////////////////////////////
--Wait until package execution is done
--////////////////////////////////////////////////////////
EXEC [catalog].[set_execution_parameter_value] 
	@my_execution_id,  
	@object_type=50, 
	@parameter_name=N'SYNCHRONIZED', 
	@parameter_value=1

--////////////////////////////////////////////////////////
--Set package parameters
--////////////////////////////////////////////////////////
exec catalog.set_execution_parameter_value  @my_execution_id, 50, 'FilePath', 'C:\Temp\Dump.json'  
exec catalog.set_execution_parameter_value  @my_execution_id, 50, 'TargetServerName', 'Server001'  

--////////////////////////////////////////////////////////
--Start Execution
--////////////////////////////////////////////////////////
exec catalog.start_execution @my_execution_id</pre><p>
<h2>How to set SSIS environment for package execution using SQL Query</h2>
<p>Many times you have need to select SSIS Environment rather than setting individual SSIS Parameters (e.g. Use DEV Environment parameters). See below code How to find correct reference_id for SSI environment  and pass to <strong>create_execution </strong> stored procedure call.</p>
<p>Here is how you set SSIS environment using SSMS UI. In the next section see the code to select same via T-SQL code.</p>
<p>&nbsp;</p>
<div id="attachment_3465" style="width: 747px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execution-set-environment.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3465" class="size-full wp-image-3465" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execution-set-environment.png" alt="Set SSIS Environment for Package Execution - SSMS UI" width="737" height="463" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execution-set-environment.png 737w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execution-set-environment-300x188.png 300w" sizes="(max-width: 737px) 100vw, 737px" /></a><p id="caption-attachment-3465" class="wp-caption-text">Set SSIS Environment for Package Execution &#8211; SSMS UI</p></div>
<p>&nbsp;</p>
<p><strong>Setting SSIS Environment for execution using SQL Code</strong></p><pre class="crayon-plain-tag">USE SSISDB -- &lt;&lt;&lt; Change your SSIS Catalog DB name if its other than SSISDB
go
declare @my_execution_id bigint

declare @my_folder_name varchar(255)= 'ZappySys'
declare @my_project_name varchar(255) = 'DownloadFileFromCloud'
declare @my_package_name varchar(255) = 'DownloadFileFromCloud.dtsx'
declare @my_environment_name varchar(255) = 'ENV_DEV'

--Find Environment reference_id from name
declare @my_env_refid int
select @my_env_refid=reference_id from [catalog].environment_references where environment_name=@my_environment_name

--////////////////////////////////////////////////////////
--First create Execution and get ExecutionID in a variable
--////////////////////////////////////////////////////////
exec catalog.create_execution 
	@folder_name = @my_folder_name
	,@project_name = @my_project_name
	,@package_name = @my_package_name
	,@reference_id = @my_env_refid --pass environment id here
	,@execution_id = @my_execution_id output

--////////////////////////////////////////////////////////
--Wait until package execution is done
--////////////////////////////////////////////////////////
EXEC [catalog].[set_execution_parameter_value] 
	@my_execution_id,  
	@object_type=50, 
	@parameter_name=N'SYNCHRONIZED', 
	@parameter_value=1

--////////////////////////////////////////////////////////
--Set package parameters
--////////////////////////////////////////////////////////
exec catalog.set_execution_parameter_value  @my_execution_id, 50, 'FilePath', 'C:\Temp\Dump.json'  
exec catalog.set_execution_parameter_value  @my_execution_id, 50, 'TargetServerName', 'Server001'  

--////////////////////////////////////////////////////////
--Start Execution
--////////////////////////////////////////////////////////
exec catalog.start_execution @my_execution_id</pre><p>
&nbsp;</p>
<h2>How to get last SSIS Package execution Status using SQL Query</h2>
<p>Now let&#8217;s look at, how to get SSIS package execution Status for last execution using SQL Query.  In this example we are grabbing last package execution_id using Max(execution_id) function but you can hardcode execution_id too.</p>
<p>See different numeric status codes and description for SSIS Package Execution.</p><pre class="crayon-plain-tag">USE SSISDB -- &lt;&lt;&lt; Change your SSIS Catalog DB name if its other than SSISDB
GO
declare @my_execution_id bigint
Select @my_execution_id=Max(execution_id) From SSISDB.catalog.executions 
--Where package_name like 'MyPackage%'

 select folder_name,project_name,package_name,status_text=case 
	when status=1 then 'Created' 
	when status=2 then 'Running' 
	when status=3 then 'Cancelled' 
	when status=4 then 'Failed' 
	when status=5 then 'Pending' 
	when status=6 then 'Ended Unexpectedly' 
	when status=7 then 'Succedded' 
	when status=8 then 'Stopping' 
	when status=9 then 'Completed' 
	else 'Not Sure'
	end
from catalog.executions  where execution_id=@my_execution_id</pre><p>
&nbsp;</p>
<h2>How to get last SSIS Package execution log using SQL Query</h2>
<p>Now let&#8217;s look at full SQL Query which can give us execution status, errors and full execution log of last SSIS Package execution.</p><pre class="crayon-plain-tag">USE SSISDB -- &lt;&lt;&lt; Change your SSIS Catalog DB name if its other than SSISDB
GO
declare @my_execution_id bigint
Select @my_execution_id=Max(execution_id) From catalog.executions 
--Where package_name like 'MyPackage%'

--////////////////////////////////////////////////
--See just SSIS package execution status
--////////////////////////////////////////////////
 select folder_name,project_name,package_name,status_text=case 
	when status=1 then 'Created' 
	when status=2 then 'Running' 
	when status=3 then 'Cancelled' 
	when status=4 then 'Failed' 
	when status=5 then 'Pending' 
	when status=6 then 'Ended Unexpectedly' 
	when status=7 then 'Succedded' 
	when status=8 then 'Stopping' 
	when status=9 then 'Completed' 
	else 'Not Sure'
	end
from catalog.executions  where execution_id=@my_execution_id

--////////////////////////////////////////////////
--See Only Errors
--////////////////////////////////////////////////
SELECT top 100 @my_execution_id ExecID,message, package_name, event_name, message_source_name,message_time as start_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%')
	) AS q
Where q.event_name='OnError'
ORDER BY message_time DESC
--////////////////////////////////////////////////
--See Full Log (Information, Warnings and Errors
--////////////////////////////////////////////////
SELECT top 1000 event_message_id as id
	, datalength(message) message_length
	, message
	, try_cast('&lt;![CDATA[' + message + ']]&gt;' as XML) as message_xml
	, message
	, package_name, event_name, message_source_name,@my_execution_id execid,message_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%') 
			--and event_message_id=20303352
	) AS q
ORDER BY event_message_id DESC</pre><p>
Here is the screenshot. Notice how we have message_xml column to see more than 8000 characters from log message in your SSMS output (Grid mode). SSMS can show maximum 8000 characters in one cell so using try_Catch function along with XML datatype will fix that issue.</p>
<div id="attachment_3464" style="width: 904px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/view-ssis-package-execution-log-ssms-sql-query.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3464" class="size-full wp-image-3464" src="https://zappysys.com/blog/wp-content/uploads/2018/05/view-ssis-package-execution-log-ssms-sql-query.png" alt="See SSIS Package Execution log using SQL Query (T-SQL code) - View Execution Status, Error Messages, Information - Also add more than 8000 characters fix for SSMS grid" width="894" height="585" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/view-ssis-package-execution-log-ssms-sql-query.png 894w, https://zappysys.com/blog/wp-content/uploads/2018/05/view-ssis-package-execution-log-ssms-sql-query-300x196.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/view-ssis-package-execution-log-ssms-sql-query-768x503.png 768w" sizes="(max-width: 894px) 100vw, 894px" /></a><p id="caption-attachment-3464" class="wp-caption-text">See SSIS Package Execution log using SQL Query (T-SQL code) &#8211; View Execution Status, Error Messages, Information &#8211; Also add more than 8000 characters fix for SSMS grid</p></div>
<h2></h2>
<h2>Full SQL Script (Execute SSIS Package / Monitor SSIS Package)</h2>
<p>Here is the full script.</p><pre class="crayon-plain-tag">use [SSISDB]

GO

/*
 Author: ZappySys
 
 - This script demonstrates few aspects of SSIS package execution via code (call system stored procedures)
	&gt;&gt; How to execute SSIS package via stored procedure call
	&gt;&gt; How to set package parameters via code
	&gt;&gt; How to set envirnment via code
	&gt;&gt; How to monitor SSIS package execution via T-SQL code
	&gt;&gt; How to check SSIS package execution status / error and execution log
 - Feel free to modify and comment uncomment certain sections to meet your need.
 - We are outputting message column in xml format too so you get nice hyper link to see full message. This technique is needed to overcome string length limitation of SSMS

 */

declare @see_log bit =1 --set it to 0 if you want to execute package rather than see log
declare @my_execution_id bigint=null  -- enter execution id you like to see. Kepp it null to read last execution 

declare @my_folder_name varchar(255)= 'AdfExamples'
declare @my_project_name varchar(255) = 'SSISNativeExamples'
declare @my_package_name varchar(255) = 'HelloWorld.dtsx'
declare @my_environment_name varchar(255) = null  --e.g. This is SSIS Environment to attach with this execution (e.g. ENV_DEV , ENV_PROD)
--declare @my_environment_name varchar(255) = 'ENV_DEV'
	  
--declare @my_execution_id bigint=1200 --enter execid to see log

declare @starttime datetime
declare @statusLoop bit

if(@see_log = 1 and @my_execution_id is null)
	Select @statusLoop=0, @my_execution_id=Max(execution_id) 
	From catalog.executions 
	--WHERE package_name like 'Hello%'


if(@my_execution_id is null)
begin
	set @statusLoop=1 
	
	declare @my_env_refid int
	select @my_env_refid=reference_id from [catalog].environment_references where environment_name=@my_environment_name

	--First create Execution and get ExecutionID in a variable
	--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-create-execution-ssisdb-database?view=sql-server-2017
	exec catalog.create_execution 
	  @folder_name = @my_folder_name
	 ,@project_name = @my_project_name
	 ,@package_name = @my_package_name
	 ,@reference_id = @my_env_refid
	 ,@execution_id = @my_execution_id output

	 --///////////////////////////
	--Wait until execution is done
	--///////////////////////////
	 -- IF You want to wait until execution is done. If you enable this then no need for status check loop
	 --https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017
	EXEC [catalog].[set_execution_parameter_value] 
		@my_execution_id,  
		@object_type=50, 
		@parameter_name=N'SYNCHRONIZED', 
		@parameter_value=1
	set @statusLoop=0 --if you enable this option no need for statucheck
	
	--///////////////////////////
	--Set Parameters
	--///////////////////////////
	--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017
	--exec catalog.set_execution_parameter_value  @my_execution_id, 50, 'FilePath', 'C:\Temp\Dump.json'  
	--exec catalog.set_execution_parameter_value  @my_execution_id, 50, 'TargetServerName', 'Server001'  

	--///////////////////////////
	--Start Execution
	--///////////////////////////
	--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-2017
	exec catalog.start_execution @my_execution_id
end

--///////////////////////////
--Status check loop for wait
--///////////////////////////
---comment these two lines if set SYNCHRONIZED = 1
if(@statusLoop = 1)
WHILE @my_execution_id IN (1,2,5,8)
	WAITFOR DELAY '00:03'
--

 select folder_name,project_name,package_name,status_text=case 
	when status=1 then 'Created' 
	when status=2 then 'Running' 
	when status=3 then 'Cancelled' 
	when status=4 then 'Failed' 
	when status=5 then 'Pending' 
	when status=6 then 'Ended Unexpectedly' 
	when status=7 then 'Succedded' 
	when status=8 then 'Stopping' 
	when status=9 then 'Completed' 
	else 'Not Sure'
	end
from catalog.executions  where execution_id=@my_execution_id


--///////////////////
----Show Just Errors
--///////////////////
SELECT top 10 @my_execution_id ExecID,message, package_name, event_name, message_source_name,message_time as start_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%')
	) AS q
Where q.event_name='OnError'
ORDER BY message_time DESC

--///////////////////
----Full Log
--///////////////////
SELECT top 1000 event_message_id as id
	, datalength(message) message_length
	, message
	, try_cast('&lt;![CDATA[' + message + ']]&gt;' as XML) as message_xml
	, package_name, event_name, message_source_name,@my_execution_id execid,message_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%') 
			--and event_message_id=20303352
	) AS q
ORDER BY event_message_id DESC</pre><p>
<h2>Conclusion</h2>
<p>So finally to conclude, you saw that how easy it is to execute SSIS packages using SQL code, monitor SSIS package execution and extract valuable log via. SSIS PowerPack comes with additional logging features along with standard logging. Try SSIS PowerPack to get additional <a href="https://zappysys.com/onlinehelp/ssis-powerpack/">70+ new SSIS tasks and components</a> in your SSIS toolbox.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/monitor-run-ssis-package-using-stored-procedure-t-sql/">Monitor, Run SSIS Package using Stored procedure / T-SQL</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to run SSIS in Azure Data Factory (Deploy, Monitor SSIS in Cloud)</title>
		<link>https://zappysys.com/blog/run-ssis-azure-data-factory-deploy-monitor-ssis-cloud/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 04 May 2018 13:59:45 +0000</pubDate>
				<category><![CDATA[Cloud Computing]]></category>
		<category><![CDATA[adf]]></category>
		<category><![CDATA[azure]]></category>
		<category><![CDATA[azure data factory]]></category>
		<category><![CDATA[cloud]]></category>
		<category><![CDATA[powershell]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=3395</guid>

					<description><![CDATA[<p>Introduction If you are using SSIS for your ETL needs and looking to reduce your overall cost then, there is a good news. Microsoft recently announced support to run SSIS in Azure Data Factory (SSIS as Cloud Service). Yes &#8211; that&#8217;s exciting,  you can now run SSIS in Azure without any change in your packages (Lift and [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/run-ssis-azure-data-factory-deploy-monitor-ssis-cloud/">How to run SSIS in Azure Data Factory (Deploy, Monitor SSIS in Cloud)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-adf-logo.png"><img loading="lazy" decoding="async" class="wp-image-3409 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-adf-logo.png" alt="Azure Data Factory Logo - SSIS Integration Runtime" width="129" height="125" /></a>If you are using <strong>SSIS for your ETL needs</strong> and looking to reduce your overall cost then, there is a good news. Microsoft recently announced support to <strong>run SSIS in Azure Data Factory (SSIS as Cloud Service).</strong> Yes &#8211; that&#8217;s exciting,  you can now run SSIS in Azure without any change in your packages (<strong>Lift and Shift</strong>).  SSIS Support in Azure is a new feature of <a href="https://docs.microsoft.com/en-us/azure/data-factory/" rel="noopener">Azure Data Factory V2 (i.e. ADF)</a>. This article also explains how to deploy SSIS Packages to Azure which use <strong>3rd party components</strong> (e.g. <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a> <strong>v2.6.13 or Higher</strong>). There are few additional steps involved if you wish to install <strong>Custom SSIS Components</strong> in Azure Data Factory (explained later in this article).</p>
<p>&nbsp;</p>
<h2>What is Microsoft Azure Data Factory (i.e. ADF)</h2>
<p>Azure Data Factory (i.e. also referred as <em>&#8220;ADF&#8221;</em>) is a fully managed cloud service by Microsoft for your ETL needs. ADF comes with two completely different ETL approaches (referred as Integration Runtimes).</p>
<ul>
<li>Default Runtime (Copy Activity)</li>
<li>SSIS Runtime</li>
</ul>
<p>Both runtimes offer their own Authoring tools and they have completely different authoring, execution, and <a href="https://azure.microsoft.com/en-us/pricing/details/data-factory/" target="_blank" rel="noopener">pricing models</a>. Check later in this article for some tips to save Cost by automating Start / Stop of SSIS IR based on your limited execution need (Only Start SSIS-IR when you need to run package).</p>
<p><strong>Choose ADF SSIS Runtime when:</strong></p>
<ul>
<li>You are planning to leverage existing ETL (i.e. SSIS Packages) in Azure without significant changes</li>
<li>You like to use  <strong>3rd party SSIS components in ADF</strong> (e.g. <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a>) which are not found in Copy Activity</li>
<li>You want more predictable pricing model (Fixed Monthly cost regardless number of executions )</li>
<li>You find certain key features or performance of SSIS better than ADF Copy Activity</li>
<li>You don&#8217;t want to invest in learning new technologies for now but want to shift your workloads in the cloud to reduce cost.</li>
<li>You like SSIS Package designer (i.e. <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017" rel="noopener">SSDT</a>) better than ADF (Maybe due to ease of Use in Disconnected mode on the client side or Visual Debugger)</li>
</ul>
<p><strong>Choose ADF Default Runtime (Copy Activity) when: </strong></p>
<ul>
<li>Your data movement which is more Azure-cloud focused. For example, Move data from CosmosDB to Azure SQL Data Warehouse. Or Move Data from Azure Data Bricks to Blob Storage.</li>
<li>You like certain features/connectivity options in Copy-Activity are better than SSIS</li>
<li>You like to pay per execution rather than Fixed SSIS Runtime cost.</li>
<li>You don&#8217;t have expertise in SSIS and you like to start using ETL (Pay as you go)</li>
</ul>
<h2>Advantages of running SSIS on Azure Data Factory</h2>
<p>There few obvious advantages if you decide to run SSIS Package in Azure Data Factory (ADF) compared to running on your own dedicated server (on-premises or VM running in Cloud).</p>
<ul>
<li><strong>Reduced Cost</strong> &#8211; This can be one big advantage why you may choose to run SSIS in Azure. Traditionally to run SSIS Packages in-house you needed SQL Server License (which can be very expensive). Microsoft does not sell SSIS License independently. But now with ADF you can get going with your ETL need without SQL Server license and fraction of the cost.</li>
<li><strong>Managed Service</strong> &#8211; ADF is managed service means you don&#8217;t have to worry about hardware, OS, Licensing or ongoing maintenance/patches. Azure infrastructure will take all these for you.</li>
<li><strong>DevOps</strong> &#8211; Time to setup new server is significantly less with Azure Cloud approach.  You can set up your SSIS ETL infrastructure in less than 30 mins with Azure.</li>
<li><strong>Isolation of Compute and Database Storage</strong> &#8211; In Azure Data Factory when you provision SSIS runtime your Compute Node (Where SSIS service runs) is totally isolated than your SSISDB (DB where SSIS Packages / Settings / Execution Log stored). Which means if your compute node is offline for some reason you can still deploy packages and view execution log.</li>
</ul>
<p>Anyway&#8217;s enough said now let&#8217;s see how to provision and deploy SSIS packages in Azure Data Factory (ADF).</p>
<h2>How to deploy and run SSIS Packages in Azure with 3rd party components</h2>
<p>Before we deep dive to learn how to run packages in Azure Data Factory. Here are high-level steps to deploy SSIS Packages in Azure Data Factory. Here is <a href="https://docs.microsoft.com/en-us/azure/data-factory/tutorial-deploy-ssis-packages-azure" rel="noopener">another tutorial link</a> from Microsoft (It doesn&#8217;t mention deploying third-party SSIS components but good to check anyway). Some steps are optional and only needed if you planning to run SSIS Packages with third-party components such as <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a></p>
<ol>
<li>Create <strong>Azure Data Factory</strong> instance- Check <a href="https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-portal" rel="noopener">this article</a></li>
<li>Create <strong>Azure SQL DB Instance</strong> (Used to store SSISDB)  &#8211; Check <a href="https://docs.microsoft.com/en-us/azure/sql-database/sql-database-get-started-portal" rel="noopener">this article</a></li>
<li><span style="text-decoration: underline;">(3rd party SSIS)</span> Create <strong>Azure Blob Storage Container</strong> and Upload 3rd party SSIS component setup files</li>
<li><span style="text-decoration: underline;">(3rd party SSIS)</span> Create <strong>SAS URL for Azure Blob Container</strong> which has necessary 3rd party component setup files (SAS URL must have Read/Write/List/Create permission)</li>
<li>Create a new <strong>SSIS Runtime</strong> in Azure Data Factory</li>
<li><span style="text-decoration: underline;">(3rd party SSIS)</span> During setup enter SAS URL which points to a container with custom setup files.</li>
<li>Use <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017" rel="noopener">SSDT BI</a> for VS 2015 or Higher to Author/Test SSIS Packages locally (Change Project <a href="https://zappysys.zendesk.com/hc/en-us/articles/360001710233-How-to-change-TargetServerVersion-of-my-SSIS-Project" target="_blank" rel="noopener">TargetServerVersion</a> to <strong>SQL 2017 Format</strong>)</li>
<li>Use the latest version of <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017" rel="noopener">SSMS (v17.x or Higher)</a> to deploy SSIS Packages to Azure SQL DB (SSISDB)</li>
<li>Execute Package via SSMS and Monitor Package Executions</li>
</ol>
<p>In the following sections, we will see each step in detail.</p>
<h2>Important things to know about SSIS Runtime in ADF</h2>
<p>There are a few important facts you should know about how Azure Data Factory (ADF) Hosts, Runs your SSIS Packages</p>
<ul>
<li>ADF uses Windows Server VM nodes to run your SSIS Packages in Azure.</li>
<li>It uses SSIS 2017 Format so make sure any Packages using 3rd party components must be targeted to the correct SSIS version</li>
<li>Each time you start and stop SSIS Runtime in ADF you will get a fresh VM node so nothing is persistent in ADF SSIS Node (Microsoft Azure will allocate any random node from VM Pool)</li>
<li>If you wish to persist files/values then do not save on ADF VM (Use external storage such as Blob Storage or SQL DB)</li>
</ul>
<h2>Choosing Between Azure Virtual Machine (Azure VM) and Azure Data Factory (ADF) for Running SSIS Packages</h2>
<p>Many customers ask whether they should run their SSIS packages on an <strong>Azure Virtual Machine (VM)</strong> or inside <strong>Azure Data Factory (ADF)</strong> using the <strong>Azure-SSIS Integration Runtime (IR)</strong>. Both deployment options are supported by <strong>ZappySys</strong>, but the best choice depends on your workload characteristics, cost model, and operational requirements.</p>
<p>Running SSIS packages in <strong>ADF with Azure-SSIS IR</strong> is fundamentally different from running them on an <strong>Azure VM</strong>. ADF provides a fully managed environment with automatic scaling, built-in scheduling, and native integration with other Azure services, while VMs offer more control over the operating system and custom configurations.</p>
<p>For a deeper comparison of these two approaches, refer to our detailed guide here:<br />
<a rel="noopener" target="_new" href="https://community.zappysys.com/t/choosing-between-azure-virtual-machine-azure-vm-and-azure-data-factory-adf-for-running-ssis-packages/632">Choosing Between Azure Virtual Machine (Azure VM) and Azure Data Factory (ADF) for Running SSIS Packages</a></p>
<h2>Getting Started &#8211; Setup SSIS Runtime in Azure</h2>
<p>Now let&#8217;s look at how to create your first Azure Data Factory Instance and then configure to run SSIS Packages with Custom Components such as <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a>.</p>
<h3>Prerequisite</h3>
<p>Before we move forward with our steps to Deploy and Run SSIS Package in Azure Data Factory let&#8217;s confirm that you meet the following prerequisite.</p>
<ul>
<li>You have a <strong>valid Azure Subscription</strong>. If you don&#8217;t have it then you can <a href="https://azure.microsoft.com/free/" rel="noopener">try for FREE here</a>.</li>
<li>Download and Install <a href="https://azure.microsoft.com/en-us/features/storage-explorer/" rel="noopener">Azure Storage Explorer</a> for FREE (Used to upload setup files and create SAS Url for 3rd party SSIS components setup)</li>
<li>Download and Install <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017" rel="noopener">SSMS v17.x or Higher</a> for FREE. This is not same SSMS which comes with SQL Server Setup (This new version is independent download and support connecting to Azure SQL DB for <strong>SSISDB</strong></li>
<li>Download and Install <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017" rel="noopener">SSDT BI for VS 2015 or higher</a> (Used to design and test SSIS Packages with SQL Server 2017 support).</li>
<li>You have downloaded setup files for <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a> (To obtain setup file &#8211; For FREE Trial <a href="https://zappysys.com/products/ssis-powerpack/download/" rel="noopener">Click Here</a>,  For Paid Customer <a href="https://zappysys.com/customer-downloads/" rel="noopener">Click Here</a>)</li>
</ul>
<h3>Create a new Azure Data Factory (ADF)</h3>
<p>Using your valid Azure Subscription create new Azure Data Factory Instance (Thi will host your SSIS Runtime). <a href="https://docs.microsoft.com/en-us/azure/data-factory/quickstart-create-data-factory-portal" rel="noopener">Click here to learn more how to create a new Azure Data Factory Instance</a>.</p>
<h3>Create a new Azure SQL Database (i.e. new SQL Instance)</h3>
<p>Once you have a valid ADF Instance, next step is to make sure you have a valid Azure SQL Server Instance to host SSISDB (Catalog Database for SSIS). If possible choose the same region for both ADF and SQL Instance. ). <a href="https://docs.microsoft.com/en-us/azure/sql-database/sql-database-get-started-portal" rel="noopener">Click here to learn more on how to create a new Azure SQL Server Instance</a>.</p>
<h3>Create and Setup Azure Blob Storage Container (Only for 3rd party SSIS setup)</h3>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> You can skip this section if you are not planning to use <strong>3rd party</strong> (i.e. <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a>) components in SSIS Packages</div></div>
<p>Once you have provisioned ADF instance and Azure SQL Server instance, Now it&#8217;s time to prepare setup files for custom SSIS components. Behind the scene, ADF uses VM instances to run your SSIS Packages so you can install pretty much anything you want just like a regular VM. However, there is no Remote Desktop Option for SSIS node in ADF, in other words, it&#8217;s pretty locked down. The only way you can install custom components is through Custom Setup Option provided during your SSIS Runtime creation. This custom script is executed only once after SSIS VM is created in ADF. It also executed once you stop and start SSIS Runtime. You have no way to execute the custom script on demand while SSIS Runtime is running (Maybe Microsoft can change this in the future but no option for now).</p>
<h3>Prepare custom setup files for ADF &#8211; SSIS Runtime</h3>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> You can skip this section if you are not planning to use <strong>3rd party</strong> (i.e. <a href="https://zappysys.com/products/ssis-powerpack/" rel="noopener">SSIS PowerPack</a>) components in SSIS Packages</div></div>
<p>During SSIS Runtime setup you can instruct ADF to perform a custom setup (e.g. Run the custom installer, copy files, execute PowerShell scripts etc). Your custom setup files are downloaded in the SSIS node (i.e. VM) at some point during SSIS Runtime setup. This is done using <strong>SAS URL</strong> (i.e. URL with Shared Access Signature). Treat SAS URL like a Password if you have some sensitive data in your container. For an additional read on the custom component setup, you can <a href="https://docs.microsoft.com/en-us/azure/data-factory/how-to-configure-azure-ssis-ir-custom-setup" rel="noopener">refer this link</a>.</p>
<p>Before we create SAS URL, you need to gather setup files on your local disk and then you can upload to Azure Blob Container. <strong>SSIS PowerPack needs the following 2 files to be uploaded in your blob container (root level)</strong>.</p>
<ol>
<li><strong>main.cmd</strong> [See below Section] &#8211; This is the <strong>entry point of Custom Setup in ADF-SSIS</strong></li>
<li><strong>SSISPowerPackSetup_64bit_Trial.msi</strong> (Trial version, <a href="https://zappysys.com/products/ssis-powerpack/download/" rel="noopener">download it</a>) <em>OR</em> <strong>SSISPowerPackSetup_64bit.msi</strong> (Paid Customer version, <a href="https://zappysys.com/customer-downloads/" rel="noopener">download it</a>)</li>
</ol>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>NOTE:</strong> Make sure you upload files to an <em>Azure Blob Storage</em> container instead of <em>Azure Data Lake Storage </em>folder. Azure Data Lake Storage won&#8217;t allow creating an SAS URL for a container in which ADF could have full rights.</div></div>
<p>Each file listed above has download link next to it so download locally (except <strong>main.cmd</strong> which we will discuss next).</p>
<p>Create a new file and name it as &#8220;<strong>main.cmd</strong>&#8220;. Enter content like below.</p>
<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> Make sure &#8220;<em>main.cmd</em>&#8221; is entered in lowercase, otherwise, ADF instance might not start.</div></div>
<p>Few things you should change as per your need</p>
<ol>
<li>Change the Example License Key to your own License Key in Activate PowerPack license Step.</li>
<li>Change <strong>SSISPowerPackSetup_64bit.msi </strong>if your downloaded file has a different name</li>
<li>Comment Activate PowerPack license Step if you are using Trial (To comment just add <pre class="crayon-plain-tag">::</pre>  in front of the line)</li>
</ol>
<p>Other than the above three changes you can leave everything default. Save the file and upload to your setup blob container. Once ADF executes main.cmd it will generate new Log folder in your Blob container (You will see a new folder. Example  <pre class="crayon-plain-tag">main.cmd.log\tvm-325613345_1-20180503t144850z##2018-05-03T145334Z</pre>  ).</p>
<h4>main.cmd &#8211; For Trial Users</h4>
<p>See below example script file which you have to create if you are a trial user (you don&#8217;t have a license key). The file must be named as main.cmd.</p><pre class="crayon-plain-tag">set DIR=%CUSTOM_SETUP_SCRIPT_LOG_DIR%

echo Calling Step 1 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
dir /s /b &gt; "%DIR%\file_list.txt"

echo Calling Step 2 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

::Install SSIS PowerPack
msiexec /i  "SSISPowerPackSetup_64bit_Trial.msi" ADDLOCAL=ALL /q  /L*V "%DIR%\powerpack_trial_install_log.txt"

echo Calling Step 3 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

::Activate SSIS PowerPack Trial Extension Key (Optional) -- Uncomment below line to apply the trial extension key.
::"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -p SSISPowerPack --register "lgGAAO0-----REPLACE-WITH-YOUR-TRIAL-EXTENSION-KEY-----czM=" --logfile "%DIR%\powerpack_register_log.txt"

dir "C:\Program Files\Microsoft SQL Server\*Zappy*.*"  /s /b &gt;&gt; "%DIR%\installed_files.txt"
dir "C:\Program Files (x86)\Microsoft SQL Server\*Zappy*.*"  /s /b &gt;&gt; "%DIR%\installed_files.txt"

echo DONE : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

echo complete</pre><p>
<h4>main.cmd &#8211; For Paid Customers</h4>
<p>See below example script file which you have to create if you are a paid customer and wish to apply license key. The file must be named as main.cmd. Make sure:</p>
<ol>
<li>You uploaded the installer with the name <strong>SSISPowerPackSetup_64bit.msi</strong>.</li>
<li>Replaced the parameter&#8217;s <strong>&#8211;register</strong> argument with your real license key.</li>
</ol>
<pre class="crayon-plain-tag">set DIR=%CUSTOM_SETUP_SCRIPT_LOG_DIR%

echo Calling Step 1 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
dir /s /b &gt; "%DIR%\file_list.txt"

echo Calling Step 2 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

::Install SSIS PowerPack
msiexec /i  "SSISPowerPackSetup_64bit.msi" ADDLOCAL=ALL /q  /L*V "%DIR%\powerpack_install_log.txt"

echo Calling Step 3 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

::Activate PowerPack license (Optional)
"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -p SSISPowerPack --register "lgGAAO0-----REPLACE-WITH-YOUR-LICENSE-KEY-----czM=" --logfile "%DIR%\powerpack_register_log.txt"

::De-Activate license (Optional) -- Uncomment below line to Unregister previously used license. Must register first and then unregister
::"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -p SSISPowerPack --unregister --logfile "%DIR%\powerpack_un_register_log.txt"


::Show System Info
echo Calling Step 4 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -i -l "%DIR%\sysinfo_log.txt"

echo Calling Step 5 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
dir "C:\Program Files\Microsoft SQL Server\*Zappy*.*"  /s /b &gt;&gt; "%DIR%\installed_files.txt"
dir "C:\Program Files (x86)\Microsoft SQL Server\*Zappy*.*"  /s /b &gt;&gt; "%DIR%\installed_files.txt"

echo DONE : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

echo complete</pre>
<h3>Create SAS URL of Azure Blob Container (Only for 3rd party SSIS setup)</h3>
<p>Once you have prepared setup files now let&#8217;s upload them to your blob container and generate SAS URL using the below steps.</p>
<ol>
<li>Install and Launch <a href="https://azure.microsoft.com/en-us/features/storage-explorer/" rel="noopener">Azure Storage Explorer</a></li>
<li>Right-click on the Storage Accounts node &gt; Click <strong><strong><strong>Connect to Azure storage &#8230;</strong></strong></strong>
<div id="attachment_3401" style="width: 354px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-add-account.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3401" class="size-full wp-image-3401" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-add-account.png" alt="Connect to Azure Storage Account in Azure Storage Explorer" width="344" height="250" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-add-account.png 344w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-add-account-300x218.png 300w" sizes="(max-width: 344px) 100vw, 344px" /></a><p id="caption-attachment-3401" class="wp-caption-text">Connect to Azure Storage Account in Azure Storage Explorer</p></div>
<p><strong> </strong></li>
<li>Once your account added &gt; Expand to Blob Containers node &gt; Right click &gt; <strong>Create Blob Container&#8230;</strong>
<div id="attachment_3402" style="width: 329px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-create-new-blob-container.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3402" class="size-full wp-image-3402" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-create-new-blob-container.png" alt="Create new Azure Blob Container in Azure Storage Explorer" width="319" height="393" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-create-new-blob-container.png 319w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-storage-explorer-create-new-blob-container-244x300.png 244w" sizes="(max-width: 319px) 100vw, 319px" /></a><p id="caption-attachment-3402" class="wp-caption-text">Create new Azure Blob Container in Azure Storage Explorer</p></div></li>
<li>Select newly created container and <strong>upload files</strong> we prepared in the previous section.
<div id="attachment_3403" style="width: 824px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-upload-ssis-custom-setup-files-adf.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3403" class="size-full wp-image-3403" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-upload-ssis-custom-setup-files-adf.png" alt="Upload Custom Setup File for Azure Data Factory - SSIS Runtime" width="814" height="585" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-upload-ssis-custom-setup-files-adf.png 814w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-upload-ssis-custom-setup-files-adf-300x216.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-upload-ssis-custom-setup-files-adf-768x552.png 768w" sizes="(max-width: 814px) 100vw, 814px" /></a><p id="caption-attachment-3403" class="wp-caption-text">Upload Custom Setup File for Azure Data Factory &#8211; SSIS Runtime</p></div></li>
<li><strong>Right-click on the container</strong> node and click <strong>Get Shared Access Signature</strong><br />
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Make sure you adjust the expiration date to a long enough; otherwise, you may need to generate a new SAS URL often and restart your ADF SSIS Node to apply the new SAS URL. Also, select <strong>Write permission</strong> along with <strong>Read,  List, and Create</strong>. If you do not select Write, then ADF setup cannot write log files back to your Blob Container. We also recommend Delete permission in case Microsoft adds a new feature to delete older log files.</div></div>.<strong>Generate SAS URL from Azure Storage Explorer (Desktop Version)</strong></p>
<div id="attachment_11108" style="width: 788px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-storage-explorer.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11108" class="size-full wp-image-11108" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-storage-explorer.png" alt="" width="778" height="631" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-storage-explorer.png 778w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-storage-explorer-300x243.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-storage-explorer-768x623.png 768w" sizes="(max-width: 778px) 100vw, 778px" /></a><p id="caption-attachment-11108" class="wp-caption-text">Create SAS URL in Azure Storage Explorer for Azure Data Factory (ADF) &#8211; SSIS Runtime Custom Setup (3rd party component installation)</p></div>
<p><strong>Generate SAS URL from Azure Portal Online</strong></p>
<div id="attachment_11109" style="width: 942px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-online-portal.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-11109" class="size-full wp-image-11109" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-online-portal.png" alt="" width="932" height="586" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-online-portal.png 932w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-online-portal-300x189.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-generate-sas-url-via-online-portal-768x483.png 768w" sizes="(max-width: 932px) 100vw, 932px" /></a><p id="caption-attachment-11109" class="wp-caption-text">Create SAS URL in Azure Portal for Azure Data Factory (ADF) &#8211; SSIS Runtime Custom Setup (3rd party component installation)</p></div>
<p>&nbsp;</li>
<li>Copy SAS URL to clipboard and save somewhere (we will use that user later in this article)
<div id="attachment_3405" style="width: 669px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-custom-setup-get-container-sas-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3405" class="size-full wp-image-3405" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-custom-setup-get-container-sas-url.png" alt="Get SAS URL for Azure SSIS Runtime - Custom setup" width="659" height="323" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-custom-setup-get-container-sas-url.png 659w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-custom-setup-get-container-sas-url-300x147.png 300w" sizes="(max-width: 659px) 100vw, 659px" /></a><p id="caption-attachment-3405" class="wp-caption-text">Get SAS URL for Azure SSIS Runtime &#8211; Custom setup</p></div></li>
</ol>
<p>&nbsp;</p>
<p>&nbsp;</p>
<h3>Create a new SSIS &#8211; Integration Runtime for SSIS</h3>
<p>Once you upload setup files for custom SSIS components and generated SAS URL for container we are ready to move on to our final step (Create SSIS Integration Runtime in Azure Data Factory)</p>
<p>Steps for <a href="https://docs.microsoft.com/en-us/azure/data-factory/create-azure-ssis-integration-runtime" rel="noopener">Creating SSIS Runtime in Azure</a> are clearly documented here except one change (see below).</p>
<p>&nbsp;</p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>For 3rd party SSIS component setup refer below notes:</strong></p>
<p>Follow all steps as per this <a href="https://docs.microsoft.com/en-us/azure/data-factory/create-azure-ssis-integration-runtime" rel="noopener">Microsoft Tutorial</a> (Skip creating ADF step if you already did in the previous section). However <strong>Microsoft Tutorial does not mention about Custom SAS URL</strong> (again this is still in preview so screenshot may update later). However In the <strong>Advanced Settings</strong> page during SSIS Runtime Setup (see below), Where you set Maximum Parallel Executions Per Node you will have to enter <strong>Custom Setup URL</strong>. Enter SAS URL we generated in the previous section. </div></div>
<div id="attachment_3407" style="width: 574px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-sas-url.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3407" class="size-full wp-image-3407" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-sas-url.png" alt="Enter Custom Setup SAS URL during SSIS RUntime Creation in Azure Data Factory" width="564" height="298" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-sas-url.png 564w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-custom-setup-sas-url-300x159.png 300w" sizes="(max-width: 564px) 100vw, 564px" /></a><p id="caption-attachment-3407" class="wp-caption-text">Enter Custom Setup SAS URL during SSIS RUntime Creation in Azure Data Factory</p></div>
<p>Once your SSIS Runtime setup is done you can see your Node running in Dashboard (Status must be Green checkbox with  <strong>Running</strong> ).</p>
<div id="attachment_3410" style="width: 1135px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-runtime-node-check-status.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3410" class="size-full wp-image-3410" src="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-runtime-node-check-status.png" alt="Verify SSIS Runtime Node Status in Azure Data Factory Portal" width="1125" height="329" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-runtime-node-check-status.png 1125w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-runtime-node-check-status-300x88.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-runtime-node-check-status-768x225.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/azure-data-factory-ssis-runtime-node-check-status-1024x299.png 1024w" sizes="(max-width: 1125px) 100vw, 1125px" /></a><p id="caption-attachment-3410" class="wp-caption-text">Verify SSIS Runtime Node Status in Azure Data Factory Portal</p></div>
<p>&nbsp;</p>
<h2>Unregister / Move ZappySys License</h2>
<p>There will be a time when you no longer use ADF instance or you like to use your license on a different ADF Instance. As of now there is no Customscript option for Stop action in ADF so perform the following work around to fire Unregister License command. Basically you have to restart your IR (the one which is holding your license) once to fire custom script which should contain license register action first and then unregister command right after it.</p>
<p>Here is full script to unregister your license. Make sure to use this script for old ADF instance which is being deleted or from where you like to unregister ZappySys license .</p>
<p><strong>Use below code in main.cmd</strong></p><pre class="crayon-plain-tag">set DIR=%CUSTOM_SETUP_SCRIPT_LOG_DIR%
 
echo Calling Step 1 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
dir /s /b &gt; "%DIR%\file_list.txt"
 
echo Calling Step 2 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"

::Install SSIS PowerPack
msiexec /i  "SSISPowerPackSetup_64bit.msi" ADDLOCAL=ALL /q  /L*V "%DIR%\powerpack_install_log.txt"
 
echo Calling Step 3 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
 
::Activate PowerPack license
"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -p SSISPowerPack --register "lgGAAO0QmCxxxxxxxxxxxxxxxxWSxczM=" --logfile "%DIR%\powerpack_register_log.txt"

::De-Activate same license -- This is the work around to unregister license from ADF
"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -p SSISPowerPack --unregister --logfile "%DIR%\powerpack_un_register_log.txt"
 
::Show System Info
echo Calling Step 4 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
"C:\Program Files (x86)\ZappySys\SSIS PowerPack (64 bit)\LicenseManager.exe" -i -l "%DIR%\sysinfo_log.txt"
 
echo Calling Step 5 : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
dir "C:\Program Files\Microsoft SQL Server\*Zappy*.*"  /s /b &gt;&gt; "%DIR%\installed_files.txt"
dir "C:\Program Files (x86)\Microsoft SQL Server\*Zappy*.*"  /s /b &gt;&gt; "%DIR%\installed_files.txt"
 
echo DONE : %TIME% &gt;&gt; "%DIR%\steps_log.txt"
 
echo complete</pre><p>
&nbsp;</p>
<h2>Author SSIS Packages to Run in Azure Datafactory</h2>
<p>Once your SSIS Runtime is set up and running your next step is to Author and Deploy SSIS Packages.</p>
<ul>
<li>To create SSIS Packages which can run in Azure Data Factory you must need <a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt?view=sql-server-2017" rel="noopener">SSDT BI for VS 2015 or higher</a></li>
</ul>
<h2>Change SSIS Project TargetServerVersion</h2>
<p>Before you deploy package to ADF you must change to to the supported Runtime by ADF. As of now 2017 (i.e. SQL Server 2017) is supported runtime so choose that one.</p>
<ul>
<li>Make sure packages are <a href="https://zappysys.zendesk.com/hc/en-us/articles/115004811573-How-to-change-SSIS-Package-Version-in-Visual-Studio-2015-or-Higher" rel="noopener">set to SQL 2017 Compatibility mode</a> (<strong>This is a must if you are using ZappySys SSIS PowerPack</strong>)</li>
</ul>
<div id="attachment_10195" style="width: 811px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/change-ssis-targetserverversion.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10195" class="size-full wp-image-10195" src="https://zappysys.com/blog/wp-content/uploads/2018/05/change-ssis-targetserverversion.png" alt="Change SSIS TargetServerVersion Property" width="801" height="499" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/change-ssis-targetserverversion.png 801w, https://zappysys.com/blog/wp-content/uploads/2018/05/change-ssis-targetserverversion-300x187.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/05/change-ssis-targetserverversion-768x478.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/05/change-ssis-targetserverversion-436x272.png 436w" sizes="(max-width: 801px) 100vw, 801px" /></a><p id="caption-attachment-10195" class="wp-caption-text">Change SSIS TargetServerVersion Property</p></div>
<h2>Using Visual Studio to Deploy SSIS Packages to Azure (i.e. ADF SSIS-IR)</h2>
<p>If you are using latest version of Visual Studio (<strong>VS2017 or Higher</strong>) then you can also deploy SSIS Project right from Visual Studio (See below).</p>
<div id="attachment_8682" style="width: 759px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/visual-studio-2017-2019-deploy-ssis-packages-azure-data-factory-ssis-ir-adf.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8682" class="size-full wp-image-8682" src="https://zappysys.com/blog/wp-content/uploads/2018/05/visual-studio-2017-2019-deploy-ssis-packages-azure-data-factory-ssis-ir-adf.png" alt="Deploy SSIS Packages to Azure Data Factory from Visual Studio 2017 / 2019" width="749" height="609" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/visual-studio-2017-2019-deploy-ssis-packages-azure-data-factory-ssis-ir-adf.png 749w, https://zappysys.com/blog/wp-content/uploads/2018/05/visual-studio-2017-2019-deploy-ssis-packages-azure-data-factory-ssis-ir-adf-300x244.png 300w" sizes="(max-width: 749px) 100vw, 749px" /></a><p id="caption-attachment-8682" class="wp-caption-text">Deploy SSIS Packages to Azure Data Factory from Visual Studio 2017 / 2019</p></div>
<h2>Using SSMS to Deploy / Execute SSIS Packages to Azure (i.e. ADF SSIS-IR)</h2>
<p>Now let&#8217;s talk how to deploy SSIS Packages from your local machine to SSISDB in Azure. The process is pretty same just like how you do when deploying SSIS to On-Premises SQL Server Instance except for few steps.</p>
<ul>
<li>One important thing to remember is to deploy SSIS Packages to Azure Data Factory you must use <a href="https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-2017" rel="noopener">SSMS v17.x or Higher</a> (Older version of SSMS doesn&#8217;t support ADF SSIS Deployment)</li>
<li>Another important thing is when you connect to SQL Server Instance in Azure make sure you Click on Options on the Connect dialogbox and enter <strong>SSISDB</strong> in the Connect to database</li>
</ul>
<p>Other than those two things all steps to deploy SSIS your packages to Azure Data Factory are <a href="https://docs.microsoft.com/en-us/sql/integration-services/lift-shift/ssis-azure-deploy-run-monitor-tutorial?view=sql-server-2017">listed here</a>.</p>
<p>Here are the steps to connect to SSISDB Catalog for ADF SSIS-IR</p>
<ol>
<li>Launch <strong>SSMS</strong> and click <strong>Connect</strong> -&gt; <strong>Database Engine</strong></li>
<li>Now on connection dialog box, Enter your Azure SQL Server FullyQualified Domain Name , UserID and  Password</li>
<li>Go to <strong>Connection Properties Tab</strong> like below and enter SSIS Catalog DB as <strong>SSISDB</strong></li>
<li>Click OK and thats it. You will see Integration Services Catalog node in SSMS. If you didnt enter Catalog name as previous step then this special node is not visible in SSMS.</li>
</ol>
<div id="attachment_8680" style="width: 231px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssms-connect-database-engine.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8680" class="size-full wp-image-8680" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssms-connect-database-engine.png" alt="Connect to Database from SSMS" width="221" height="270" /></a><p id="caption-attachment-8680" class="wp-caption-text">Connect to Database from SSMS</p></div>
<div id="attachment_3411" style="width: 522px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssms-connect-to-ssisdb-packages-deploy-azure-data-factory-adf.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3411" class="wp-image-3411 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssms-connect-to-ssisdb-packages-deploy-azure-data-factory-adf.png" alt="Connect to Azure Data Factory - SSISDB via SSMS 17.x Or Higher ( Deploy / Monitor SSIS Packages) (Run SSIS in Azure Data Factory)" width="512" height="779" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssms-connect-to-ssisdb-packages-deploy-azure-data-factory-adf.png 512w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssms-connect-to-ssisdb-packages-deploy-azure-data-factory-adf-197x300.png 197w" sizes="(max-width: 512px) 100vw, 512px" /></a><p id="caption-attachment-3411" class="wp-caption-text">Connect to Azure Data Factory &#8211; SSISDB via SSMS 17.x Or Higher ( Deploy / Monitor SSIS Packages)</p></div>
<p>&nbsp;</p>
<div id="attachment_3414" style="width: 368px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-deploy-ssms-ui.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3414" class="size-full wp-image-3414" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-deploy-ssms-ui.png" alt="Deploy SSIS Package to Azure Data Factory using SSMS UI (Wizard mode)" width="358" height="171" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-deploy-ssms-ui.png 358w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-deploy-ssms-ui-300x143.png 300w" sizes="(max-width: 358px) 100vw, 358px" /></a><p id="caption-attachment-3414" class="wp-caption-text">Deploy SSIS Package to Azure Data Factory using SSMS UI (Wizard mode)</p></div>
<h2>Test / Execute and Monitor SSIS Package via SSMS UI</h2>
<p>To execute SSIS Package via SSMS UI you can use below steps.</p>
<ol>
<li>Connect to SSISDB server using the technique listed in the previous section</li>
<li>Navigate to Integration Services Catalog &gt; Your Folder &gt; Your Project &gt; Your Package &gt; Right Click and execute
<div id="attachment_3415" style="width: 386px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execut-ssms-ui.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3415" class="size-full wp-image-3415" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execut-ssms-ui.png" alt="Execute SSIS Package using SSMS UI" width="376" height="291" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execut-ssms-ui.png 376w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-execut-ssms-ui-300x232.png 300w" sizes="(max-width: 376px) 100vw, 376px" /></a><p id="caption-attachment-3415" class="wp-caption-text">Execute SSIS Package using SSMS UI</p></div></li>
<li>To monitor or view past execution, Navigate to Integration Services Catalog &gt; Your Folder &gt; Your Project &gt; Your Package &gt; Right Click and Reports &gt; Standard Reports &gt; View All Executions
<div id="attachment_3416" style="width: 728px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-monitor-execution-view-log-report-ssms-ui.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-3416" class="wp-image-3416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-monitor-execution-view-log-report-ssms-ui.png" alt="Monitor SSIS Package Execution using SSMS UI (Run SSIS in Azure Data Factory)" width="718" height="366" srcset="https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-monitor-execution-view-log-report-ssms-ui.png 718w, https://zappysys.com/blog/wp-content/uploads/2018/05/ssis-package-monitor-execution-view-log-report-ssms-ui-300x153.png 300w" sizes="(max-width: 718px) 100vw, 718px" /></a><p id="caption-attachment-3416" class="wp-caption-text">Monitor SSIS Package Execution using SSMS UI</p></div></li>
</ol>
<h2></h2>
<p>&nbsp;</p>
<h2>Schedule SSIS Package in Azure Data Factory</h2>
<p>In Azure there is no SQL Agent like feature we have for on-premises SQL Server so how do you schedule packages when you deploy to ADF ? Well there is slightly different approach in ADF. You need to use feature called Trigger. Check this article to <a href="https://docs.microsoft.com/en-us/azure/data-factory/how-to-schedule-azure-ssis-integration-runtime" target="_blank" rel="noopener">learn how to schedule SSIS Package in Azure (Use Trigger)</a></p>
<p>Here are few more approaches to <a href="https://docs.microsoft.com/en-us/sql/integration-services/lift-shift/ssis-azure-schedule-packages?view=sql-server-2017" target="_blank" rel="noopener">to schedule SSIS Packages deployed in Azure Data Factory</a></p>
<p>If you want to schedule SSIS Package stored in Azure Data Factory on your On-Premises server then you can use Linked Server approach mentioned in the next section. You can create a new T-SQL Job Step and call a user-defined stored procedure which can trigger SSIS package execution as per next T-SQL code.</p>
<p>&nbsp;</p>
<h2>Execute and Monitor SSIS Package via T-SQL Code in Azure Data Factory</h2>
<p>In a real-world scenario, you have to execute SSIS Packages in an automated way from code or trigger execution on certain schedule. Microsoft has <a href="https://docs.microsoft.com/en-us/sql/integration-services/lift-shift/ssis-azure-schedule-packages?view=sql-server-2017" target="_blank" rel="noopener">documented this scenario here</a> but below section will add few more details which you may find very useful. Basically, if you wish to call or schedule Azure Data Factory SSIS packages from your remote server job (i.e .Calling SSIS from On-Premises Agent Job via Job &gt; Job Step &gt; Integration Services Step ) then there are few caveats you should know. SQL Server Agent Job doesn&#8217;t allow Mixed Mode Authentication for SSISDB to call SSIS Packages (If you check Job Step UI in SQL Agent supports only Windows Authentication).</p>
<p>Well, not to worry solution is not too hard. There is an easy way you can <strong>trigger remote SSIS package execution</strong> by using <strong>Linked Server</strong> approach<strong> </strong>(i.e .Call SSIS Packages stored in Azure Data Factory SSISDB).</p>
<p>So let&#8217;s look at how to execute and monitor ADF SSIS Packages using Linked Server.</p>
<h3>Create a Linked server for SSISDB (Azure SQL DB)</h3>
<p>To <strong>execute and monitor SSIS Package execution from a remote machine</strong> first step is to create a Linked Server which points to a remote server which contains <strong>SSISDB</strong> catalog. This way you can call T-SQL Step in your Agent Job to trigger SSIS execution on the remote machine (e.g. Azure Data Factory SSISDB). When you create linked server make sure to enable <strong>rpc</strong> property as below.</p>
<p>&nbsp;</p><pre class="crayon-plain-tag">USE [master]
GO
--DROP Linked Server
--EXEC master.dbo.sp_dropserver @server=N'SSISDB_ON_ADF', @droplogins='droplogins'

--CREATE Linked Server
EXEC master.dbo.sp_addlinkedserver 
	@server = N'SSISDB_ON_ADF', 
	@srvproduct=N'', 
--- For MSSQL 2012, 2014, 2016, 2017, and 2019 use below (SQL Server Native Client 11.0)---
    @provider=N'SQLNCLI11',
--- For MSSQL 2022 or higher use below (Microsoft OLE DB Driver for SQL Server)---
--- @provider=N'MSOLEDBSQL',
	@datasrc=N'my-azure-db-server001.database.windows.net,1433', 
	@catalog=N'SSISDB'

EXEC master.dbo.sp_addlinkedsrvlogin 
	@rmtsrvname=N'SSISDB_ON_ADF',
	@useself=N'False',
	@locallogin=NULL,
	@rmtuser=N'zsadmin',
	@rmtpassword='MyAdminUserPass@123'
GO
EXEC master.dbo.sp_serveroption @server=N'SSISDB_ON_ADF', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'SSISDB_ON_ADF', @optname=N'rpc out', @optvalue=N'true'
GO</pre><p>
&nbsp;</p>
<p>Once you have linked server created for SSISDB you can call it from your Agent Job Step. Use T-SQL step to call user-defined stored procedure which can call SSIS package execution mentioned in next few sections.</p>
<h3>Execute SSIS Package via T-SQL Code (Set Parameters, Environment)</h3>
<p>Now connect to your server where linked server is created (i.e. your On-Premises server). There are mainly 3 steps to trigger SSIS package execution via code.</p>
<ol>
<li>Create execution instance, Optionally you can supply SSIS Environment ID (grab execution id and store into some variable for later use)</li>
<li>Set System, User Parameters</li>
<li>Start package execution</li>
</ol>
<p>&nbsp;</p>
<p>You can set some SYSTEM variables for your execution or set Package level or Project level User defined SSIS Variables for your execution. You can also set SSIS environment ID (@reference_id when you create execution)</p><pre class="crayon-plain-tag">declare @my_execution_id bigint

exec [SSISDB_ON_ADF].SSISDB.catalog.create_execution 
	@folder_name = 'MyFolder'
	,@project_name = 'MySSISProject'
	,@package_name = 'MyPackage.dtsx'
	,@reference_id = null
	,@execution_id = @my_execution_id output

	
--///////////////////////////
--Set Parameters
--///////////////////////////
--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017
exec [SSISDB_ON_ADF].SSISDB.catalog.set_execution_parameter_value  @my_execution_id, 50, 'FilePath', 'C:\Temp\Dump.json'  
exec [SSISDB_ON_ADF].SSISDB.catalog.set_execution_parameter_value  @my_execution_id, 50, 'TargetServerName', 'Server001'  

--///////////////////////////
--Start Execution
--///////////////////////////
--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-2017
exec [SSISDB_ON_ADF].SSISDB.catalog.start_execution @my_execution_id</pre><p>
&nbsp;</p>
<p>To wait until package execution is done, you can set SYNCHRONIZED=1 like below</p><pre class="crayon-plain-tag">declare @my_execution_id bigint

exec [SSISDB_ON_ADF].SSISDB.catalog.create_execution 
	@folder_name = 'MyFolder'
	,@project_name = 'MySSISProject'
	,@package_name = 'MyPackage.dtsx'
	,@reference_id = null
	,@execution_id = @my_execution_id output


--///////////////////////////
--Wait until execution is done
--///////////////////////////
-- IF You want to wait until execution is done. If you enable this then no need for status check loop
--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017
EXEC [SSISDB_ON_ADF].[SSISDB].[catalog].[set_execution_parameter_value] 
	@my_execution_id,  
	@object_type=50, 
	@parameter_name=N'SYNCHRONIZED', 
	@parameter_value=1

--///////////////////////////
--Start Execution
--///////////////////////////
--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-2017
exec [SSISDB_ON_ADF].SSISDB.catalog.start_execution @my_execution_id</pre><p>
If you are using SSIS Environment to specify parameter set at runtime then use below approach to first get correct environment reference id and set for your execution.</p>
<p>&nbsp;</p><pre class="crayon-plain-tag">declare @my_execution_id bigint
declare @my_env_refid int

select @my_env_refid=reference_id from [SSISDB_ON_ADF].[SSISDB].[catalog].environment_references 
where environment_name='DEV_ENV'

exec [SSISDB_ON_ADF].SSISDB.catalog.create_execution 
	@folder_name = 'MyFolder'
	,@project_name = 'MySSISProject'
	,@package_name = 'MyPackage.dtsx'
	,@reference_id = @my_env_refid
	,@execution_id = @my_execution_id output

--///////////////////////////
--Start Execution
--///////////////////////////
--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-2017
exec [SSISDB_ON_ADF].SSISDB.catalog.start_execution @my_execution_id</pre><p>
&nbsp;</p>
<h3>Monitor SSIS Package Execution via Code (view Log / Errors)</h3>
<p>Here is the query to find out execution status of your SSIS package. Notice how each numeric code maps to the status description.</p><pre class="crayon-plain-tag">select folder_name,project_name,package_name,status_text=case 
	when status=1 then 'Created' 
	when status=2 then 'Running' 
	when status=3 then 'Cancelled' 
	when status=4 then 'Failed' 
	when status=5 then 'Pending' 
	when status=6 then 'Ended Unexpectedly' 
	when status=7 then 'Succedded' 
	when status=8 then 'Stopping' 
	when status=9 then 'Completed' 
	else 'Not Sure'
	end
from [SSISDB_ON_ADF].SSISDB.catalog.executions  where execution_id=@my_execution_id</pre><p>
&nbsp;</p>
<p>To <strong>view SSIS package execution log</strong> you can use below query.  Notice how we have used XML datatype. This is a workaround to see the long string in SSMS result grid. If you have more than 8000 characters in your log record then SSMS cant display by default.</p><pre class="crayon-plain-tag">--///////////////////
--Full Log
--///////////////////
--SELECT cast('&lt;![CDATA[' + message + ']]&gt;' as XML) 
SELECT top 1000 event_message_id as id
	, datalength(message) message_length
	, message
	, try_cast('&lt;![CDATA[' + message + ']]&gt;' as XML) as message_xml
	, message
	, package_name, event_name, message_source_name,@my_execution_id execid,message_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            [SSISDB_ON_ADF].SSISDB.catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%') 
			--and event_message_id=20303352
	) AS q
--Where q.event_name='OnError'
ORDER BY event_message_id DESC</pre><p>
&nbsp;</p>
<p>To <strong>view only errors for SSIS Package execution</strong> use below query (replace @my_execution_id with your own value)</p><pre class="crayon-plain-tag">--///////////////////
----Show Just Errors
--///////////////////
SELECT top 100 @my_execution_id ExecID,message, package_name, event_name, message_source_name,message_time as start_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            [SSISDB_ON_ADF].SSISDB.catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%')
	) AS q
Where q.event_name='OnError'
ORDER BY message_time DESC</pre><p>
&nbsp;</p>
<h3>Full T-SQL Code</h3>
<p>Here is the full source code of all steps we discussed.</p><pre class="crayon-plain-tag">/*
 Author: ZappySys
 Description: Execute, Monitor, run SSIS on Azure Data Factory
 - This script demonstrates few aspects of SSIS package execution via code (call system stored procedures)
	&gt;&gt; How to execute SSIS package via sa tored procedure call
	&gt;&gt; How to set package parameters via code
	&gt;&gt; How to set environment via code
	&gt;&gt; How to monitor SSIS package execution via T-SQL code
	&gt;&gt; How to check SSIS package execution status / error and execution log
 - Feel free to modify and comment uncomment certain sections to meet your need.
 - We used Linked server approach with 4 parts naming in objects e.g. [SSISDB_ON_ADF].SSISDB.catalog.objectnamHere
 - If you are running this script directly on the server where SSISDB is stored then no need for 4 parts. (just use 3 parts SSISDB.catalog.objectnamHere) 
 we are outputting message column in xml format too so you get na ice hyper link to see the full message. This technique is needed to overcome string length limitation of SSMS

USE below script to create linked server -- Needed for Azure Data Factory - SSIS Runtime (Remote execution and Monitoring)

USE [master]
GO
--DROP Linked Server
--EXEC master.dbo.sp_dropserver @server=N'SSISDB_ON_ADF', @droplogins='droplogins'

--CREATE Linked Server
--For MSSQL 2012, 2014, 2016, 2017, and 2019 use below (SQL Server Native Client 11.0)---
EXEC master.dbo.sp_addlinkedserver @server = N'SSISDB_ON_ADF', @srvproduct=N'', @provider=N'SQLNCLI11', @datasrc=N'my-azure-db-server001.database.windows.net,1433', @catalog=N'SSISDB'
--For MSSQL 2022 or higher use below (Microsoft OLE DB Driver for SQL Server)---
--EXEC master.dbo.sp_addlinkedserver @server = N'SSISDB_ON_ADF', @srvproduct=N'', @provider=N'MSOLEDBSQL', @datasrc=N'my-azure-db-server001.database.windows.net,1433', @catalog=N'SSISDB'

EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'SSISDB_ON_ADF',@useself=N'False',@locallogin=NULL,@rmtuser=N'zsadmin',@rmtpassword='MyAdminUserPass@123'
GO
EXEC master.dbo.sp_serveroption @server=N'SSISDB_ON_ADF', @optname=N'rpc', @optvalue=N'true'
GO
EXEC master.dbo.sp_serveroption @server=N'SSISDB_ON_ADF', @optname=N'rpc out', @optvalue=N'true'
GO
--Below needed to support EXEC + INSERT (dynamic query)
EXEC master.dbo.sp_serveroption @server=N'SSISDB_ON_ADF, @optname=N'remote proc transaction promotion', @optvalue=N'false'
GO
 */

declare @my_folder_name varchar(255)= 'AdfExamples'
declare @my_project_name varchar(255) = 'SSISNativeExamples'
declare @my_package_name varchar(255) = 'HelloWorld.dtsx'
declare @my_environment_name varchar(255) = null  --e.g. This is SSIS Environment to attach with this execution (e.g. ENV_DEV , ENV_PROD)
--declare @my_environment_name varchar(255) = 'ENV_DEV'
	  
declare @my_execution_id bigint=null 
--declare @my_execution_id bigint=1200 --enter execid to see log

declare @starttime datetime
declare @statusLoop bit

--///////////////////////
--UN-COMMENT THIS if you just want to see last execution log rather than execute new one
--IF you just need to query status of last execution 
--///////////////////////
if(@my_execution_id is null)
	Select @statusLoop=0, @my_execution_id=Max(execution_id), @startTime = Max(start_time) From [SSISDB_ON_ADF].SSISDB.catalog.executions 


if(@my_execution_id is null)
begin
	set @statusLoop=1 
	
	declare @my_env_refid int
	select @my_env_refid=reference_id from [SSISDB_ON_ADF].[SSISDB].[catalog].environment_references where environment_name=@my_environment_name

	--First create Execution and get ExecutionID in a variable
	--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-create-execution-ssisdb-database?view=sql-server-2017
	exec [SSISDB_ON_ADF].SSISDB.catalog.create_execution 
	  @folder_name = @my_folder_name
	 ,@project_name = @my_project_name
	 ,@package_name = @my_package_name
	 ,@reference_id = @my_env_refid
	 ,@execution_id = @my_execution_id output

	 --///////////////////////////
	--Wait until execution is done
	--///////////////////////////
	 -- IF You want to wait until execution is done. If you enable this then no need for status check loop
	 --https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017
	EXEC [SSISDB_ON_ADF].[SSISDB].[catalog].[set_execution_parameter_value] 
		@my_execution_id,  
		@object_type=50, 
		@parameter_name=N'SYNCHRONIZED', 
		@parameter_value=1
	set @statusLoop=0 --if you enable this option no need for statucheck
	
	--///////////////////////////
	--Set Parameters
	--///////////////////////////
	--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-set-execution-parameter-value-ssisdb-database?view=sql-server-2017
	--exec [SSISDB_ON_ADF].SSISDB.catalog.set_execution_parameter_value  @my_execution_id, 50, 'FilePath', 'C:\Temp\Dump.json'  
	--exec [SSISDB_ON_ADF].SSISDB.catalog.set_execution_parameter_value  @my_execution_id, 50, 'TargetServerName', 'Server001'  

	--///////////////////////////
	--Start Execution
	--///////////////////////////
	--https://docs.microsoft.com/en-us/sql/integration-services/system-stored-procedures/catalog-start-execution-ssisdb-database?view=sql-server-2017
	exec [SSISDB_ON_ADF].SSISDB.catalog.start_execution @my_execution_id
end

--///////////////////////////
--Status check loop for wait
--///////////////////////////
---comment these two lines if set SYNCHRONIZED = 1
if(@statusLoop = 1)
WHILE @my_execution_id IN (1,2,5,8)
	WAITFOR DELAY '00:03'
--

 select folder_name,project_name,package_name,status_text=case 
	when status=1 then 'Created' 
	when status=2 then 'Running' 
	when status=3 then 'Cancelled' 
	when status=4 then 'Failed' 
	when status=5 then 'Pending' 
	when status=6 then 'Ended Unexpectedly' 
	when status=7 then 'Succedded' 
	when status=8 then 'Stopping' 
	when status=9 then 'Completed' 
	else 'Not Sure'
	end
from [SSISDB_ON_ADF].SSISDB.catalog.executions  where execution_id=@my_execution_id


--///////////////////
----Show Just Errors
--///////////////////
SELECT top 10 @my_execution_id ExecID,message, package_name, event_name, message_source_name,message_time as start_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            [SSISDB_ON_ADF].SSISDB.catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%')
	) AS q
Where q.event_name='OnError'
ORDER BY message_time DESC

--///////////////////
----Full Log
--///////////////////
--SELECT cast('&lt;![CDATA[' + message + ']]&gt;' as XML) 
SELECT top 1000 event_message_id as id
	, datalength(message) message_length
	, message
	, try_cast('&lt;![CDATA[' + message + ']]&gt;' as XML) as message_xml
	, message
	, package_name, event_name, message_source_name,@my_execution_id execid,message_time
FROM   (SELECT        
		event_message_id, operation_id, message_time, message_type, message_source_type, message, extended_info_id, package_name,
        event_name, message_source_name, message_source_id, subcomponent_name, package_path, execution_path, threadID,
        message_code
        FROM            [SSISDB_ON_ADF].SSISDB.catalog.event_messages AS em
        WHERE   (operation_id =@my_execution_id) 
			AND (event_name NOT LIKE '%Validate%') 
			--and event_message_id=20303352
	) AS q
--Where q.event_name='OnError'
ORDER BY event_message_id DESC</pre><p>
&nbsp;</p>
<h2>Creating ADF SSIS &#8211; IR using PowerShell</h2>
<p>You can also create Azure Data Factory &#8211; SSIS Integration Runtime using PowerShell Code. <a href="https://docs.microsoft.com/en-us/azure/data-factory/tutorial-deploy-ssis-packages-azure-powershell">Check this article</a>. Make sure you enter SAS URL for <pre class="crayon-plain-tag">$SetupScriptContainerSasUri</pre>  parameter.</p>
<h2>Save Cost &#8211; Run SSIS-IR on demand (Start / Stop Runtime from Pipeline Activity)</h2>
<p>There will be a time when you like to execute package once a day or once a week. Which means you will pay Cost of your SSIS-IR for unused time too. If you like to save cost on your SSIS runtime unused time you can check below links for similar topic.</p>
<p><a href="https://docs.microsoft.com/en-us/azure/data-factory/how-to-schedule-azure-ssis-integration-runtime" target="_blank" rel="noopener">https://docs.microsoft.com/en-us/azure/data-factory/how-to-schedule-azure-ssis-integration-runtime</a></p>
<p><a href="https://andyleonard.blog/2019/02/start-azure-ssis-execute-package-stop-azure-ssis/" target="_blank" rel="noopener">https://andyleonard.blog/2019/02/start-azure-ssis-execute-package-stop-azure-ssis/</a></p>
<p><a href="http://microsoft-ssis.blogspot.com/2018/04/start-and-stop-integration-runtime-in.html" target="_blank" rel="noopener">http://microsoft-ssis.blogspot.com/2018/04/start-and-stop-integration-runtime-in.html</a></p>
<p>Basically idea is to Start SSIS Runtime just before you need to execute SSIS Package and Stop SSIS Runtime when you are done so you don&#8217;t incur any charges of unused SSIS-IR hours. This technique can save you huge amount of $$$ if you are executing SSIS Packages occasionally in ADF.</p>
<h2>Access On-Premises Files in ADF-SSIS IR node</h2>
<p>Utilize the serverless capabilities of Azure Data Factory to seamlessly interact with an Access file system. By configuring your ADF pipelines, you can perform operations on Access files while taking advantage of serverless computing resources. At some point, you may encounter the need to interact with a file system through SSIS Tasks, such as Excel Source or File System Task, while your jobs are executing in a cloud environment. Wondering how to address this challenge? Explore the article below to discover effective workarounds for implementing these solutions.</p>
<p><a href="https://docs.microsoft.com/en-us/azure/data-factory/ssis-azure-files-file-shares" target="_blank" rel="noopener">Open and save files on-premises and in Azure with SSIS packages deployed in Azure</a></p>
<h2>Using Static IP for ADF Cluster (VNet) &#8211; For External System Firewall Whitelisting</h2>
<p>There will be a time when your ADF SSIS-IR needs to access an external system (e.g., AWS RDS-SQL Server) where only whitelisted IPs are allowed to access resources. In such a case, you must assign a static IP to ADF so other systems can allow that IP address in the Firewall White list.</p>
<p>For this purpose you have to join your ADF into VNet (Virtual Network) and then assign Static IP as explained <a href="https://learn.microsoft.com/en-us/azure/data-factory/join-azure-ssis-integration-runtime-virtual-network" target="_blank" rel="noopener">in this article</a>.</p>
<div class="su-note"  style="border-color:#e5dd9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF7B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">When you join the ADF SSIS-IR cluster in VNet, then Fast Provisioning is disabled. This means your cluster can take a longer time to start. </div></div>
<h2>Troubleshooting Common Errors</h2>
<h3>Cannot find custom setup script (main.cmd) in your Azure blob container</h3>
<p>When you face the below error, make sure you regenerate the SAS URL with &#8220;Create&#8221; permission along with &#8220;Read,&#8221; &#8220;Write,&#8221; and &#8220;List.&#8221; In some cases, Create permission is needed, and Cluster start fails.</p>
<h2>Conclusion</h2>
<p>New features in Microsoft Azure Data Factory V2 gives you truly managed option at low cost to Deploy, Execute and Monitor SSIS Packages. Using ZappySys <a href="https://zappysys.com/products/odbc-powerpack/">SSIS PowerPack you can add 70+ new tasks/connectors</a> to your Azure Data Factory SSIS Runtime. Download and try <a href="https://zappysys.com/products/odbc-powerpack/">SSIS PowerPack</a> to find out many new API / Cloud focused features for a connected world.</p>
<p>&nbsp;</p>
<p>The post <a href="https://zappysys.com/blog/run-ssis-azure-data-factory-deploy-monitor-ssis-cloud/">How to run SSIS in Azure Data Factory (Deploy, Monitor SSIS in Cloud)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to configure Zendesk OAuth Application and Connection for REST API</title>
		<link>https://zappysys.com/blog/configure-zendesk-oauth-application-for-rest-api-call/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 19 Dec 2017 16:44:40 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[oauth2]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[ssis json source]]></category>
		<category><![CDATA[zendesk]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2384</guid>

					<description><![CDATA[<p>Introduction To consume Zendesk data using the REST API, you can use different methods. Now, let&#8217;s see how to create an OAuth Application so you don&#8217;t have to rely on a static Token or a UserID/Password to access data. The OAuth method is more secure and recommended over other methods, so whenever possible, use it. [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/configure-zendesk-oauth-application-for-rest-api-call/">How to configure Zendesk OAuth Application and Connection for REST API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#FFF8B7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><strong>UPDATE:</strong> ZappySys has released a brand new <a href="https://zappysys.com/api/integration-hub/zendesk-connector/">API Connector for Zendesk Online</a>, which makes it much simpler to <strong>Read/Write Zendesk Data in SSIS</strong> compared to the steps listed in this article. You can still use the steps from this article, but if you are new to APIs or want to avoid the learning curve, use a newer approach.</p>
<p><span style="box-sizing: border-box; margin: 0px; padding: 0px;">Please visit <a href="https://zappysys.com/api/integration-hub/" target="_blank" rel="noopener">this page to see all</a> pre-configured, ready-to-use API connectors<span style="box-sizing: border-box; margin: 0px; padding: 0px;"> you can use in <a href="https://zappysys.com/products/ssis-powerpack/ssis-api-source/" target="_blank" rel="noopener">SSIS API Source</a>/<a href="https://zappysys.com/products/ssis-powerpack/ssis-api-destination/" target="_blank" rel="noopener">SSIS API Destination</a> or the <a href="https://zappysys.com/products/odbc-powerpack/odbc-api-driver/" target="_blank" rel="noopener">API ODBC Driver</a> (for non-SSIS Apps such as Excel, Power BI, and </span>Informatica).</span></p>
</div></div>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/zendesk-api-integration.png"><img loading="lazy" decoding="async" class=" wp-image-1628 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2015/10/zendesk-api-integration.png" alt="" width="90" height="90" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/zendesk-api-integration.png 200w, https://zappysys.com/blog/wp-content/uploads/2015/10/zendesk-api-integration-150x150.png 150w" sizes="(max-width: 90px) 100vw, 90px" /></a>To consume Zendesk data using the REST API, you can use <a href="https://zappysys.com/blog/tag/zendesk/" target="_blank" rel="noopener">different methods</a>. Now, let&#8217;s see how to create an OAuth Application so you don&#8217;t have to rely on a static Token or a UserID/Password to access data.</p>
<p>The OAuth method is more secure and recommended over other methods, so whenever possible, use it.</p>
<h2></h2>
<h2>Create Zendesk OAuth Application</h2>
<p>To create an OAuth App for Zendesk, perform the following steps.</p>
<ol>
<li>Log in to your Zendesk Portal. And go tothe  following URL (This step assumes you have admin rights to createan  OAuth App)<br />
<pre class="crayon-plain-tag">https://zappysys.zendesk.com/agent/admin/api/oauth_clients</pre>
<div id="attachment_2385" style="width: 878px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/create-configure-zendesk-oauth-application.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2385" class="size-full wp-image-2385" src="https://zappysys.com/blog/wp-content/uploads/2017/12/create-configure-zendesk-oauth-application.png" alt="How to create Zendesk OAuth Application for REST API Access in SSIS" width="868" height="384" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/create-configure-zendesk-oauth-application.png 868w, https://zappysys.com/blog/wp-content/uploads/2017/12/create-configure-zendesk-oauth-application-300x133.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/create-configure-zendesk-oauth-application-768x340.png 768w" sizes="(max-width: 868px) 100vw, 868px" /></a><p id="caption-attachment-2385" class="wp-caption-text">How to create a Zendesk OAuth Application for REST API Access</p></div></li>
<li>After clicking on the plus sign and entering app information (e.g., Display name, Unique ID, also known as ClientId or AppId )
<div id="attachment_2386" style="width: 1318px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/zendesk-create-oauth-application-for-rest-api-access.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2386" class="size-full wp-image-2386" src="https://zappysys.com/blog/wp-content/uploads/2017/12/zendesk-create-oauth-application-for-rest-api-access.png" alt="Configure Zendesk OAuth App" width="1308" height="926" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/zendesk-create-oauth-application-for-rest-api-access.png 1308w, https://zappysys.com/blog/wp-content/uploads/2017/12/zendesk-create-oauth-application-for-rest-api-access-300x212.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/zendesk-create-oauth-application-for-rest-api-access-768x544.png 768w, https://zappysys.com/blog/wp-content/uploads/2017/12/zendesk-create-oauth-application-for-rest-api-access-1024x725.png 1024w" sizes="(max-width: 1308px) 100vw, 1308px" /></a><p id="caption-attachment-2386" class="wp-caption-text">Configure Zendesk OAuth App</p></div></li>
<li>All the way at the bottom of that page, you will see <strong>Secret (i.e.</strong>,<strong> Client Secret)</strong>. Save that along with a unique identifier for later use.</li>
<li>That&#8217;s it. Now you can start using the Zendesk OAuth App to access the REST API</li>
</ol>
<p>Understanding Scopes</p>
<p>In the next section, you will learn how to configure an OAuth connection. During that, you will need to specify scopes (Token Permissions you want to grant).</p>
<p>The syntax to define the scope is as follows. Scope can be <strong>read-only</strong>, <strong>write-only,</strong> or read-write. The resource is an optional part. If you omit the scope, it will be applied to all.</p><pre class="crayon-plain-tag">resource:scope</pre><p>
<p class="p">You can use the following resource scope for the following resources:</p>
<div class="p">
<ul id="topic_gql_kbd_gt__ul_idz_gcd_gt" class="ul">
<li class="li">tickets</li>
<li class="li">users</li>
<li class="li">auditlogs (read only)</li>
<li class="li">organizations</li>
<li class="li">hc</li>
<li class="li">apps</li>
<li class="li">triggers</li>
<li class="li">automations</li>
<li class="li">targets</li>
</ul>
<p><strong>Examples of scopes for Zendesk Tickets APIs</strong></p>
</div>
<div class="p">
<pre class="crayon-plain-tag">read
write
read write
users:read
users:read users:write
users:read users:write organizations:write</pre>
</div>
<p><strong>Examples of scopes for Zendesk Chat APIs</strong></p><pre class="crayon-plain-tag">read
chat</pre><p>
<h2>Calling Zendesk REST API using SSIS PowerPack OAuth Connection</h2>
<p>Here is how you can use Zerdesk OAuth to access the API using the SSIS PowerPack <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">JSON / REST Source</a></p>
<ol>
<li>First, drag the <strong>ZS JSON Source</strong> from the SSIS Toolbox into the Data Flow designer</li>
<li>Configure JSON Source as below. Make sure you update the URL to your domain.<br />
URL for Zendesk Tickets API<br />
<pre class="crayon-plain-tag">https://{YOUR-DOMAIN}.zendesk.com/api/v2/tickets</pre>
URL for Zendesk Chat API<br />
<pre class="crayon-plain-tag">https://{YOUR-DOMAIN}.zopim.com/api/v2/chats</pre>
</li>
<li><strong>Configure the OAuth Connection</strong> As below for the <strong>Zendesk Ticket API</strong>. Scopes differ for the Ticket and Chat APIs; please enter the appropriate ones.
<div id="attachment_2387" style="width: 685px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2387" class="size-full wp-image-2387" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-1.png" alt="Configure SSIS OAuth connection for Zendesk API Access" width="675" height="615" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-1.png 675w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-1-300x273.png 300w" sizes="(max-width: 675px) 100vw, 675px" /></a><p id="caption-attachment-2387" class="wp-caption-text">Configure SSIS OAuth connection for Zendesk API Access</p></div>
<div id="attachment_2388" style="width: 679px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2388" class="size-full wp-image-2388" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-2.png" alt="Configure OAuth Redirect URL for Zendesk" width="669" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-2.png 669w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-oauth-zendesk-connection-2-300x249.png 300w" sizes="(max-width: 669px) 100vw, 669px" /></a><p id="caption-attachment-2388" class="wp-caption-text">Configure OAuth Redirect URL and Content Type</p></div></li>
<li><strong>Configure the OAuth Connection</strong> As below for the <strong>Zendesk Chat API</strong>. Scopes differ for the Ticket and Chat APIs; please enter the appropriate ones.
<div id="attachment_9134" style="width: 789px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9134" class="size-full wp-image-9134" src="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-1.png" alt="Zendesk Chat OAuth Settings - General Tab" width="779" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-1.png 779w, https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-1-300x252.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-1-768x645.png 768w" sizes="(max-width: 779px) 100vw, 779px" /></a><p id="caption-attachment-9134" class="wp-caption-text">Zendesk Chat OAuth Settings &#8211; General Tab</p></div>
<div id="attachment_9133" style="width: 790px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-2.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9133" class="size-full wp-image-9133" src="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-2.png" alt="Zendesk Chat OAuth Settings - Advanced Tab" width="780" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-2.png 780w, https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-2-300x252.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-2-768x644.png 768w" sizes="(max-width: 780px) 100vw, 780px" /></a><p id="caption-attachment-9133" class="wp-caption-text">Zendesk Chat OAuth Settings &#8211; Advanced Tab</p></div>
<div id="attachment_9132" style="width: 789px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-3.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-9132" class="size-full wp-image-9132" src="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-3.png" alt="Zendesk Chat OAuth Settings - OAuth2 Grant Options Tab" width="779" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-3.png 779w, https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-3-300x252.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/Zendesk-Chat-OAuth-3-768x645.png 768w" sizes="(max-width: 779px) 100vw, 779px" /></a><p id="caption-attachment-9132" class="wp-caption-text">Zendesk Chat OAuth Settings &#8211; OAuth2 Grant Options Tab</p></div></li>
<li>After you set the necessary parameters, click <strong>Generate Token</strong> (Login using your account with the required permission needed to access data)<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;">As of now, Zendesk doesn&#8217;t support Refresh Token. So once you click Generate Token, it will only create an Access Token (which doesn&#8217;t expire until you revoke it explicitly). The Refresh Token will be blank, as expected. </div></div><strong>OAuth 2.0 Flow (Google API Example)</strong>
<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>Configure Pagination parameters as below
<div id="attachment_1187" style="width: 559px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-pagination-settings-nextpage.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1187" class="size-full wp-image-1187" src="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-pagination-settings-nextpage.png" alt="SSIS JSON Source - Configure Zendesk REST API Pagination" width="549" height="335" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-pagination-settings-nextpage.png 549w, https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-pagination-settings-nextpage-300x183.png 300w" sizes="(max-width: 549px) 100vw, 549px" /></a><p id="caption-attachment-1187" class="wp-caption-text">SSIS JSON Source &#8211;<br />Configure Zendesk REST API Pagination</p></div></li>
<li>Select Filter
<div id="attachment_1186" style="width: 706px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-call-json-path-filter-extract-data-restful-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1186" class="size-full wp-image-1186" src="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-call-json-path-filter-extract-data-restful-api.png" alt="Select Filter - Extract Data from Zendesk API Response (Read Tickets)" width="696" height="328" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-call-json-path-filter-extract-data-restful-api.png 696w, https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-zendesk-api-call-json-path-filter-extract-data-restful-api-300x141.png 300w" sizes="(max-width: 696px) 100vw, 696px" /></a><p id="caption-attachment-1186" class="wp-caption-text">Select Filter &#8211; Extract Data from Zendesk API Response (Read Tickets)</p></div></li>
<li>Click Preview to test
<div id="attachment_1188" style="width: 849px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-extract-zendesk-tickets-rest-api-call-json-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-1188" class="size-full wp-image-1188" src="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-extract-zendesk-tickets-rest-api-call-json-source.png" alt="SSIS JSON Source - Data Preview - Zendesk REST API Call to extract tickets" width="839" height="579" srcset="https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-extract-zendesk-tickets-rest-api-call-json-source.png 839w, https://zappysys.com/blog/wp-content/uploads/2015/10/ssis-extract-zendesk-tickets-rest-api-call-json-source-300x207.png 300w" sizes="(max-width: 839px) 100vw, 839px" /></a><p id="caption-attachment-1188" class="wp-caption-text">SSIS JSON Source &#8211; Data Preview &#8211; Zendesk REST API Call to extract tickets</p></div></li>
</ol>
<h3>Adding Retry Settings for HTTP or OAuth connection</h3>
<p>Zendesk enforces an API rate limit, which means you cannot issue too many API calls in a given time frame. <a href="https://developer.zendesk.com/rest_api/docs/support/introduction#rate-limits" target="_blank" rel="noopener">Check this document</a> for exact information.</p>
<p>ZappySys provides API retry settings on both the OAuth Connection and the HTTP Connection. For Zendesk you can retry on a specific status code <strong>429</strong></p>
<ol>
<li>Open connection manager UI</li>
<li>Go to Retry-Settings page</li>
<li>Select <strong>Retry web error on matching response status code</strong>.</li>
<li>Enter <strong>429</strong> for status code</li>
<li>Check <strong>multiply wait time</strong></li>
<li>In the wait time enter <strong>5000</strong> (wait 5 seconds or multiple of 5 seconds)</li>
<li>Set Max retry count as <strong>6</strong></li>
</ol>
<p>See below example (Its not for Zendesk but will give you an idea)</p>
<div id="attachment_7156" style="width: 599px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2018/09/http-retry-settings-oauth-connection.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7156" class="size-full wp-image-7156" src="https://zappysys.com/blog/wp-content/uploads/2018/09/http-retry-settings-oauth-connection.png" alt="Retry Options" width="589" height="429" srcset="https://zappysys.com/blog/wp-content/uploads/2018/09/http-retry-settings-oauth-connection.png 589w, https://zappysys.com/blog/wp-content/uploads/2018/09/http-retry-settings-oauth-connection-300x219.png 300w" sizes="(max-width: 589px) 100vw, 589px" /></a><p id="caption-attachment-7156" class="wp-caption-text">Retry Options</p></div>
<h3>Configure Zendesk API Pagination and Filter for SSIS JSON Source</h3>
<p>The post <a href="https://zappysys.com/blog/configure-zendesk-oauth-application-for-rest-api-call/">How to configure Zendesk OAuth Application and Connection for REST API</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import / Export data from Amazon Athena using SSIS</title>
		<link>https://zappysys.com/blog/import-export-data-amazon-athena-using-ssis/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Thu, 14 Dec 2017 04:25:21 +0000</pubDate>
				<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[S3 (Simple Storage Service)]]></category>
		<category><![CDATA[SSIS Amazon S3 CSV Source]]></category>
		<category><![CDATA[SSIS Amazon S3 JSON Source]]></category>
		<category><![CDATA[SSIS Amazon Storage Task]]></category>
		<category><![CDATA[SSIS Components]]></category>
		<category><![CDATA[SSIS JSON Source (File/REST)]]></category>
		<category><![CDATA[SSIS OAuth Connection]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<category><![CDATA[SSIS REST API Task]]></category>
		<category><![CDATA[Amazon Athena]]></category>
		<category><![CDATA[CSV]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[ssis]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2367</guid>

					<description><![CDATA[<p>Introduction In our previous post we explored unlimited possibilities to call Amazon AWS API using SSIS. Now in this post we will learn how to import / export data from Amazon Athena using SSIS. Amazon Athena is very similar service like Google BigQuery which we documented already.  To read data from Amazon Athena we will use [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-export-data-amazon-athena-using-ssis/">Import / Export data from Amazon Athena using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>Introduction</h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-integration-logo.png"><img loading="lazy" decoding="async" class="wp-image-2378 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-integration-logo.png" alt="" width="147" height="115" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-integration-logo.png 510w, https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-integration-logo-300x235.png 300w" sizes="(max-width: 147px) 100vw, 147px" /></a>In our previous post we explored unlimited possibilities to <a href="https://zappysys.com/blog/how-to-call-amazon-aws-api-using-ssis-ec2-lambda-api-gateway-sqs/" target="_blank" rel="noopener">call Amazon AWS API using SSIS</a>. Now in this post we will learn how to import / export data from Amazon Athena using SSIS. Amazon Athena is very similar service like <a href="https://zappysys.com/blog/get-data-google-bigquery-using-ssis/" target="_blank" rel="noopener">Google BigQuery which we documented already</a>.  To read data from Amazon Athena we will use <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZappySys JSON / REST API Source</a> which supports excellent JSON parsing capability <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">like this</a>.</p>
<h2></h2>
<h2></h2>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we do hello world demo for calling Amazon AWS API, you will need to make sure following prerequisites are met.</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Access to valid AWS credentials (Access Key, Secret Key for your IAM User). <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" target="_blank" rel="noopener">Click here to learn more</a> about IAM users and Access Key/Secret Key</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener"><em>SSIS PowerPack</em></a> is installed. <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">Click here to download</a>.</li>
</ol>
<h2>Steps needed to read data from Amazon Athena</h2>
<p>To read data from Amazon Athena you need to do atleast 3 steps at very high level. Later on this article we will see each step in depth.</p>
<ol>
<li>Call <a href="https://docs.aws.amazon.com/athena/latest/APIReference/API_StartQueryExecution.html" target="_blank" rel="noopener">StartQueryExecution API</a> to send SQL Query (Its Job Style API so this call starts Job)</li>
<li>Keep checking Job Status by calling  <a href="https://docs.aws.amazon.com/athena/latest/APIReference/API_GetQueryExecution.html" target="_blank" rel="noopener">GetQueryExecution API</a> (In the response check State field for Status &#8211; We need to look for word SUCCESS)</li>
<li>Once Job is finished it produces CSV file in S3 Bucket (Output Location is supplied in Step-1)</li>
</ol>
<div id="attachment_8355" style="width: 923px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8355" class="size-full wp-image-8355" src="https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output.png" alt="Read Amazon Athena Query output in SSIS (S3 CSV files)" width="913" height="658" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output.png 913w, https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output-300x216.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output-768x553.png 768w" sizes="(max-width: 913px) 100vw, 913px" /></a><p id="caption-attachment-8355" class="wp-caption-text">Read Amazon Athena Query output in SSIS (S3 CSV files)</p></div>
<h2>AWS Console &#8211; Athena Query Editor / Configure Output Settings</h2>
<p>Few things you might have to setup before you can call Athena API in SSIS</p>
<ol>
<li>Make sure your IAM user has correct permission (We used existing policies for ease of use but you can use custom policy for precise permission set)</li>
<li>Configure default output location for your Athena queries</li>
</ol>
<div id="attachment_8360" style="width: 996px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/configure-amazon-athena-permission-policy.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8360" class="size-full wp-image-8360" src="https://zappysys.com/blog/wp-content/uploads/2017/12/configure-amazon-athena-permission-policy.png" alt="Configure IAM user permission to call Amazon Athena API" width="986" height="581" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/configure-amazon-athena-permission-policy.png 986w, https://zappysys.com/blog/wp-content/uploads/2017/12/configure-amazon-athena-permission-policy-300x177.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/configure-amazon-athena-permission-policy-768x453.png 768w" sizes="(max-width: 986px) 100vw, 986px" /></a><p id="caption-attachment-8360" class="wp-caption-text">Configure IAM user permission to call Amazon Athena API</p></div>
<div id="attachment_8361" style="width: 837px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/set-athena-query-output-location.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8361" class="size-full wp-image-8361" src="https://zappysys.com/blog/wp-content/uploads/2017/12/set-athena-query-output-location.png" alt="Set Athena Query Output Location" width="827" height="454" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/set-athena-query-output-location.png 827w, https://zappysys.com/blog/wp-content/uploads/2017/12/set-athena-query-output-location-300x165.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/set-athena-query-output-location-768x422.png 768w" sizes="(max-width: 827px) 100vw, 827px" /></a><p id="caption-attachment-8361" class="wp-caption-text">Set Athena Query Output Location</p></div>
<div id="attachment_8362" style="width: 1080px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-test-query-editor-aws-console.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8362" class="size-full wp-image-8362" src="https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-test-query-editor-aws-console.png" alt="Testing Athena Query inside Amazon AWS Console (Query Editor)" width="1070" height="628" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-test-query-editor-aws-console.png 1070w, https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-test-query-editor-aws-console-300x176.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-test-query-editor-aws-console-768x451.png 768w, https://zappysys.com/blog/wp-content/uploads/2017/12/amazon-athena-test-query-editor-aws-console-1024x601.png 1024w" sizes="(max-width: 1070px) 100vw, 1070px" /></a><p id="caption-attachment-8362" class="wp-caption-text">Testing Athena Query inside Amazon AWS Console (Query Editor)</p></div>
<h2>Creating Connection to call Athena API in SSIS</h2>
<p>Any API calls made to Amazon Athena service using <a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/" target="_blank" rel="noopener">ZappySys JSON / REST API Source</a>  or  <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> needs OAuth connection.</p>
<p>For REST API Task configure as below (More details about using REST API Task is in the next section).</p>
<ol>
<li>Drag ZS REST API Task from Control Flow 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 to edit.</li>
<li>Change Request URL Access Mode to [<strong>Url from Connection</strong>]</li>
<li>Now select <strong>&lt;&lt;New OAuth Connection&gt;&gt;</strong> from connection drop down</li>
<li>On OAuth connection select <strong>Amazon AWS API v4</strong> as Provider</li>
<li>Enter your <strong>Access Key</strong> and <strong>Secret Key</strong></li>
</ol>
<div class="su-note"  style="border-color:#e5de9d;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;"><div class="su-note-inner su-u-clearfix su-u-trim" style="background-color:#fff8b7;border-color:#ffffff;color:#333333;border-radius:3px;-moz-border-radius:3px;-webkit-border-radius:3px;">Amazon AWS account must have access to Athena API calls and S3 Bucket </div></div>
<div id="attachment_2370" style="width: 702px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-aws-api-connection-call-rest.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2370" class="size-full wp-image-2370" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-aws-api-connection-call-rest.png" alt="Create SSIS Connection for Amazon AWS API Call (Athena REST API Example)" width="692" height="651" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-aws-api-connection-call-rest.png 692w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-aws-api-connection-call-rest-300x282.png 300w" sizes="(max-width: 692px) 100vw, 692px" /></a><p id="caption-attachment-2370" class="wp-caption-text">Create SSIS Connection for Amazon AWS API Call (Athena REST API Example)</p></div>
<h2>Creating Table in Amazon Athena using API call</h2>
<p>For this demo we assume you have already created sample table in Amazon Athena. If you wish to automate creating amazon athena table using SSIS then you need to call <a href="https://docs.aws.amazon.com/athena/latest/ug/create-table.html" target="_blank" rel="noopener">CREATE TABLE</a> DDL command using <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a>.</p>
<ol>
<li>In the previous <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> select OAuth connection (See previous section)</li>
<li>Enter <strong>Request Url</strong> as below<strong><br />
</strong><br />
<pre class="crayon-plain-tag">https://athena.us-east-1.amazonaws.com/</pre>
</li>
<li>In the <strong>HTTP Headers</strong> enter below 2 headers<br />
<pre class="crayon-plain-tag">X-Amz-Target: AmazonAthena.StartQueryExecution
Content-Type: application/x-amz-json-1.1</pre>
</li>
<li>Change Request method to <strong>POST</strong></li>
<li>In the Body enter below<br />
<pre class="crayon-plain-tag">{
 "ResultConfiguration": {
 "OutputLocation": "s3://my-bucket/output-files/"
 },
 "QueryString": "create external table tbl01 (CustomerID STRING, CompanyName STRING) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' LOCATION 's3://my-bucket/input-files/';",
 "ClientRequestToken": "{{System::ExecutionInstanceGUID}}"
}</pre>
<strong>Notice:</strong> Rather than using hard coded  DDL SQL Statement we can use variable placeholder (e.g. <pre class="crayon-plain-tag">"QueryString": "{{User::Query,FUN_JSONENCODE}}"</pre>   ). Use <pre class="crayon-plain-tag">FUN_JSONENCODE</pre> to replace new line with \r\n else JSON becomes invalid.</li>
<li>Now click <strong>Test Request / Response</strong>. This will create a new Athena table which we will query in later section.</li>
</ol>
<p>&nbsp;</p>
<p>Notice that in above Body ClientRequestToken is a unique number each time you have to call <a href="http://docs.aws.amazon.com/athena/latest/APIReference/API_StartQueryExecution.html#athena-StartQueryExecution-request-ClientRequestToken" target="_blank" rel="noopener">StartQueryExecution API</a> to make it simple we used SSIS system variable <strong>System::ExecutionInstanceGUID</strong>. Its unique for each execution. You can also use newid() function from SQL Server and save result to variable if you like.</p>
<p>Here is the screenshot of above Request</p>
<div id="attachment_2368" style="width: 821px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2368" class="size-full wp-image-2368" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table.png" alt="RESt API Task - Create table in Amazon Athena using SSIS (StartQueryExecution API Call)" width="811" height="760" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table.png 811w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table-300x281.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table-768x720.png 768w" sizes="(max-width: 811px) 100vw, 811px" /></a><p id="caption-attachment-2368" class="wp-caption-text">RESt API Task &#8211; Create table in Amazon Athena using SSIS (StartQueryExecution API Call)</p></div>
<p>&nbsp;</p>
<h2>Uploading data for Amazon Athena (Source files)</h2>
<p>Once you have athena table created, we will need some data to query. Loading data to amazon athena table is nothing but upload files to S3. If you noticed we added below line in CREATE TABLE statement in the previous section. This means all source files are located at this S3 location.</p><pre class="crayon-plain-tag">LOCATION 's3://my-bucket/input-files/'</pre><p>
We have written blog post to explain this process (<a href="https://zappysys.com/blog/load-data-sql-server-to-amazon-s3/" target="_blank" rel="noopener">Click Here &#8211; How to load data from SQL server to S3 files</a>).</p>
<h2>Extract data from Amazon Athena using SSIS (Query Athena)</h2>
<p>Now its time to read some data by writing SQL query for Athena data (i.e. S3 files). As we mentioned earlier, reading data from Athena can be done using following steps.</p>
<ol>
<li>Call  <a href="http://docs.aws.amazon.com/athena/latest/APIReference/API_StartQueryExecution.html#athena-StartQueryExecution-request-ClientRequestToken" target="_blank" rel="noopener">StartQueryExecution API</a>  using REST API Task to execute your Query (It returns you QueryExecutionID). Use same technique as Create Table example. Replace CREATE Table command in body with your SQL Query (New line must be replaced by \r\n in JSON).</li>
<li>Use REST API Task to call <a href="https://docs.aws.amazon.com/athena/latest/APIReference/API_GetQueryExecution.html" target="_blank" rel="noopener">GetQueryExecution API</a> and configure periodic status check loop (Task keeps waiting until Success or Failure Value not found in Response)</li>
<li>Once data is available read data using <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-source/" target="_blank" rel="noopener">S3 CSV File Source</a></li>
<li>At last you can clean up query output files or keep it if some other process wants to read it (You can also <a href="https://stackoverflow.com/questions/41413528/amazon-aws-athena-removing-temp-files" target="_blank" rel="noopener">clean up S3 files using bucket retention policy</a> automatically at scheduled interval).</li>
</ol>
<p>Now lets see each step in depth</p>
<h3>Step1-Start Amazon Athena Query Execution</h3>
<p>Now first thing is to execute Athena Query by calling <a href="http://docs.aws.amazon.com/athena/latest/APIReference/API_StartQueryExecution.html#athena-StartQueryExecution-request-ClientRequestToken" target="_blank" rel="noopener">StartQueryExecution API</a> . Below steps are almost same steps as we saw in section <strong>Creating Table in Amazon Athena using API call</strong></p>
<p>Only part is different here is SQL query is SELECT query rather than CREATE TABLE.</p>
<ol>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> from SSIS toolbox<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>Enter <strong>Request Url</strong> as below<strong><br />
</strong><br />
<pre class="crayon-plain-tag">https://athena.us-east-1.amazonaws.com/</pre>
</li>
<li>In the <strong>HTTP Headers</strong> enter below 2 headers<br />
<pre class="crayon-plain-tag">X-Amz-Target: AmazonAthena.StartQueryExecution
Content-Type: application/x-amz-json-1.1</pre>
</li>
<li>Change Request method to <strong>POST</strong></li>
<li>In the Body enter below<br />
<pre class="crayon-plain-tag">{
  "ResultConfiguration": {
    "OutputLocation": "s3://my-bucket/output-files/"
  },
  "QueryString": "select * from sampledb.elb_logs\r\nlimit 100000",
  "ClientRequestToken": "{{System::ExecutionInstanceGUID}}"
}</pre>
<strong>Notice:</strong> Rather than using hard coded  SQL Query we can use variable placeholder (e.g. <pre class="crayon-plain-tag">"QueryString": "{{User::Query,FUN_JSONENCODE}}"</pre>   ). Use <pre class="crayon-plain-tag">FUN_JSONENCODE</pre> to replace new line with \r\n else JSON becomes invalid.</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table.png"><img loading="lazy" decoding="async" class="size-full wp-image-2368" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table.png" alt="RESt API Task - Create table in Amazon Athena using SSIS (StartQueryExecution API Call)" width="811" height="760" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table.png 811w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table-300x281.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-create-table-768x720.png 768w" sizes="(max-width: 811px) 100vw, 811px" /></a></li>
<li>Now go to <strong>Response Settings</strong> Tab and configure below way to extract QueryExecutionId (we will need it later).
<p>Set Extract Type as Json.<br />
Enter Expression as <pre class="crayon-plain-tag">$.QueryExecutionId</pre>
Check Save output to Variable and create new Variable (we can name as QueryExecutionId )</p>
<div id="attachment_8356" style="width: 860px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-save-query-execution-id.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8356" class="size-full wp-image-8356" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-save-query-execution-id.png" alt="Call Athena SQL, Save Amazon Athena QueryExecutionId in SSIS Variable" width="850" height="336" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-save-query-execution-id.png 850w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-save-query-execution-id-300x119.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-save-query-execution-id-768x304.png 768w" sizes="(max-width: 850px) 100vw, 850px" /></a><p id="caption-attachment-8356" class="wp-caption-text">Call Athena SQL, Save Amazon Athena QueryExecutionId in SSIS Variable</p></div></li>
<li>That&#8217;s it now we can move to next step</li>
</ol>
<p>&nbsp;</p>
<h3>Step2 &#8211; Wait until Athena Query Execution is done</h3>
<p>New version of ZS REST API Task includes <strong>Status check</strong> feature. This feature avoids complex looping logic. Here is how to configure to check Job Status (Wait until Query execution is finished). Steps are almost same as previous section except three things ( Headers, Body and Status Check Tab)</p>
<p>For Status check we will call <a href="https://docs.aws.amazon.com/athena/latest/APIReference/API_GetQueryExecution.html" target="_blank" rel="noopener">GetQueryExecution API</a> .</p>
<ol>
<li>Drag and drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a> from SSIS toolbox<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>Enter <strong>Request Url</strong> as below<strong><br />
</strong><br />
<pre class="crayon-plain-tag">https://athena.us-east-1.amazonaws.com/</pre>
</li>
<li>In the <strong>HTTP Headers</strong> enter below 2 headers<br />
<pre class="crayon-plain-tag">X-Amz-Target: AmazonAthena.GetQueryExecution
Content-Type: application/x-amz-json-1.1</pre>
</li>
<li>Change Request method to <strong>POST</strong></li>
<li>In the <strong>Body</strong> enter below<br />
<pre class="crayon-plain-tag">{"QueryExecutionId": "{{User::QueryExecutionId}}"}</pre>
<strong>Notice:</strong> Here we have used Variable in the body. This variable we extracted in the previous step. It contains QueryExecution ID for the Job we submitted.</p>
<div id="attachment_8358" style="width: 860px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-getqueryexecution-status-check-loop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8358" class="size-full wp-image-8358" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-getqueryexecution-status-check-loop.png" alt="SSIS Amazon Athena - Call GetQueryExecution API (Status Check)" width="850" height="556" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-getqueryexecution-status-check-loop.png 850w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-getqueryexecution-status-check-loop-300x196.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-amazon-athena-getqueryexecution-status-check-loop-768x502.png 768w" sizes="(max-width: 850px) 100vw, 850px" /></a><p id="caption-attachment-8358" class="wp-caption-text">SSIS Amazon Athena &#8211; Call GetQueryExecution API (Status Check)</p></div></li>
<li>Now go to <strong>Status Check</strong> Tab and configure below way to implement Status check loop. We want to stop check once status is SUCCESS or FAILED or CANCELLED. If we find FAILED or CANCELLED in State field then we must fail the step with error.
<ol>
<li>Check Enable Status Check</li>
<li>Enter Success Value as <pre class="crayon-plain-tag">SUCCEEDED</pre></li>
<li>Check Fail Task option and enter this regex in the text box <pre class="crayon-plain-tag">FAILED|CANCELLED</pre></li>
<li>In the Interval enter 5 seconds delay after each iteration.</li>
</ol>
</li>
<li>That&#8217;s it. Status check Tab will look like below. Now we can move to next step
<div id="attachment_8357" style="width: 536px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/rest-api-job-status-check-loop.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8357" class="size-full wp-image-8357" src="https://zappysys.com/blog/wp-content/uploads/2017/12/rest-api-job-status-check-loop.png" alt="REST API Status check Loop - Keep checking until JOB is done" width="526" height="391" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/rest-api-job-status-check-loop.png 526w, https://zappysys.com/blog/wp-content/uploads/2017/12/rest-api-job-status-check-loop-300x223.png 300w" sizes="(max-width: 526px) 100vw, 526px" /></a><p id="caption-attachment-8357" class="wp-caption-text">REST API Status check Loop &#8211; Keep checking until JOB is done</p></div></li>
</ol>
<p>&nbsp;</p>
<h3>Step3-Read data from Athena Query output files (CSV / JSON stored in S3 bucket)</h3>
<p>When you create Athena table you have to specify query output folder and data input location and file format (e.g. CSV, JSON, Avro, ORC, Parquet &#8230;) they can be GZip, Snappy Compressed. Once you execute query it generates CSV file. Zappysys can read CSV, TSV or JSON files using <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-source/" target="_blank" rel="noopener">S3 CSV File Source</a> or <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-json-file-source/" target="_blank" rel="noopener">S3 JSON File Source</a> connectors. In this section we will use CSV connector to read Athena output files.</p>
<p>Here is how to Athena output data</p>
<ol>
<li>Drag and drop Data flow task 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 data flow and drag and drop  <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-csv-file-source/" target="_blank" rel="noopener">ZS Amazon S3 CSV File Source</a><br />
<img decoding="async" class="figureimage" title="SSIS Amazon S3 CSV Source - Drag and Drop" src="https://zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-s3-csv-source/ssis-amazon-s3-csv-file-source-drag.png" alt="SSIS Amazon S3 CSV Source - Drag and Drop" /></li>
<li>Double click to configure it.</li>
<li> Click New Connection and configure S3 Connection</li>
<li>Once connection is created, browse to S3 bucket / folder location where Athena outputs files.</li>
<li>Replace file name with variable like below<br />
<pre class="crayon-plain-tag">my-bucket/output-files/{{User::QueryExecutionId}}.csv</pre>
&nbsp;</li>
</ol>
<p>&nbsp;</p>
<div id="attachment_2371" style="width: 1214px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-read-athena-csv-output-from-aws-s3-storage-csv-files.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2371" class="size-full wp-image-2371" src="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-read-athena-csv-output-from-aws-s3-storage-csv-files.png" alt="Reading data from Amazon Athena CSV files (Stored in S3)" width="1204" height="675" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-read-athena-csv-output-from-aws-s3-storage-csv-files.png 1204w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-read-athena-csv-output-from-aws-s3-storage-csv-files-300x168.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-read-athena-csv-output-from-aws-s3-storage-csv-files-768x431.png 768w, https://zappysys.com/blog/wp-content/uploads/2017/12/ssis-read-athena-csv-output-from-aws-s3-storage-csv-files-1024x574.png 1024w" sizes="(max-width: 1204px) 100vw, 1204px" /></a><p id="caption-attachment-2371" class="wp-caption-text">Reading data from Amazon Athena CSV files (Stored in S3)</p></div>
<h2>Putting all together &#8211; Athena Data Extract Example</h2>
<p>Here is final package with all pieces we talked.</p>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output.png"><img loading="lazy" decoding="async" class="size-full wp-image-8355" src="https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output.png" alt="Read Amazon Athena Query output in SSIS (S3 CSV files)" width="913" height="658" srcset="https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output.png 913w, https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output-300x216.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/12/query-read-data-from-amazon-athena-ssis-s3-csv-output-768x553.png 768w" sizes="(max-width: 913px) 100vw, 913px" /></a></p>
<p>&nbsp;</p>
<h2>Conclusion</h2>
<p>You have seen that using ZappySys SSIS PowerPack how quickly you can integrate with Amazon Athena and other AWS Cloud Services.  <a href="https://zappysys.com/products/ssis-powerpack/">Download SSIS PowerPack</a> and try it out by yourself.</p>
<p><strong>Keywords:</strong> Extract data from Amazon Athena | Read from Amazon Athena Query file | Import / Export data from Amazon Athena | Fetch data from Amazon Athena</p>
<p>The post <a href="https://zappysys.com/blog/import-export-data-amazon-athena-using-ssis/">Import / Export data from Amazon Athena using SSIS</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to call Amazon AWS API using SSIS (EC2, Lambda, API Gateway, SQS)</title>
		<link>https://zappysys.com/blog/how-to-call-amazon-aws-api-using-ssis-ec2-lambda-api-gateway-sqs/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Fri, 03 Nov 2017 15:25:28 +0000</pubDate>
				<category><![CDATA[AWS (Amazon Web Services)]]></category>
		<category><![CDATA[REST API Integration]]></category>
		<category><![CDATA[S3 (Simple Storage Service)]]></category>
		<category><![CDATA[SSIS Connection Manager]]></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 XML Source (File / SOAP)]]></category>
		<category><![CDATA[aws]]></category>
		<category><![CDATA[ec2]]></category>
		<category><![CDATA[elasticsearch]]></category>
		<category><![CDATA[fiddler]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[s3]]></category>
		<category><![CDATA[sqs]]></category>
		<category><![CDATA[ssis]]></category>
		<category><![CDATA[SSIS PowerPack]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=2241</guid>

					<description><![CDATA[<p>Introduction In this blog post you will learn how to call Amazon AWS API using SSIS (virtually any API) without a single line of code (No more JAVA, C#, Ruby, Python). Yes you heard it right 🙂 . If you are a SSIS / ETL Developer or even coder everyone loves drag &#38; drop interface. SSIS [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/how-to-call-amazon-aws-api-using-ssis-ec2-lambda-api-gateway-sqs/">How to call Amazon AWS API using SSIS (EC2, Lambda, API Gateway, SQS)</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/2017/11/amazon-web-services-logo.jpg"><img loading="lazy" decoding="async" class="wp-image-2317 alignleft" src="https://zappysys.com/blog/wp-content/uploads/2017/11/amazon-web-services-logo.jpg" alt="" width="322" height="181" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/amazon-web-services-logo.jpg 800w, https://zappysys.com/blog/wp-content/uploads/2017/11/amazon-web-services-logo-300x169.jpg 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/amazon-web-services-logo-768x432.jpg 768w" sizes="(max-width: 322px) 100vw, 322px" /></a>In this blog post you will learn how to <strong>call Amazon AWS API using SSIS</strong> (virtually any API) without a single line of code (No more JAVA, C#, Ruby, Python). Yes you heard it right 🙂 . If you are a SSIS / ETL Developer or even coder everyone loves drag &amp; drop interface. SSIS has many advantages over other approaches such as Programming SDKs, Command Lines. Main advantage is ease of use, security and long term maintenance without learning expensive coding approach.</p>
<p>In this post we will use following components to show various possibilities to implement Amazon AWS API integration scenarios inside your ETL workflows.</p>
<div class="su-table su-table-alternate">
<div>
<table>
<colgroup>
<col width="100" />
<col /></colgroup>
<tbody>
<tr>
<td><img loading="lazy" decoding="async" src="//zappysys.com/images/ssis-powerpack/SSIS-Json-Source-Adapter.png" alt="Custom SSIS Components - Json Source" width="72" height="72" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-json-file-source/">JSON / REST API Source</a> (REST API, JSON File or OData Service): Use this dataflow component when you have to <strong>fetch data from REST API webservice like a table</strong>. This component allows you to extract JSON data from webservice and de-normalize nested structure so you can save to Relational database such as SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local JSON files or direct JSON string (Wildcard pattern supported too e.g. c:\data\file*.json).</td>
</tr>
<tr>
<td><img loading="lazy" decoding="async" src="//zappysys.com/onlinehelp/ssis-powerpack/scr/images/web-api-destination/ssis-web-api-destination.png" alt="SSIS Custom Target Adapter - Web API Destination" width="72" height="72" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-web-api-destination-connector/">Web API Destination</a> (POST data to API URL) : Use this dataflow component when you have to call API inside Dataflow (see <a href="https://zappysys.com/blog/http-post-in-ssis-send-data-to-web-api-url-json-xml/" target="_blank" rel="noopener">POST to URL</a>). Possible Use case: Call Lambda function with various parameters for each input record found in database.</td>
</tr>
<tr>
<td><img loading="lazy" decoding="async" src="//zappysys.com/images/ssis-powerpack/ssis-rest-api-web-service-task.png" alt="Custom SSIS Tasks - SSIS Rest Api Web Service Task" width="72" height="72" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/">REST API Task</a> : Use this task when you don’t want to pull REST API data in tabular format but want to call rest API for POST data to server, DELETE data from server or things like download HTML page, extract Authentication tokens etc where you not necessarily dealing data in tabular format. This task also allows you many other options such as saving RAW response into variable or file.</td>
</tr>
<tr>
<td><img loading="lazy" decoding="async" src="//zappysys.com/images/ssis-powerpack/ssis-xml-source.png" alt="Custom SSIS Components - XML Source (Read File/SOAP/REST Web Service)" width="72" height="72" /></td>
<td><a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/">XML Source</a> (SOAP, File, REST) : Use this dataflow component when you have to fetch data from XML or SOAP webservice and consume data like a table. This component allows you to extract data from webservice and save to SQL Server or any other target (Oracle, FlatFile, Excel, MySQL). This component also supports reading local XML files or direct XML string.</td>
</tr>
</tbody>
</table>
</div>
</div>
<h2><span id="Prerequisites">Prerequisites</span></h2>
<p>Before we do hello world demo for calling Amazon AWS API, you will need to make sure following prerequisites are met.</p>
<ol>
<li>SSIS designer installed. Sometimes it is referred as BIDS or SSDT (<a href="https://docs.microsoft.com/en-us/sql/ssdt/download-sql-server-data-tools-ssdt" target="_blank" rel="noopener">download it from Microsoft site</a>).</li>
<li>Basic knowledge of SSIS package development using <em>Microsoft SQL Server Integration Services</em>.</li>
<li>Access to valid AWS credentials (Access Key, Secret Key for your IAM User). <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_access-keys.html" target="_blank" rel="noopener">Click here to learn more</a> about IAM users and Access Key/Secret Key</li>
<li>Make sure <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener"><em>SSIS PowerPack</em></a> is installed. <a href="https://zappysys.com/products/ssis-powerpack/download/" target="_blank" rel="noopener">Click here to download</a>.</li>
</ol>
<h2>Step-By-Step Example-1 (Call AWS API)</h2>
<p>Now lets call some simple GET API call using SSIS <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">REST API Task</a>.</p>
<ol>
<li>Install  <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener"><em>SSIS PowerPack</em></a> (Skip this step if you already installed SSIS PowerPack.</li>
<li>Open Visual Studio and create new Integration Services Project</li>
<li>Open SSIS Package and check your SSIS Toolbox you will see many tasks/components starting with ZS</li>
<li>From Control flow SSIS Toolbox Drag &amp; drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-rest-api-web-service-task/" target="_blank" rel="noopener">ZS REST API Task</a>.</li>
<li>Double click the REST API task to configure it.</li>
<li>On REST API Task change URL Access mode drop down to <strong>URL from Connection</strong></li>
<li>Now in the connection dropdown click New <strong>ZS-OAUTH</strong> connection and configure connection as below
<ol>
<li>Once you see OAuth connection dialog box change Provider Type from Custom to <strong>Amazon AWS API</strong> (v4)</li>
<li>In the ClientId enter your AWS <strong>Access Key</strong></li>
<li>In the ClientSecret enter your AWS <strong>Secret Key</strong></li>
<li>Click OK to save connection
<div id="attachment_2258" style="width: 720px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-oauth-connection-amazon-aws-api-provider-use-signature-v4.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2258" class="size-full wp-image-2258" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-oauth-connection-amazon-aws-api-provider-use-signature-v4.png" alt="Configure SSIS OAuth Connection - Use Amazon AWS API Provider, Enter Access Key, Secret Key" width="710" height="535" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-oauth-connection-amazon-aws-api-provider-use-signature-v4.png 710w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-oauth-connection-amazon-aws-api-provider-use-signature-v4-300x226.png 300w" sizes="(max-width: 710px) 100vw, 710px" /></a><p id="caption-attachment-2258" class="wp-caption-text">Configure SSIS OAuth Connection &#8211; Use Amazon AWS API Provider, Enter Access Key, Secret Key</p></div></li>
</ol>
</li>
<li>On REST API Task change few more settings as below
<ol>
<li>Enter API URL you like to call (In our case we will use <a href="http://docs.aws.amazon.com/AmazonS3/latest/API/RESTServiceGET.html" target="_blank" rel="noopener">S3 API (Simple Storage Service)</a>. We assume you have ListBucket permission to make this call. If you dont have such permission try to get Full path of File (choose small file) . You have to tweak API url to adjust Service Type, Region,Bucket, Path<br />
<pre class="crayon-plain-tag">https://s3.us-east-1.amazonaws.com
-- OR -- Use below (list files) if you have single bucket permission---
https://s3.us-east-1.amazonaws.com/YOUR-BUCKET</pre>
</li>
<li>Click Test Request. If you have valid Permission and setup looks ok then you will see Response window like below. Using this technique you can call any API to execute AWS operations (E.g. start EC2 VM, Create SQS Queue, Call Lambda Function, Drop or Update resource)
<div id="attachment_2260" style="width: 722px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-api-without-sdk-s3-ec2-sqs-lambda-api-gateway.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2260" class="size-full wp-image-2260" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-api-without-sdk-s3-ec2-sqs-lambda-api-gateway.png" alt="Calling Amazon AWS API Using SSIS REST API Task Example. (Call any AWS API without SDK. such as EC2 API, SQS API, Lambda API, Redshift API, DynamoDB API)" width="712" height="615" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-api-without-sdk-s3-ec2-sqs-lambda-api-gateway.png 712w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-api-without-sdk-s3-ec2-sqs-lambda-api-gateway-300x259.png 300w" sizes="(max-width: 712px) 100vw, 712px" /></a><p id="caption-attachment-2260" class="wp-caption-text">Calling Amazon AWS API Using SSIS REST API Task Example. (Call any AWS API without SDK. such as EC2 API, SQS API, Lambda API, Redshift API, DynamoDB API)</p></div></li>
</ol>
</li>
</ol>
<h2>Step-By-Step Example-2 (Loading data from AWS API to SQL Server)</h2>
<p>Now lets do more interesting scenario. We will call AWS S3 API to get S3 File list from Bucket. After extract we will save that list to SQL Server Table. Since Amazon S3 API is XML based API we will use ZappySys <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">SSIS XML Source</a>. For JSON based API use JSON Source instead. XML Source / JSON Source both can parse API response into Rows and Columns so you can easily store it into SQL Server. Now lets see how to do this.</p>
<ol>
<li>From Control flow SSIS Toolbox Drag &amp; drop Data Flow Task</li>
<li>Double click Data Flow Task. From SSIS Toolbox Drag &amp; drop <a href="https://zappysys.com/products/ssis-powerpack/ssis-xml-source/" target="_blank" rel="noopener">ZS SSIS XML Source</a>.</li>
<li>Double click the XML Source to configure it.</li>
<li>In the URL text box enter API URL like below to list S3 Files for specified bucket (Change YOUR-BUCKET to your own name)<br />
<pre class="crayon-plain-tag">https://s3.us-east-1.amazonaws.com/YOUR-BUCKET</pre>
</li>
<li>Now check Use Credentials and Select same Amazon API connection we created in previous example.</li>
<li>Click on Select Filter (This step allows us to flatten the XML hierarchy. Select the node which is Array icon like below. If prompted to treat selected node as array click Yes.
<div id="attachment_2319" style="width: 958px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-read-data-amazon-aws-api-get-s3-bucket-file-list-xml-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2319" class="size-full wp-image-2319" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-read-data-amazon-aws-api-get-s3-bucket-file-list-xml-source.png" alt="Configure SSIS XML Source - Get Amazon S3 File List from specific bucket (AWS API)" width="948" height="728" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-read-data-amazon-aws-api-get-s3-bucket-file-list-xml-source.png 948w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-read-data-amazon-aws-api-get-s3-bucket-file-list-xml-source-300x230.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-read-data-amazon-aws-api-get-s3-bucket-file-list-xml-source-768x590.png 768w" sizes="(max-width: 948px) 100vw, 948px" /></a><p id="caption-attachment-2319" class="wp-caption-text">Configure SSIS XML Source &#8211; Get Amazon S3 File List from specific bucket (AWS API)</p></div></li>
<li>Click Preview to see your data. Click OK to save.
<div id="attachment_2320" style="width: 705px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-preview-data-amazon-aws-api-get-s3-bucket-file-list-xml-source.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2320" class="size-full wp-image-2320" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-preview-data-amazon-aws-api-get-s3-bucket-file-list-xml-source.png" alt="Preview Data in XML Source - Amazon S3 File List (Calling AWS API)" width="695" height="372" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-preview-data-amazon-aws-api-get-s3-bucket-file-list-xml-source.png 695w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-preview-data-amazon-aws-api-get-s3-bucket-file-list-xml-source-300x161.png 300w" sizes="(max-width: 695px) 100vw, 695px" /></a><p id="caption-attachment-2320" class="wp-caption-text">Preview Data in XML Source &#8211; Amazon S3 File List (Calling AWS API)</p></div></li>
<li>Now attach your XML source to target like OLEDB Destination to load data to SQL Server or other Target (e.g. Oracle, MySQL)</li>
<li>Execute SSIS Package to load data from Amazon AWS API to SQL Server.
<div id="attachment_2321" style="width: 917px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-example-read-amazon-to-sql-server-call-aws-api.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2321" class="size-full wp-image-2321" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-example-read-amazon-to-sql-server-call-aws-api.png" alt="SSIS Package - Read Amazon S3 File List and load into SQL Server Table (Call AWS API Example)" width="907" height="597" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-example-read-amazon-to-sql-server-call-aws-api.png 907w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-example-read-amazon-to-sql-server-call-aws-api-300x197.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-example-read-amazon-to-sql-server-call-aws-api-768x506.png 768w" sizes="(max-width: 907px) 100vw, 907px" /></a><p id="caption-attachment-2321" class="wp-caption-text">SSIS Package &#8211; Read Amazon S3 File List and load into SQL Server Table (Call AWS API Example)</p></div></li>
</ol>
<h2></h2>
<h2><span id="Using_SSIS_JSON_Source_to_read_from_REST_API_and_load_into_SQL_Server">File Upload Example &#8211; Low level API &#8211; Call PUT request</span></h2>
<p>There will be a time when you want to take total control of your AWS API calls. One example is if you wish to Upload / Write data to S3 then components like ZappySys Amazon S3 CSV Destination or Amazon Storage Task might need additional permission such as <a href="https://docs.aws.amazon.com/AmazonS3/latest/API/API_HeadObject.html" target="_blank" rel="noopener">HeadObject</a> . If you have only write permission on bucket then this will fail to execute Task. In such case you can use REST API Task like below way.</p>
<p>Basically we exported data from Relation Database to CSV File using <a href="https://zappysys.com/products/ssis-powerpack/ssis-export-csv-file-task/" target="_blank" rel="noopener">Export CSV File Task</a> and then we uploaded file content using REST API Task.</p>
<h3>Upload Text File to S3 (i.e. JSON, CSV, XML &#8230;)</h3>
<p>Your URL Format can be like this. Region codes can be <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#regional-endpoints" target="_blank" rel="noopener">found here</a></p><pre class="crayon-plain-tag">https://YOUR-BUCKET.s3.YOUR-REGION.amazonaws.com/YOUR-FILE
https://YOUR-BUCKET.s3.YOUR-REGION.amazonaws.com/SOME-FOLDER/SOME-SUB-FOLDER/YOUR-FILE</pre><p>
&nbsp;</p>
<div id="attachment_8925" style="width: 902px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-upload-file-to-s3-bucket-low-level-rest-api-put-request.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-8925" class="size-full wp-image-8925" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-upload-file-to-s3-bucket-low-level-rest-api-put-request.png" alt="Upload file to Amazon S3 - Call low level API (PUT request)" width="892" height="752" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-upload-file-to-s3-bucket-low-level-rest-api-put-request.png 892w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-upload-file-to-s3-bucket-low-level-rest-api-put-request-300x253.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-upload-file-to-s3-bucket-low-level-rest-api-put-request-768x647.png 768w" sizes="(max-width: 892px) 100vw, 892px" /></a><p id="caption-attachment-8925" class="wp-caption-text">Upload file to Amazon S3 &#8211; Call low level API (PUT request)</p></div>
<p>&nbsp;</p>
<h3>Upload Binary File to S3 (i.e. Zip, mp3, gzip, png, jpeg&#8230;)</h3>
<p>Above method only works for Text Files. If you have Binary files (e.g. Zip file, mp3, png, jpeg) then you can use below workaround.</p>
<ol>
<li>Check Is Multi Part / File Upload Option next to the Body editor (<a href="https://zappysys.com/blog/rest-api-file-upload-using-ssis-multi-part-post/" target="_blank" rel="noopener">Read this Post for more info</a>)</li>
<li>In the Body enter file path like below<br />
<pre class="crayon-plain-tag">@c:\folder\some-file.xyz</pre>
</li>
<li>That&#8217;s it, now your binary file can be uploaded to S3 same way as Text file we uploaded in earlier section.</li>
</ol>
<p>&nbsp;</p>
<p><strong>NOTE:</strong> <span style="text-decoration: underline;">Binary file option only works in the latest Build Uploaded after 5/21/2020</span></p>
<p>&nbsp;</p>
<h2><span id="Using_SSIS_JSON_Source_to_read_from_REST_API_and_load_into_SQL_Server">Debugging AWS API Command Line Requests using Fiddler (Web Proxy)</span></h2>
<p>Before we see more examples of calling AWS API lets first learn how to capture Request data using <a href="https://aws.amazon.com/cli/" target="_blank" rel="noopener">aws command line</a> (CLI). We will use <a href="https://zappysys.com/blog/how-to-use-fiddler-to-analyze-http-web-requests/" target="_blank" rel="noopener">Fiddler</a> to capture AWS API Requests.</p>
<ol>
<li>Download and <a href="https://www.telerik.com/download/fiddler" target="_blank" rel="noopener">Install Fiddler</a> (Free Tool)</li>
<li>Install  <a href="https://aws.amazon.com/cli/" target="_blank" rel="noopener">aws command line</a></li>
<li>Open command prompt and type aws configure command to set credentials.  For more info see <a href="http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html" target="_blank" rel="noopener">configure aws credentials</a> .. see below example.<br />
<pre class="crayon-plain-tag">c:&gt; aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-west-2
Default output format [None]: json</pre>
</li>
<li>Once you set credentials launch Fiddler</li>
<li>On the Fiddler Tools menu &gt; Click Fiddler Option &gt; HTTPS &gt; Check <strong>Decrypt HTTPS Traffic</strong></li>
<li>Once you do that you may be asked to Trust Fiddler Certificate click OK</li>
<li>Close and Open Fiddler to apply setting</li>
<li>Now any command you type in aws command line will show up in fiddler. This command we can use in SSIS REST API Task or XML Source to call virtually Any API AWS supports.</li>
<li>For example to call some lambda function (supply input json data from file) use below command and watch Fiddler Trace. Notice we added <strong>&#8211;no-verify-ssl</strong> option so we can see requests in custom web proxy like fiddler (This option will trust Fiddler certificate).<br />
<pre class="crayon-plain-tag">c:\&gt;aws lambda invoke --function-name HelloWorld c:\temp\outputfile.txt --no-verify-ssl --payload file://c://test/customer.json</pre>
&nbsp;</p>
<div id="attachment_2314" style="width: 1175px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-get-raw-rest-request-aws-commandline-cli-capture-fiddler.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2314" class="size-full wp-image-2314" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-get-raw-rest-request-aws-commandline-cli-capture-fiddler.png" alt="Capture AWS Commandline (CLI) request using Fiddler" width="1165" height="640" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-get-raw-rest-request-aws-commandline-cli-capture-fiddler.png 1165w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-get-raw-rest-request-aws-commandline-cli-capture-fiddler-300x165.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-get-raw-rest-request-aws-commandline-cli-capture-fiddler-768x422.png 768w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-get-raw-rest-request-aws-commandline-cli-capture-fiddler-1024x563.png 1024w" sizes="(max-width: 1165px) 100vw, 1165px" /></a><p id="caption-attachment-2314" class="wp-caption-text">Capture AWS Commandline (CLI) request using Fiddler</p></div></li>
<li>Once you have this information you can use it inside ZappySys Components which supports API calls (e.g. REST API Task, JSON Source, XML Source). For this example we will use REST API Task to call same Lambda Function. Things to change to call any API is URL, Method, ContentType, Body. If its GET call then you wont have Body.
<div id="attachment_2315" style="width: 826px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-lambda-function-using-rest-api-task.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2315" class="size-full wp-image-2315" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-lambda-function-using-rest-api-task.png" alt="Calling Amazon AWS Lambda Function using SSIS REST API Task" width="816" height="659" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-lambda-function-using-rest-api-task.png 816w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-lambda-function-using-rest-api-task-300x242.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-amazon-aws-lambda-function-using-rest-api-task-768x620.png 768w" sizes="(max-width: 816px) 100vw, 816px" /></a><p id="caption-attachment-2315" class="wp-caption-text">Calling Amazon AWS Lambda Function using SSIS REST API Task</p></div>
<p>&nbsp;</li>
<li>That&#8217;s it.. You can now take this same concept and call virtually API AWS API right insight SSIS without any SDK or command line tools.</li>
</ol>
<h2>Call API Gateway Endpoint (Default URL)</h2>
<p>If you wish to call API hosted on Amazon API Gateway Service then enter direct URL. You have to use OAuth Connection (AWS v4 Provider) as previous section.</p>
<p>Typical URL may look like as below if you calling API gateway Endpoint.</p><pre class="crayon-plain-tag">https://c5hhigf5mh.execute-api.us-east-1.amazonaws.com/prod/pets</pre><p>
<h2>Call AWS API with Region and Custom Service Name</h2>
<p>There will be a time when you will have to call AWS API URL and it doesnt indicate Region / Service but you have to supply part of signature for Authentication.  In this case just enter AWS Service and Region along with ClientID, Secret Fields (Custom Service and  Region attributes were introduced in v3.0 or higher so if you are not seeing on OAuth Connection UI then you probably running older version).</p>
<p>&nbsp;</p>
<h2>Call Amazon Athena API</h2>
<p>Check <a href="https://zappysys.com/blog/import-export-data-amazon-athena-using-ssis/" target="_blank" rel="noopener">this article</a> for detailed instructions</p>
<h2><span id="Using_SSIS_JSON_Source_to_read_from_REST_API_and_load_into_SQL_Server">Call AWS EC2 API</span></h2>
<p>Here is an example of calling EC2 API. This is example of listing EC2 instances.</p>
<p>Request:</p><pre class="crayon-plain-tag">POST https://ec2.us-east-1.amazonaws.com/
Content-Type: application/x-www-form-urlencoded; charset=utf-8

Action=DescribeInstances&amp;Version=2016-11-15</pre><p>
<h2>Call <span id="Using_SSIS_JSON_Source_to_read_from_REST_API_and_load_into_SQL_Server">AWS </span>Lambda API</h2>
<p>Here is some example of calling Lambda function</p>
<p>Request:</p><pre class="crayon-plain-tag">POST https://lambda.YOUR-REGION.amazonaws.com/2015-03-31/functions/YOUR-FUNCTION/invocations

{you-json-input-goes-in-body}</pre><p>
<h2></h2>
<h2>Call AWS ElasticSearch</h2>
<p>If you are using <a href="https://aws.amazon.com/elasticsearch-service/" target="_blank" rel="noopener">AWS Hosted Managed ElasticSearch</a> then also you can use OAuth AWS v4 Provider as below. Assuming you have <a href="https://stackoverflow.com/questions/33751580/how-to-access-kibana-from-amazon-elasticsearch-service" target="_blank" rel="noopener">configured correct Policy</a> to allow your IAM User Account / IP address.</p>
<div id="attachment_6277" style="width: 836px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-aws-elasticsearch-rest-api-sign-v4.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6277" class="size-full wp-image-6277" src="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-aws-elasticsearch-rest-api-sign-v4.png" alt="Call AWS Hosted ElasticSearch REST API in SSIS (V4 Request Signing)" width="826" height="730" srcset="https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-aws-elasticsearch-rest-api-sign-v4.png 826w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-aws-elasticsearch-rest-api-sign-v4-300x265.png 300w, https://zappysys.com/blog/wp-content/uploads/2017/11/ssis-call-aws-elasticsearch-rest-api-sign-v4-768x679.png 768w" sizes="(max-width: 826px) 100vw, 826px" /></a><p id="caption-attachment-6277" class="wp-caption-text">Call AWS Hosted ElasticSearch REST API in SSIS (V4 Request Signing)</p></div>
<h2>Call <span id="Using_SSIS_JSON_Source_to_read_from_REST_API_and_load_into_SQL_Server">AWS </span>API using Native Task/Components</h2>
<p>ZappySys provides many High quality Tasks / Components for AWS integration. See below list.</p>
<table id="cat_amazon_aws_cloud" style="margin: 0px 0px 1.5em !important; padding: 0px; outline: 0px; border: 1px solid #cccccc !important; border-image: none !important !important; width: 973px; color: #333333; text-transform: none; line-height: 2; text-indent: 0px; letter-spacing: normal; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px; font-style: normal; font-weight: normal; word-spacing: 0px; vertical-align: baseline; white-space: normal; border-collapse: collapse !important; border-spacing: 0px; orphans: 2; widows: 2; background-color: #ffffff; font-variant-ligatures: normal; font-variant-caps: normal; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial;">
<tbody>
<tr class="su-even">
<th colspan="3"><strong>Amazon AWS Cloud Integration</strong></th>
</tr>
<tr>
<td><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-S3-Cloud-Task.png?w=720&amp;ssl=1" alt="Custom SSIS Tasks - Amazon S3 Task" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-s3-task/" target="_blank" rel="noopener">Amazon S3 Task</a></td>
<td><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-Redshift-Data-Transfer-Task.png?w=720&amp;ssl=1" alt="Custom SSIS Tasks - Amazon Redshift Data Transfer Task" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-data-transfer-task/" target="_blank" rel="noopener">Amazon Redshift Data Transfer Task</a></td>
<td><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-Redshift-ExecuteSQL-Task.png?w=720&amp;ssl=1" alt="Custom SSIS Tasks - Amazon Redshift ExecuteSql Task" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-redshift-execute-sql-task/" target="_blank" rel="noopener">Amazon Redshift ExecuteSql Task</a></td>
</tr>
<tr class="su-even">
<td><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/images/ssis-powerpack/ssis-amazon-redshift-cluster-management-task.png?w=720&amp;ssl=1" alt="Custom SSIS Tasks - Amazon Redshift Cluster Management Task" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-cluster-management-task/" target="_blank" rel="noopener">Amazon Redshift Cluster Management Task</a></td>
<td><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-DynamoDB-Source-Adapter.png?w=720&amp;ssl=1" alt="Custom SSIS Components - Amazon DynamoDB Source" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamodb-source/" target="_blank" rel="noopener">Amazon DynamoDB Source</a></td>
<td><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-DynamoDB-Destination-Adapter.png?w=720&amp;ssl=1" alt="Custom SSIS Components - Amazon DynamoDB Destination" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-dynamodb-destination/" target="_blank" rel="noopener">Amazon DynamoDB Destination</a></td>
</tr>
<tr>
<td><img loading="lazy" decoding="async" src="https://i0.wp.com/zappysys.com/onlinehelp/ssis-powerpack/scr/images/amazon-redshift-source/ssis-amazon-redshift-source.png?w=720&amp;ssl=1" alt="Custom SSIS Components - Amazon Redshift Source" width="24" height="24" /> <a href="https://zappysys.com/products/ssis-powerpack/ssis-amazon-redshift-source-connector/" target="_blank" rel="noopener">Amazon Redshift Source</a></td>
<td><img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-DynamoDB-Source-Adapter.png?w=720&amp;ssl=1" alt="Custom SSIS Components - Amazon DynamoDB Source" width="24" height="24" /> Amazon SQS Queue Source</td>
<td> <img loading="lazy" decoding="async" src="https://i1.wp.com/zappysys.com/images/ssis-powerpack/SSIS-Amazon-DynamoDB-Source-Adapter.png?w=720&amp;ssl=1" alt="Custom SSIS Components - Amazon DynamoDB Source" width="24" height="24" /> Amazon SQS Queue Destination</td>
</tr>
</tbody>
</table>
<h2>Conclusion</h2>
<p>Amazon AWS Cloud integration from SSIS packages becoming more and more common scenario. ZappySys provides easy to use no coding connectors to achieve many time consuming scenarios. Having clean drag and drop approach is not only faster but more secure using inbuilt SSIS framework. <a href="https://zappysys.com/products/ssis-powerpack/">Try SSIS PowerPack</a> to explore many other scenarios not discussed in this article.</p>
<p>The post <a href="https://zappysys.com/blog/how-to-call-amazon-aws-api-using-ssis-ec2-lambda-api-gateway-sqs/">How to call Amazon AWS API using SSIS (EC2, Lambda, API Gateway, SQS)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
