Component Family |
File/Management |
|
Function |
The tFileArchive zips one or more |
|
Purpose |
Use this component to zip one or more files for processing. |
|
Basic settings |
Directory |
The directory that contains files to be zipped. Subdirectories: Select this check |
|
Archive file |
Destination path and name of the result archive file. |
|
Compress level |
Select the compression level you want to apply. Best: the compression quality Normal: compression quality and Fast (no compression): |
|
All files |
Select this check box if you want all files in the directory to be Filemask: type in a file name or |
Create directory if not exists |
This check box is selected by default. It creates a destination |
|
|
Encoding |
Select the encoding type from the list or select Custom and define it manually. This field |
Overwrite Existing Archive |
This check box is selected by default. This allows you to save an NoteWhen the replacement fails, the Job runs. |
|
Encrypt files |
Select this check box if you want your archive to be password To enter the password, click the […] button next to the With this option used, the result archive file can be unzipped |
|
ZIP64 mode |
This option allows for archives with the .zip64 extension to be
|
|
Advanced settings |
tStatCatcher Statistics |
Select this check box to gather the processing metadata at the Job |
Global Variables |
ARCHIVE_FILEPATH: the path to the archive file. This is
ARCHIVE_FILENAME: the name of the archive file. This is an ERROR_MESSAGE: the error message generated by the A Flow variable functions during the execution of a component while an After variable To fill up a field or expression with a variable, press Ctrl + For further information about variables, see Talend Studio |
|
Connections |
Outgoing links (from this component to another): Row: Main; Reject; Iterate.
Trigger: On Subjob Ok; On Subjob Incoming links (from one component to this one): Row: Main; Reject; Iterate.
Trigger: Run if; On Subjob Ok; On For further information regarding connections, see |
|
Usage |
This component must be used as a standalone component. |
|
Log4j |
The activity of this component can be logged using the log4j feature. For more information on this feature, see Talend Studio User For more information on the log4j logging levels, see the Apache documentation at http://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/Level.html. |
|
Limitation |
n/a |
This scenario creates a Job with a unique component. It aims at zipping files and
recording them in the selected directory.
-
Drop the tFileArchive component from the
Palette onto the workspace. -
Double-click it to display its Component
view. -
In the Directory field, click the […] button, browse your directory and select the
directory or the file you want to compress. -
Select the Subdirectories check box if you
want to include the subfolders and their files in the archive. -
Then, set the Archive file field, by filling
the destination path and the name of your archive file. -
Select the Create directory if not exists
check box if you do not have a destination directory yet and you want
to create it. -
In the Compress level list, select the
compression level you want to apply to your archive. In this example, we use the
normal level. -
Clear the All Files check box if you only
want to zip specific files. -
Add a row in the table by clicking the [+]
button and click the name which appears. Between two star symbols
(ie. *RG*), type part of the name of the file that you want to compress. -
Press F6 to execute your Job.
The tFileArchive has compressed the selected file(s)
and created the folder in the selected directory.