Reading a csv file directly from a Shared drive location

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Reading a csv file directly from a Shared drive location

Post 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.
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post 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.
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Post 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!
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
Post Reply