zipfile
Loads data from a text file compressed with ZIP. You can use wildcards(*
) in the ZIP file path and ZIP entry path.
Syntax
Required Parameter
ZIP_PATH
-
Path of the zip file. If you use a wildcard (
*
) in the file name, you can retrieve all the files containing a specific string pattern in the file name at once. The Logpresso daemon must have the read permission to the file. FILE_IN_ZIP
-
Zip entry path of the text file from which to load the data. If you use a wildcard (
*
) in the file name, you can load all files containing a specific string pattern in the file name at once.
Optional Parameter
limit=INT
- Maximum number of records to load (default: unlimited).
offset=INT
- Number of records to skip (default:
0
).
Usage
-
Read the
iis.txt
file among text files compressed in the/opt/logpresso/imported.zip
file.zipfile /opt/logpresso/imported.zip iis.txt
-
Read all txt files compressed in the
/opt/logpresso/testdata.zip
file.zipfile /opt/logpresso/testdata.zip *.txt
-
Read all txt files compressed in all ZIP files in the
/opt/logpresso
path.zipfile /opt/logpresso/*.zip *.txt