{"id":10847,"date":"2023-12-08T06:03:06","date_gmt":"2023-12-08T06:03:06","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=10847"},"modified":"2024-06-12T14:53:57","modified_gmt":"2024-06-12T14:53:57","slug":"upload-files-onedrive-using-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/","title":{"rendered":"How to upload files on OneDrive using SSIS"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<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>\n<div class=\"content_block\" id=\"custom_post_widget-2523\"><h2><span id=\"Prerequisites\">Prerequisites<\/span><\/h2>\r\nBefore we perform the steps listed in this article, you will need to make sure the following prerequisites are met:\r\n<ol style=\"margin-left: 1.5em;\">\r\n \t<li><abbr title=\"SQL Server Integration Services\">SSIS<\/abbr> designer installed.\u00a0Sometimes 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>\r\n \t<li>Basic knowledge of SSIS package\u00a0development using\u00a0<em>Microsoft SQL Server Integration Services<\/em>.<\/li>\r\n \t<li>Make sure\u00a0<span style=\"text-decoration: underline;\"><a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/\" target=\"_blank\" rel=\"noopener\">ZappySys SSIS PowerPack<\/a><\/span>\u00a0is installed (<a href=\"https:\/\/zappysys.com\/products\/ssis-powerpack\/download\/\" target=\"_blank\" rel=\"noopener\">download it<\/a>, if you haven't already).<\/li>\r\n \t<li>(<em>Optional step<\/em>)<em>.<\/em>\u00a0<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>\r\n<\/ol><\/div>\n<h2>Upload files to OneDrive with SSIS:<\/h2>\n<p>In this section, we will learn how to configure and use OneDrive Connector in the API Source to upload files on OneDrive.<\/p>\n<ol>\n<li>Begin with opening Visual Studio and Creating a New Project.<\/li>\n<li>Select Integration Service Project and in the new project window set the appropriate name and location for the project. Click OK.<\/li>\n<li>In the new SSIS project screen you will find the following:\n<ol style=\"list-style-type: lower-alpha;\">\n<li>SSIS ToolBox on the left sidebar<\/li>\n<li>Solution Explorer and Property Window on the right bar<\/li>\n<li>Control flow, data flow, event Handlers, Package Explorer in tab windows<\/li>\n<li>Connection Manager Window at the bottom<\/li>\n<\/ol>\n<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>\n<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>\n<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 \/>\n<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>\n<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 \/>\n<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>\n<li>Select <strong>New Connection<\/strong> to create a new connection:<br \/>\n<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>\n<\/ol>\n<h2>Configuring the OneDrive Connector<\/h2>\n<ol>\n<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 \/>\n<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>\n<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>\n<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 \/>\n<h3>Method1: Connect to OneDrive using User Credentials [OAuth]<\/h3>\n<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>\n<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>\n<h3>Method2: Connect to OneDrive using Application Credentials [OAuth]<\/h3>\n<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>\n<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>\n<\/ol>\n<h2>How to upload a local file to OneDrive<\/h2>\n<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>\n<ol>\n<li>Choose the <strong>Upload file<\/strong> endpoint from the &#8220;Select Table\/Endpoint&#8221; dropdown menu.<\/li>\n<li>Select the desired Drive ID from the <strong>DriveId<\/strong> drop-down.<\/li>\n<li>Specify the desired source file path for the file being uploaded by setting the <strong>SourceFilePath<\/strong>\u00a0parameter.<\/li>\n<li>Specify the desired Target Path by setting the <strong>TargetFilePath<\/strong> parameter.<\/li>\n<\/ol>\n<p>Please refer to the sample screenshot below.<\/p>\n<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>\n<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>\n<h2>How to upload multiple files to OneDrive<\/h2>\n<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>\n<ol>\n<li>Create 3 SSIS variables as described below.<br \/>\n<table border=\"1\">\n<tbody>\n<tr>\n<th>Variable Name<\/th>\n<th>Datatype<\/th>\n<th>Value<\/th>\n<\/tr>\n<tr>\n<td>varFileLists<\/td>\n<td>Object<\/td>\n<td>System.Object<\/td>\n<\/tr>\n<tr>\n<td>varFileName<\/td>\n<td>String<\/td>\n<td>fake.extension<\/td>\n<\/tr>\n<tr>\n<td>varFullFilePath<\/td>\n<td>String<\/td>\n<td>C:\/fake\/fake.extension<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<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 \/>\n<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>\n<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.\n<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>\n<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.\n<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>\n<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.\n<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>\n<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.\n<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>\n<li>Inside the Foreach Loop Container, drag and drop the Data Flow Task, and then rename it according to your preference.\n<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>\n<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 \/>\n<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>\n<li>Double-click on the <strong>API Source<\/strong> component to configure it for uploading multiple files to OneDrive.\n<ol style=\"list-style-type: lower-alpha;\">\n<li>Choose the <strong>Upload file<\/strong> endpoint from the &#8220;Select Table\/Endpoint&#8221; dropdown menu.<\/li>\n<li>Please specify the desired SSIS Variable [varFileName] containing the uploaded file name by setting the <strong>TargetFilePath<\/strong> parameter.<\/li>\n<li>To specify the desired local SSIS variable [varFullFilePath], which holds the file path, set the <strong>SourceFilePath<\/strong> parameter.<br \/>\nWhen 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 \/>\n<span class=\"lang:default decode:true crayon-inline\">&lt;&lt;{{User::varUserFullFilePath}},FUN_JSONENC&gt;&gt;<\/span><\/li>\n<li>If you wish to upload the local file to a specific folder in OneDrive, please set the folderName in the\u00a0<strong>TargetFilePath <\/strong>parameter.<\/li>\n<\/ol>\n<p>Please refer to the sample screenshot below.<\/p>\n<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>\n<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>\n<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 \/>\nAfter that, you can execute the SSIS Package and check the execution to upload multiple files on OneDrive. Below is the sample screenshot attached.<br \/>\n<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 \/>\n<span style=\"font-size: 14px;\">Multiple files uploaded on OneDrive using SSIS<\/span><\/p>\n<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>\n<\/ol>\n<h2>Conclusion<\/h2>\n<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>\n","protected":false},"excerpt":{"rendered":"<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 [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":9115,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[616,8],"tags":[618,436,12,79,617,4,626],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\r\n<title>How to upload files on OneDrive using SSIS | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"How to upload files on OneDrive using SSIS - ZappySys Blog\" \/>\r\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\r\n<link rel=\"canonical\" href=\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/\" \/>\r\n<meta property=\"og:locale\" content=\"en_US\" \/>\r\n<meta property=\"og:type\" content=\"article\" \/>\r\n<meta property=\"og:title\" content=\"How to upload files on OneDrive using SSIS | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"How to upload files on OneDrive using SSIS - ZappySys Blog\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-12-08T06:03:06+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2024-06-12T14:53:57+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"261\" \/>\r\n\t<meta property=\"og:image:height\" content=\"261\" \/>\r\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\r\n<meta name=\"author\" content=\"ZappySys\" \/>\r\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\r\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"ZappySys\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\r\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/\",\"name\":\"How to upload files on OneDrive using SSIS | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png\",\"datePublished\":\"2023-12-08T06:03:06+00:00\",\"dateModified\":\"2024-06-12T14:53:57+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35\"},\"description\":\"How to upload files on OneDrive using SSIS - ZappySys Blog\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png\",\"width\":261,\"height\":261,\"caption\":\"Download File from OneDrive in SSIS\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/zappysys.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to upload files on OneDrive using SSIS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/zappysys.com\/blog\/#website\",\"url\":\"https:\/\/zappysys.com\/blog\/\",\"name\":\"ZappySys Blog\",\"description\":\"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/zappysys.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35\",\"name\":\"ZappySys\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g\",\"caption\":\"ZappySys\"},\"url\":\"https:\/\/zappysys.com\/blog\/author\/hshah\/\"}]}<\/script>\r\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to upload files on OneDrive using SSIS | ZappySys Blog","description":"How to upload files on OneDrive using SSIS - ZappySys Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to upload files on OneDrive using SSIS | ZappySys Blog","og_description":"How to upload files on OneDrive using SSIS - ZappySys Blog","og_url":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/","og_site_name":"ZappySys Blog","article_published_time":"2023-12-08T06:03:06+00:00","article_modified_time":"2024-06-12T14:53:57+00:00","og_image":[{"width":261,"height":261,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png","type":"image\/png"}],"author":"ZappySys","twitter_card":"summary_large_image","twitter_misc":{"Written by":"ZappySys","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/","url":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/","name":"How to upload files on OneDrive using SSIS | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png","datePublished":"2023-12-08T06:03:06+00:00","dateModified":"2024-06-12T14:53:57+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35"},"description":"How to upload files on OneDrive using SSIS - ZappySys Blog","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2020\/08\/microsoft-onedrive-logo.png","width":261,"height":261,"caption":"Download File from OneDrive in SSIS"},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/upload-files-onedrive-using-ssis\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/zappysys.com\/blog\/"},{"@type":"ListItem","position":2,"name":"How to upload files on OneDrive using SSIS"}]},{"@type":"WebSite","@id":"https:\/\/zappysys.com\/blog\/#website","url":"https:\/\/zappysys.com\/blog\/","name":"ZappySys Blog","description":"SSIS \/ ODBC Drivers \/ API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/zappysys.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35","name":"ZappySys","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/076a738938c19d459fbfe125c759a0ea?s=96&d=mm&r=g","caption":"ZappySys"},"url":"https:\/\/zappysys.com\/blog\/author\/hshah\/"}]}},"_links":{"self":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/10847"}],"collection":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/comments?post=10847"}],"version-history":[{"count":8,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/10847\/revisions"}],"predecessor-version":[{"id":11096,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/10847\/revisions\/11096"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/9115"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=10847"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=10847"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=10847"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}