on 03-25-2015 7:38 AM
Hi Experts,
I have a CSV file which is placed in zip folder, Now my BODS job should first unzip the file and then data to be load. can any one please tell me how to unzip the file using BODS.Thanks in advance.
Thanks & Regards
Balakrishna
You can use DS to run a script (on the Job Server) that will unzip the file in the beginning of your Job/WorkFlow using the exec function, for example:
exec('D:\path_to_script\script.cmd','','0');
I've found this fragile and problematic at times, and if you are always picking up the file at the same time and the job runs on a regular schedule, I prefer to perform file-level pre-work outside of DS using the OS job scheduler (like Windows Task Scheduler, cron, etc.).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
using winzip:
(which requires the command line installation)
exec('d:\\programs\\winzip\\wzunzip.exe','-o -yb [$archivePath]\[$archiveDSN] [$destPath]',8)
There are many zip programs out there, you just need to find one that works on your compression type... find the documentation pertaining the command line switches, and call it using the DataServices built in function exec().
(if its a windows path make sure always to double quote paths containing spaces)
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.