Page 1 of 1

Reading a csv file directly from a Shared drive location

Posted: Wed Sep 05, 2012 11:55 am
by vivekgadwal
Hello,

I have a need to read a ".csv" file, which is placed on a shared drive location (path not yet determined ... but for now, I have it on my work station) and load it into a table. This process is on demand.

As I see it, I can do this two ways ... 1) FTP/SCP the file to IIS Unix box and then run a job to load it into the table or ... 2) Read it directly from that location, because there will be versions of this file in that directory, and load the table. I would like to go with option 2, but I am unable to figure out how to do it.

I tried Data Direct ODBC driver for Text files to read the file, but it is not possible to connect to the file. I am obviously missing something here, and would appreciate it if somebody could point me to the solution.

Thanks in advance.

Posted: Wed Sep 05, 2012 12:29 pm
by PaulVL
If you have the mount accesible from your server... why not just use a Complex Flat File stage?

Test for the presence of the file first of course.

Posted: Wed Sep 05, 2012 12:38 pm
by vivekgadwal
Thanks for your prompt response @PaulVL. I got the directory mounted on Unix, so now I am able to see the file. But, if that is the case, I do not need CFF stage. I can simply use a Sequential File stage or an ODBC stage (with DataDirect text drivers).

However, my question is, what if the mounts are not there on Unix? How can I access a file (.csv) when it is not there on Unix? Is it possible? Please advise either way!

Posted: Wed Sep 05, 2012 1:11 pm
by jwiles
If you have an FTP server running on your workstation, you could possibly use the FTP Enterprise stage to retrieve it.

For using any of the stages, the file must be visible to the server the stage is running on.

Regards,