ZappySys provides high performance drag and drop connectors for PostgreSQL Integration. In this post you will see how to Load PostgreSQL Table Data to CSV File using SSIS PostgreSQL Source. PostgreSQL Source supports SQL language to query PostgreSQL data. PostgreSQL is a powerful, open source relational database with strong reputation for reliability, feature robustness, and performance.
In nutshell, this post will focus on how to Load PostgreSQL Table Data and write into CSV File using Trash Destination in few clicks. You can also use the CSV Destination instead of Trash destination if you wants more option like compressed file gzip (*.gz) or zip, wants to splitting the file by row count of file size and more.
- First, you will need to have SSIS installed
- Secondly, make sure to have SSDT
- Thirdly, You have obtained PostgreSQL Credential.
- Finally, do not forget to install ZappySys SSIS PowerPack
Components Mentioned in this article
What is PostgreSQL?
PostgreSQL is a powerful, open source object-relational database system that uses and extends the SQL language combined with many features that safely store and scale the most complicated data workloads. The origins of PostgreSQL date back to 1986 as part of the POSTGRES project at the University of California at Berkeley and has more than 30 years of active development on the core platform.
PostgreSQL has earned a strong reputation for its proven architecture, reliability, data integrity, robust feature set, extensibility, and the dedication of the open source community behind the software to consistently deliver performant and innovative solutions. PostgreSQL runs on all major operating systems, has been ACID-compliant since 2001, and has powerful add-ons such as the popular PostGIS geospatial database extender. It is no surprise that PostgreSQL has become the open source relational database of choice for many people and organisations.
Getting started with using PostgreSQL has never been easier – pick a project you want to build, and let PostgreSQL safely and robustly store your data.
Download and Install PostgreSQL
Please go to below download link and download the Windows version Binary package and install it and follow the steps from the installer.
Create PostgreSQL Database and Table
- To do this, we will first open the pgAdmin Panel.
- It will open the pgAdmin Panel in the browser. Select Server and Right click on Databases to create database.
- Enter the Database name and click on Save to create it.
- Now select the created database under it expand Schemas and right click on Tables and click on create Table.
- Now enter the table name and go to columns tab.
- Add the columns by clicking add button and give the desire column name and select the datatype for the same.
- Now, let’s insert some data using Query Editor.
- That’s it, now let’s move forward to read the data from this table using SSIS PostgreSQL Source in the next the section.
In order to start, we will show several examples. ZappySys includes an SSIS PostgreSQL Source that will help you extract large amount of data from a PostgreSQL Database. PostgreSQL Source supports Multiple modes (i.e. Table or Query) to read data from PostgreSQL Database and many more operations. Here we are showing you is, How to read data from PostgreSQL collection.
You can connect to your PostgreSQL database by entering your PostgreSQL credentials.
Load PostgreSQL Table Data to CSV File
Let´s start with an example. In this SSIS PostgreSQL Source Task example, we will load the PostgreSQL table data to CSV file.
- First of All, Drag and drop Data Flow Task from SSIS Toolbox and double click it to edit.
- Drag and Drop PostgreSQL Source Task from the SSIS Toolbox and double click on it to edit it.
- Let’s create a connection for PostgreSQL Database.
- Let’s select the Table mode and select the table and click on preview.
- You can also use the query mode to filter the data and do more operation using query. You can find our several Examples also by clicking on <<View Examples>>.
- Now let’s add Trash destination Task and edit it and enter the CSV File Path.
- That’s it now execute the package and it will load data from PostgreSQL Table to CSV File.
Above all, in this blog, we learned how to Read data from PostgreSQL in SSIS. We used SSIS PostgreSQL Source to read the data from PostgreSQL Table and load data into CSV File. You can download SSIS PowerPack here to try many other scenarios not discussed in this blog along with 70+ other components.
Finally, you can use the following links for more information: