Create Archive File (RapidMiner Studio Core)
Synopsis
This operator creates an archive file object, which allows the compression of other file objects. It is only possible to create zip files at the moment. After all entries have been added, the archive file object can be stored in the filesystem.Description
The Create Archive File operator creates an archive file object. This object can be passed to the Add Entry to Archive File operator to add data. After all entries have been added, the archive file object can be stored on your harddisk with the Write File operator, or you can store it in the repository.
Currently this operator can only create zip files, but more archive types may be added in a later version.
Please have a look at the tutorial process to better understand the usage of this operator.
Output
- archive file (Archive File)
The archive file object generated during the execution of this operator is the output of this port.
Parameters
- buffer_typeThis operator defines where the buffer for the archive file will be created. There are two possibilities:
- file: The archive file will be created on a disk. Choose this option if you plan to create a big archive file.
- memory: The archive file will be cached in the memory. A memory buffered archive file will usually perform faster in terms of execution time, but the complete archive must be kept in memory, which can lead to problems if large files or a large amount of files is added to the archive. Choose this option if you create rather small files or have a lot of memory.
- use_default_compression_levelThis parameter allows you to override the default compression level. The default compression level depends on the host machine, but usually offers a reasonable trade-off between execution time and compression factor. Range: boolean
- compression_levelThe default compression level of the created zip file is specified by this parameter. This level may be overridden in the subsequent Add Entry to Archive File operators on a per-entry base. In general, higher compression levels result also in a higher runtime. Range: integer
Tutorial Processes
Creating and storing a zip file
This Example Process demonstrates how a zip file can be created in RapidMiner, how entries can be added and how the file can be written to a disk.
First of all, the zip file is created with the Create Archive File operator. Then, some entries are added. At first the Open File operators open some files from your harddisk. These files are then added to the zip file via the Add Entry to Archive File operators. You can see that you can add several files in one single step, and that you can also concatenate several Add Entry to Archive File operators. Finally, the zip file is written to a disk with the Write File operator.
The second Add Entry to Archive File operator creates a directory inside the zip file. After the execution of the process you may open the archive file from your disk and inspect the results.