Its a Free tool to connect using PostgreSQL with basic limited features. But it support creating destination table if not exists.
Friday, May 28, 2021
Copy SQL Server Data to PostgreSQL vice versa using SSIS( SQL Server Integration services) using Free tool Devart Express edition
Its a Free tool to connect using PostgreSQL with basic limited features. But it support creating destination table if not exists.
Tuesday, May 25, 2021
Copy SQL Server Data to PostgreSQL vice versa using SSIS( SQL Server Integration services)
SQL Server Data tools (Integration services) tools allows the third party Intgeration with SQL Server Integration Project which comes with Visual studion.
SSIS does not have buit-in Integration with PostgreSQL but allows integration through third party Applications.
Go to Visual studion 2019. In Extensions menu Manage Extensions.
Search with Postgre.
The first one Npgsql PostgreSQL Integration is free but does not support using SSIS. We can use this only for server explorer which can be intrgrated using Visual Studio .Net.
There are many vendors which provides 30 days trial period. One of them is SSIS PostgreSQL Source. when click on download it will redirect to the page
Download SSIS PowerPack - 30 Day FREE Trial Includes: | ZappySys
After registering you can download and use trial version for a month. This application provides many connector source systems not only PsotgreSQL.
These are the different connector available after installing the software. Postgre is also there, I have highlighted the same.
But I feel it do not have any option to create a table if does not exist. Table must exist in SQL server.
Their connections are working fine as exptected. I ran one SSIS task to load one sample table it working fine.
Package execution was sucessfully after mapping the columns. But there should have been an option to create destination table based on source table columns this is only one drawback i have seen in this product.
Other Vendor who is supporting free. But they also support basic featres. That will redirect to the page
Saturday, May 22, 2021
How is install SQL Server Integration Services(SSIS) or SSDT tools using Visual Studio 2019
Microsoft stopped proving separate install for SSDT tools. It is now part of Visual studio 2019.
It should be installed using visual studion 2019 package.
Once you have installed visual studio. Using the Visual studio installer SQL server integration services tools can be installed.
Launch Visual Studio installer.
Scroll down and select Data Storage and processsing and ensure that you have selected the SQL server Integration services project
Once after installation if you open installer again in indivdual components sections you can it istalled.
Same can be seen in the installation details
Friday, May 21, 2021
Rename the files in a folder using the SSIS(SQL Server Integration Services) or SSDT Tools(Visual Studio 2019)
Renaming the files in a folder using SSIS is very easy. We need just two tasks.
1) ForEachLoop Container
2)File System task
These both are available in Control-Flow Task.
First Place For Each Loop Container and then place File System Task.
Second Create a variables as shown below.
Filename : This variable is used for Dynamically getting the Filename in SSIS For Each Loop container. We need to set some default name (abc.txt) so that it will create failure in build.
FilePath : This variable is static. You can hardcode the variable path. Or You can create connection and get the File path. Here I created variable and Kept Some Local Path.
DestFileName : This variable is used for Dynamically setting the filename. We can write expression how to rename the files.
Suppose I have image files from different source like whatupp, mails and vedios but i need to sort all based on the timestamp but the inital name was different. So I can use this replace the name of file so that all will be in sorted manner.
After setting the variables we need to set the For Loop container values to pickup dynamically
in folder.
Double click on For Each Loop and Go to the Collection tab. Select Enumerator as For Each File Enumerator.
In Expressions set Directory for the File Path Variabe
FileNameRetieval will get Filename and sets to Filename variable.
In Variable Mappings, Use the the same sequnce to assign the variables using the same order
Index starts from Zero.
Click Ok. Edit the File System task inside the For each loop container.
Set OverwriteDestination to False so that it will not overwrite the files if it matches.
For Destination and Source connection set the Paramaeters IsDestinationPathVarible and
IsSourcePathVariable to True. By default it will be false. Here we have parameterised to use dynamically so we need to set to "True"
SourceVariable : This variable is used for Dynamically getting the Filename in SSIS For Each Loop container. We have wrtitten this expresssion in variable definition. So it will be same and Filename and can be accessed across SSIS Package.
DestinationVariable : This variable is Dynamic. We have set the same to replace "IMG"
name to "VID".
Also do not use the expression to use variable which has been set in For Each Loop Container to set in File System Task.
Error at File System Task: Failed to lock variable "for read access with error 0xC0010001 "The variable cannot be found. This occurs when an attempt is made to retrieve a variable from the Variables collection on a container during execution of the package, and the variable is not there. The variable name may have changed or the variable is not being created.".
Ex:
----------
Before running the Task. You can see there are different file types but I want to keep same name format. I can do that using this simple task.
After Executing the SSIS Task.
We can clearly see that after running the task file names got changed.
Thursday, June 4, 2015
Working with For Loop Container in SSIS
Here I have Shown a simple For Loop Task . Its prints from 0-9.
Write the below code in main.
MessageBox.Show(Dts.Variables[0].Value.ToString()
Sunday, May 17, 2015
Loop through Excel Files using SSIS ForEachLoop Task
as mentioned below.
Set ServerName Propery to Some hard coded excel file which exist so that it will not fail while running.
In the ForEach Loop Editor . Select Collection tab.
Go to Expressions. Set the Directory Property to FilePath and FileNameRetrieval to FileName.
Then Go to Variable Mappings . Map the variables to index.
The Index of FilePath should be zero and FileNamr should be one. It should follow the same order as mentioned in the Expression.