Today, I will demonstrate how to use the OdiZip tool in Oracle Data Integrator. As the name suggests, the OdiZip tool is used to create ZIP files from a directory or several files.
Usage of OdiZip
OdiZip -DIR=<dir> -FILE=<file> -TOFILE=<dest_file> [-OVERWRITE=<yes|no>] [-RECURSE=<yes|no>] [-CASESENS=<yes|no>] [-ENCODING=<file_name_encoding>]
OdiZip is useful when you have files of smaller size because the zipping operation is done by an Agent and the traffic between the agent and the target directory can cause a lot of problems.
Pre-requisites: Oracle Data Integrator 11g (build version 18.104.22.168.0)
Now, let’s put this tool into practice using ODI. Open ODI Studio and create a new Package named odizip_demo in any of your existing Projects.
Drag the OdiZip tool in the vacant area. Connect it to the OdiBeep tool using an arrow.
OdiZip "-DIR=D:\odi_work" "-FILE=*.*" "-TOFILE=D:\odi_work\odi_work.zip" "-OVERWRITE=YES" "-RECURSE=YES" "-CASESENS=NO"
Finally, run the package. Check the status of the operation under the Operator tab. If the operation was successful, you should see your zip file in the target directory!