Read FTP files without local folder in SSIS package - sql-server

I'm using this link as a reference for reading a file from FTP folder. But this tutorial says that the files in the FTP folder should be loaded in a local folder and only then it can be used for processing using other tasks in SSIS.
My question is, Is it possible to read a file directly from the FTP folder without storing them in the local folder and do the ETL operations in SISS?
Any advice would be helpful, Thank you.

Not with standard SSIS components. Standard SSIS allows you to download a file from FTP server to a local folder, and use local CSV-like file as a data source. Standard Flat File Source or XML Source allows only local and mapped network folders as sources for the source File.
If you really want to combine FTP download and Data source in single data source, you can write your own Script Source Component with C# or VB.NET. It will require more efforts than using standard two components.

Related

SSIS File System Task Doesn't Work but Reports Success

I created an SSIS package that extracts two files from a .zip file, imports data from them and then attempts to delete the files that were extracted.
The package works, data is imported and all tasks report success. However the File System Tasks that attempt to delete the files don't delete them, even though they report success.
I use the CozyRoc Zip Task to extract the files. When I remove the Zip Task, the File System Tasks actually do delete the files. I'm not certain that CozyRoc is causing the problem, but the existence of that task may be causing other issues with the package.
Can anyone help me figure out how to reliably delete the files?
Do I need to put in some sort of pause after the Data Flow Tasks to allow them to release whatever locks they might have on the files?
Is there a way to view the DOS commands that the File System tasks use at run time, to verify that they are actually attempting to delete the correct files?
Thank You,
Robbie
Control Flow:
Details:
Visual Studio 2019 v16.11.3
File Names are from Flat File Connection Managers (See image below).
Flat File Connection Managers use Expressions to set their connection strings.
The same connection managers are used to import the data, so I presume that they accurately refer to the correct files and their correct locations.
File System Task Editor for one of the delete tasks:

SSIS File transfer task , Copy Files works but Move file property fails the task

SSIS File System Task can copy but can't move the flat files?. I am trying to move the flat files from source to target folder but FST only working for copy. and while moving it throes and error saying that, file is being used by another process. I have tried using delay's also it doesn't work.
By default, File System Task can perform Move operations as mentioned in the link below, but make sure the the flat file is not used in a Flat File Connection Manager since it will lock the file for reading or writing and it will prevent the FST to perfrom a move operation.
External Links
Move File Using File System Task in SSIS
Move Directory Using File System Task in SSIS

Can anyone suggest me how i can write the path to store the output file in which my stored procedure outputs in my oracle DB?

suppose the IP address of my FTP server is xx.xxx.xx.xx and i need the output file to be stored in D:/example. I need to esnure that the path i give is in my FTP server. How can i include that in my fopen function, like a path which points to the example in my FTP server.
Generally speaking, this is how it goes:
there's a database server
there is a directory on one of its disks
that directory will be used in create directory command which creates a directory, Oracle object
it will be used as a target for your file-related operations. For example:
it'll contain CSV files which are source of external tables
.dmp files, result of data pump export, will be stored there (the same goes for import)
UTL_FILE will create files in that directory
All that means that your idea of creating a file on a FTP server might not work just as easy.
However, there's a way : if you create directory (Oracle object) using UNC (Universal Naming Convention) which points to a directory on the FTP server, the file might be created there. Do some research about it; I know I once did that (put files onto an application server), but that was long time ago and I don't remember everything I did.
Another option you might consider is DBMS_SCHEDULER package. Suppose you create a file on the database server (which is the simplest option; if you do it right, it is more or less trivial). Once the procedure (which creates the file) is done, call DBMS_SCHEDULER.CREATE_JOB using the executable job type and call an operating system batch file that will copy the file from the database server to the FTP server.
That's all I can say about it; at least, you have something to research & think about.

how to download CSV file from FTP location and update table using stored proceedure

I want to download CSV file from FTP location and update that data into tables using stored procedure. I am not sure how to do that or whether stored procedure is right approach. I have gone through many posts but most of the post talk about pushing data to FTP location.
Any help much appreciated.
Thank you.
For this requirement you may have to write some Shell Script to connect required FTP Server and download to local system and use to sql loader function supported by the respective database.
If you using some programming language you can write program to download file from ftp location and read CSV file and insert as batch.

File Poller in BusinessWorks

In the BW Designer, File Poller can look for file in the local server where the Designer is installed.
But If I want the File Poller to look at another server instead of the local server, I don't see any option to do that.
Is there any other way so that I can use File Poller to look on any other server and poll file from that server instead of the server where the Designer is installed?
Thanks
The File Poller can only access files and directories visible to the system the engine is running on, so you need to mount a network drive to poll files sitting on a remote server.
Another option would be to build a custom polling mechanism using the FTP Palette. You could use a Timer instead of a File Poller. On the first execution, the process would list the files in the remote folder using the FTP Dir activity then store this list in a Shared Variable. This list would contain the file names, last modification dates, etc.
Every time the process is triggered, it would run FTP Dir to compare the current list of files against the previous one to detect any changes (new files, modified files, etc.) then update the Shared Variable to keep the latest image of the remote folder. You could then run FTP Get to retrieve any new or modified file.

Resources