Search Shortcut cmd + k | ctrl + k

Read files within zip archives

Maintainer(s): isaacbrodsky

Installing and Loading

INSTALL zipfs FROM community;
LOAD zipfs;

Example

SELECT * FROM 'zip://my_zip.zip/my_file.csv';

About zipfs

The zipfs extension adds support for reading files from within zip files and other archives.

Added Functions

function_name function_type description comment examples
archive_contents table Returns a table of the files in the archive. NULL [SELECT * FROM archive_contents('example.zip');, SELECT file_name, file_size, is_directory, is_encrypted FROM archive_contents('example.zip');]
zip_contents table Returns a table of the files in the zip archive. NULL [SELECT * FROM zip_contents('example.zip');, SELECT file_name, file_size, is_directory, is_encrypted FROM zip_contents('example.zip');]

Overloaded Functions

This extension does not add any function overloads.

Added Types

This extension does not add any types.

Added Settings

name description input_type scope aliases
zipfs_extension Extension to look for splitting the zip path and the file path within the zip. To specify an artificial seperator, instead set: set zipfs_split = '!!'; VARCHAR GLOBAL []
zipfs_split Extension to look for splitting the zip path and the file path within the zip. Will be removed from the zip file name. Overrides zipfs_extension. Defaults to NULL. VARCHAR GLOBAL []