{"id":10255,"date":"2023-09-07T12:18:50","date_gmt":"2023-09-07T12:18:50","guid":{"rendered":"https:\/\/zappysys.com\/blog\/?p=10255"},"modified":"2024-06-12T15:00:45","modified_gmt":"2024-06-12T15:00:45","slug":"upload-files-google-drive-using-ssis","status":"publish","type":"post","link":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/","title":{"rendered":"How to upload files on Google Drive using SSIS"},"content":{"rendered":"<h2><strong>Introduction<\/strong><\/h2>\n<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>\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 Google Drive with SSIS:<\/h2>\n<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>\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 Google Drive Connector<\/h2>\n<ol>\n<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 \/>\n<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>\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 Google Drive using User Account [OAuth]<\/h3>\n<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>\n<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>\n<h3>Method2: Connect to Google Drive using Service Account [OAuth]<\/h3>\n<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>\n<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>\n<\/ol>\n<h2>How to upload a local file to Google Drive<\/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 Google Drive.<\/p>\n<ol>\n<li>Choose the <strong>Upload a file<\/strong> endpoint from the &#8220;Select Table\/Endpoint&#8221; dropdown menu.<\/li>\n<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>\n<li>Please specify the desired filename for the uploaded file by setting the <strong>FileName<\/strong> parameter.<\/li>\n<li>Specify the desired local file path by setting the <strong>DiskFilePath<\/strong> parameter.<\/li>\n<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>\n<\/ol>\n<p>Please refer to the sample screenshot below.<\/p>\n<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>\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 Google Drive using the <strong>ZappySys Google Drive Connector<\/strong> for uploading a local file to Google Drive.<\/p>\n<h2>How to upload multiple files to Google Drive<\/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 Google Drive. 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_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>\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 Google Drive.\n<ol style=\"list-style-type: lower-alpha;\">\n<li>Choose the <strong>Upload a file<\/strong> endpoint from the &#8220;Select Table\/Endpoint&#8221; dropdown menu.<\/li>\n<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>\n<li>Please specify the desired SSIS Variable [varFileName] which contains file name for the uploaded file by setting the <strong>FileName<\/strong> parameter.<\/li>\n<li>To specify the desired local SSIS variable [varFullFilePath], which holds the file path, set the <strong>DiskFilePath<\/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 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>\n<\/ol>\n<p>Please refer to the sample screenshot below.<\/p>\n<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>\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 image below.<\/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. 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>\n<\/ol>\n<h2>Conclusion<\/h2>\n<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>\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 Google Drive into your data workflow, you&#8217;re in luck. ZappySys SSIS PowerPack offers a powerful Google Drive Connector that [&hellip;]<\/p>\n","protected":false},"author":6,"featured_media":11097,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,616,8],"tags":[618,56,156,12,79,617,4,619],"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 Google Drive using SSIS | ZappySys Blog<\/title>\r\n<meta name=\"description\" content=\"How to upload files on Google Drive 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-google-drive-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 Google Drive using SSIS | ZappySys Blog\" \/>\r\n<meta property=\"og:description\" content=\"How to upload files on Google Drive using SSIS - ZappySys Blog\" \/>\r\n<meta property=\"og:url\" content=\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/\" \/>\r\n<meta property=\"og:site_name\" content=\"ZappySys Blog\" \/>\r\n<meta property=\"article:published_time\" content=\"2023-09-07T12:18:50+00:00\" \/>\r\n<meta property=\"article:modified_time\" content=\"2024-06-12T15:00:45+00:00\" \/>\r\n<meta property=\"og:image\" content=\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png\" \/>\r\n\t<meta property=\"og:image:width\" content=\"980\" \/>\r\n\t<meta property=\"og:image:height\" content=\"928\" \/>\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-google-drive-using-ssis\/\",\"url\":\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/\",\"name\":\"How to upload files on Google Drive using SSIS | ZappySys Blog\",\"isPartOf\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png\",\"datePublished\":\"2023-09-07T12:18:50+00:00\",\"dateModified\":\"2024-06-12T15:00:45+00:00\",\"author\":{\"@id\":\"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35\"},\"description\":\"How to upload files on Google Drive using SSIS - ZappySys Blog\",\"breadcrumb\":{\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#primaryimage\",\"url\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png\",\"contentUrl\":\"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png\",\"width\":980,\"height\":928},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/zappysys.com\/blog\/upload-files-google-drive-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 Google Drive 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 Google Drive using SSIS | ZappySys Blog","description":"How to upload files on Google Drive 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-google-drive-using-ssis\/","og_locale":"en_US","og_type":"article","og_title":"How to upload files on Google Drive using SSIS | ZappySys Blog","og_description":"How to upload files on Google Drive using SSIS - ZappySys Blog","og_url":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/","og_site_name":"ZappySys Blog","article_published_time":"2023-09-07T12:18:50+00:00","article_modified_time":"2024-06-12T15:00:45+00:00","og_image":[{"width":980,"height":928,"url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_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-google-drive-using-ssis\/","url":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/","name":"How to upload files on Google Drive using SSIS | ZappySys Blog","isPartOf":{"@id":"https:\/\/zappysys.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#primaryimage"},"image":{"@id":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#primaryimage"},"thumbnailUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png","datePublished":"2023-09-07T12:18:50+00:00","dateModified":"2024-06-12T15:00:45+00:00","author":{"@id":"https:\/\/zappysys.com\/blog\/#\/schema\/person\/c9dc782c929d0027e2e87e3951ce9d35"},"description":"How to upload files on Google Drive using SSIS - ZappySys Blog","breadcrumb":{"@id":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-using-ssis\/#primaryimage","url":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png","contentUrl":"https:\/\/zappysys.com\/blog\/wp-content\/uploads\/2023\/11\/google_drive_logo.png","width":980,"height":928},{"@type":"BreadcrumbList","@id":"https:\/\/zappysys.com\/blog\/upload-files-google-drive-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 Google Drive 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\/10255"}],"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=10255"}],"version-history":[{"count":27,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/10255\/revisions"}],"predecessor-version":[{"id":11099,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/posts\/10255\/revisions\/11099"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media\/11097"}],"wp:attachment":[{"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/media?parent=10255"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/categories?post=10255"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zappysys.com\/blog\/wp-json\/wp\/v2\/tags?post=10255"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}