CSV Connector for SSISIn this article you will learn how to quickly and efficiently integrate CSV data in SSIS without coding. We will use high-performance CSV Connector to easily connect to CSV and then access the data inside SSIS. CSV Connector can be used to extract and output CSV data from Web URL/REST API web service calls (Web URL) or direct CSV String (variables or DB columns) or local CSV files data. Let's follow the steps below to see how we can accomplish that! CSV Connector for SSIS is based on ZappySys Native SSIS Connector Framework which is a part of SSIS PowerPack. It is a collection of high-performance SSIS connectors that enable you to integrate data with virtually any data provider supported by SSIS, including SQL Server. SSIS PowerPack supports various file formats, sources and destinations, including REST/SOAP API, SFTP/FTP, storage services, and plain files, to mention a few (if you are new to SSIS and SSIS PowerPack, find out more on how to use them). |
Connect to CSV in other apps
|
Video Tutorial - Integrate CSV data in SSIS
This video covers following and more so watch carefully. After watching this video follow the steps described in this article.
- How to download / install required driver for
CSV integration in SSIS - How to configure connection for
CSV - Features about
CSV Source (Authentication / Query Language / Examples / Driver UI) - Using
CSV Connection in SSIS
Prerequisites
Before we begin, make sure the following prerequisites are met:
- SSIS designer installed. Sometimes it is referred as BIDS or SSDT (download it from Microsoft).
- Basic knowledge of SSIS package development using Microsoft SQL Server Integration Services.
- SSIS PowerPack is installed (if you are new to SSIS PowerPack, then get started!).
Read data from CSV in SSIS using CSV Source (Export data)
In this section we will learn how to configure and use CSV Connector in the API Source to extract data from the CSV using CSV Source.
-
Begin with opening Visual Studio and Create a New Project.
Select Integration Service Project and in new project window set the appropriate name and location for project. And click OK.
-
In the new SSIS project screen you will find the following:
- SSIS ToolBox on left side bar
- Solution Explorer and Property Window on right bar
- Control flow, data flow, event Handlers, Package Explorer in tab windows
- Connection Manager Window in the bottom
Note: If you don't see ZappySys SSIS PowerPack Task or Components in SSIS Toolbox, please refer to this help link. -
Now, Drag and Drop SSIS Data Flow Task from SSIS Toolbox. Double click on the Data Flow Task to see Data Flow designer.
-
From the SSIS toolbox drag and drop CSV Source on the dataflow designer surface
-
Double click on CSV Source component to configure it.
-
From the Access Mode dropdown select [File path or web Url] and paste the following Url for this example.
Example: Here is Example of Local or Server Path. c:\data\cust-1.csv (Local file Path) http://www.zappysys.com/downloads/files/test/cust-1.csv (Server file Path) Note: If you want to operation with multiple files then use wild card pattern as below (when you use wild card pattern in source path then system will treat target path as folder regardless you end with slash). c:\data\cust-1*.csv (all files starting with file name) c:\data\subfolder\*.csv (all files with .csv Extension and located under folder subfolder) You can also create Variable for file name and use it in CSV source
-
If you see in upper screen we have some blank rows and comments, if you want to ignore it from the output, We have Advanced Tab setting for it.
-
Click OK to save ZS CSV Source (Web API or File) UI settings.
-
That's it; we are done. In a few clicks we configured the call to CSV using ZappySys CSV Connector
Configuring pagination in the CSV Source
ZappySys CSV Source equips users with powerful tools for seamless data extraction and management from REST APIs, leveraging advanced pagination methods for enhanced efficiency. These options are designed to handle various types of pagination structures commonly used in APIs. Below are the detailed descriptions of these options:
Page-based Pagination: This method works by retrieving data in fixed-size pages from the Rest API. It allows you to specify the page size and navigate through the results by requesting different page numbers, ensuring that you can access all the data in a structured manner.
Offset-based Pagination: With this approach, you can extract data by specifying the starting point or offset from which to begin retrieving data. It allows you to define the number of records to skip and fetch subsequent data accordingly, providing precise control over the data extraction process.
Cursor-based Pagination: This technique involves using a cursor or a marker that points to a specific position in the dataset. It enables you to retrieve data starting from the position indicated by the cursor and proceed to subsequent segments, ensuring that you capture all the relevant information without missing any records.
Token-based Pagination: In this method, a token serves as a unique identifier for a specific data segment. It allows you to access the next set of data by using the token provided in the response from the previous request. This ensures that you can systematically retrieve all the data segments without duplication or omission.
Utilizing these comprehensive pagination features in the ZappySys CSV Source facilitates efficient data management and extraction from REST APIs, optimizing the integration and analysis of extensive datasets.
For more detailed steps, please refer to this link: How to do REST API Pagination in SSIS / ODBC Drivers
How to read data from CSV file from URL with ZIP format
In one the above section we saw how to read the local file or Web URL CSV file and load the data in the database using Upsert Destination. The same way we can read the ZIP formatted CSV file(s). Find out how to accomplish that using CSV Source in later topic.
-
Double click on CSV Source (Web API or File) to configure it.
-
Set AccessMode to File path or web URL. Enter following URl.
https://zappysys.com/downloads/files/test/invoices.csv.zip https://zappysys.com/downloads/files/test/invoices.csv.gz
In the settings tab set HTTP Request Method to GET. Check on First row has column name.
-
Now, in the compression tab, set file compression format to Zip(for only .zip file) or GZip(for only .gz file).
-
Click on Preview button to see Data Preview.
-
Click on OK button to save CSV Source configure setting UI.
-
Now, Just Drag and Drop Our Free ZS Trash Destination from SSIS Toolbox.
-
And than connect ZS CSV Source (Web API or File) to Trash Destination.
-
Lets Double click on ZS Trash Destination to Configure it.
-
Thats all, Just Execute or run your Package.
Load CSV data into SQL Server using Upsert Destination (Insert or Update)
Once you configured the data source, you can load CSV data into SQL Server using Upsert Destination.
Upsert Destination can merge or synchronize source data with the target table.
It supports Microsoft SQL Server, PostgreSQL, and Redshift databases as targets.
Upsert Destination also supports very fast bulk upsert
operation along with bulk delete
.
Upsert operation
- a database operation which performs INSERT
or UPDATE
SQL commands
based on record's existence condition in the target table.
It
Upsert Destination supports INSERT
, UPDATE
, and DELETE
operations,
so it is similar to SQL Server's MERGE
command, except it can be used directly in SSIS package.
-
From the SSIS Toolbox drag-and-drop Upsert Destination component onto the Data Flow designer background.
-
Connect your SSIS source component to Upsert Destination.
-
Double-click on Upsert Destination component to open configuration window.
-
Start by selecting the Action from the list.
-
Next, select the desired target connection or create one by clicking <New [provider] Connection> menu item from the Target Connection dropdown.
-
Then select a table from the Target Table list or click New button to create a new table based on the source columns.
-
Continue by checking Insert and Update options according to your scenario (e.g. if Update option is unchecked, no updates will be made).
-
Finally, click Map All button to map all columns and then select the Key columns to match the columns on:
-
Click OK to save the configuration.
-
Run the package and CSV data will be merged with the target table in SQL Server, PostgreSQL, or Redshift:
-
Done!
Deploy and schedule SSIS package
After you are done creating SSIS package, most likely, you want to deploy it to SQL Server Catalog and run it periodically. Just follow the instructions in this article:
Running SSIS package in Azure Data Factory (ADF)
To use SSIS PowerPack in ADF, you must first prepare Azure-SSIS Integration Runtime. Follow this link for detailed instructions:
Conclusion
In this article we showed you how to connect to CSV in SSIS and integrate data without any coding, saving you time and effort. We encourage you to download CSV Connector for SSIS and see how easy it is to use it for yourself or your team.
If you have any questions, feel free to contact ZappySys support team. You can also open a live chat immediately by clicking on the chat icon below.
Download CSV Connector for SSIS Documentation
More integrations
Other connectors for SSIS
Other application integration scenarios for CSV
How to connect CSV in SSIS?
How to get CSV data in SSIS?
How to read CSV data in SSIS?
How to load CSV data in SSIS?
How to import CSV data in SSIS?
How to pull CSV data in SSIS?
How to push data to CSV in SSIS?
How to write data to CSV in SSIS?
How to POST data to CSV in SSIS?
Call CSV API in SSIS
Consume CSV API in SSIS
CSV SSIS Automate
CSV SSIS Integration
Integration CSV in SSIS
Consume real-time CSV data in SSIS
Consume real-time CSV API data in SSIS
CSV ODBC Driver | ODBC Driver for CSV | ODBC CSV Driver | SSIS CSV Source | SSIS CSV Destination
Connect CSV in SSIS
Load CSV in SSIS
Load CSV data in SSIS
Read CSV data in SSIS
CSV API Call in SSIS