load files from SFTP in ssis package - ssis

In ssis package how to download files from SFTP server . FTP details and FileName should read from config file. Rename the files to append timestamp.files are .csv files. Please help.

Related

Double click .exe file to generate .DAT file in SSIS

I have a requirement to open the .exe files, which will create .DAT file (contains data) in the same path. When I tried using execute process task and script task to open the .exe file. I can only see the .exe executing but not opening. As a result,.DAT file is not generated. Can you help me how to resolve this? Because executing the .exe file is not what is required. Double-clicking on the file only generates the file.

Unzip .tar.gz files in SSIS

I have a .tar.gz file. Now i need to unpack these files with SSIS package. Previously did unzip and delete for .zip files with the help of For each container and script task. Not sure how to do it for .tar.gz files. Any help?
You can use an execute process task to achieve this (or using process from Script task), but you have to install a ZIP application like 7Zip or Winzip or else. And use command line to Zip or Unzip archives.
Follow one of these links for more details:
Zip a folder using SSIS
7Zip command line examples
What command line parameters does WinZip support?

Moving CSV file to different server using SAS

I am not very technical so please bear with me while I try to explain the problem. We have a daily scheduled job that kicks off a SAS program on a Unix server. The program analyzes data and spits out a CSV file which gets stored on the server and then emailed to me. I then manually download the file from email and upload it to a utility to process the file. I am looking for a way to bypass the manual steps and instead have the SAS program upload the CSV file directly to a folder on the server for the file processing utility.
So given that the csv file is stored on the server that SAS is connected to (/user/folder/file.csv) how can I transport this file to another folder (/inbox) on another server (server2.test.com)?
Here is what I have so far, but I think I am missing something because the file isn't making it to the folder:
proc import file="/user/folder/file.csv"
dbms=csv out=file1 replace;
run;
filename outdir ftp "/inbox" DIR
host="server2.test.com"
user="username" pass="pwd";
data _null_;
file outdir(file1);
put file1;
run;
Thanks!
Mike
You are close. I would define one filename for the reading the CSV file and one for writing to the FTP server.
filename in "/user/folder/file.csv";
filename outdir ftp "/inbox" DIR
host="server2.test.com"
user="username" pass="pwd"
;
Then copy the file.
data _null_;
infile in;
file outdir("file.csv");
input;
put _infile_;
run;

SSIS FTP Task Sending Files to Wrong Directory

I'm using the FTP Task in SSIS to send files. They task succeeds but the files get uploaded to the wrong folder. Instead of being sent to the cg268301 folder they are being sent to the cg268300 despite selecting /cg268301 from the remote path field in the FTP task editor.
I've tried uploading this file to the /cg268301 file using an execute process task and it works fine. I just don't know why it won't work with the FTP task.

SSIS zip a file using 7zip

I am using ssis to zip and rename a folder with about 7 files in it. when it zips the folder and renames it the old folder is inside of the zip folder i would just like to have the zip folder with the new name and the files inside of that.
i have tried
a -tzip "F:\Extracts\QCExtracts\QCreports_2014_07.zip" "F:\Extracts\QCExtracts\QCreports\"
a -tzip "F:\Extracts\QCExtracts\QCreports_2014_07.zip" "F:\Extracts\QCExtracts\QCreports"
for both i get the result of QCreports_2014_07.zip\ QCreports\all files
i need it to be QCreports_2014_07.zip\ all files
Assuming you use "Execute Process Task" for the 7z.exe call:
You have to set F:\Extracts\QCExtracts\QCreports\as WorkingDirectory in the Process section of your Task. This should omit the subdirectory in the zip file.