Search Shortcut cmd + k | ctrl + k

Read files and dataset services into DuckDB and stream query results to Lance, Parquet datasets, and Iceberg tables

Maintainer(s): dentiny

Compatibility Matrix

This table covers all DuckDB releases that have not reached end-of-life, including LTS releases, and shows the 2 most recent patch releases of each. Older patch releases are not listed, but the extension may be available for them as well.

Platform 1.5.5 1.5.6 2.0.0 2.0.1
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL duckport FROM community;
LOAD duckport;

Example

INSTALL duckport FROM community;
LOAD duckport;

COPY (SELECT 1 AS id, 'hello' AS body)
TO 'duckport_demo_dataset' (FORMAT duckport_parquet);

SELECT * FROM read_parquet('duckport_demo_dataset/*.parquet');

About duckport

DuckPort reads files and dataset services as DuckDB tables and streams any SQL query result to Lance, Parquet dataset directories, or Iceberg REST tables. DuckDB evaluates filters, joins, casts and expressions before writing.

Sources

  • Files: CSV, TSV, JSON/JSONL/NDJSON, Parquet, XML and WARC. Standard file readers support local/file/HTTP(S)/S3 objects, same-schema file lists, and local/S3 directories and globs.
  • Datasets and archives: Hugging Face Parquet exports, Common Crawl releases and segments, ATIF trajectories, arXiv bulk TAR shards and MECA packages.
  • Metadata: arXiv/DOAB/OAPEN OAI-PMH, Gutenberg RDF, PMC article metadata, inventory and article shards, and dated CourtListener bulk exports.
  • Selected attachments: Zenodo, Dataverse, Figshare, Internet Archive, Federal Register, GovInfo, HathiFiles, Library of Congress, Semantic Scholar, OpenStax, BHL, Regulations.gov, USPTO and bioRxiv/medRxiv.
SELECT * FROM duckport_scan_csv('people.csv', header := true);
SELECT * FROM duckport_scan_parquet('data/**/*.parquet');
SELECT * FROM duckport_scan_huggingface('lhoestq/demo1', split := 'train');

Provider readers have explicit selection rules; metadata scans do not automatically download linked content. See the reader catalog for function names and required arguments.

Sinks and COPY options

Format Destination Modes
duckport_lance Local/file/S3 Lance dataset Create, APPEND, OVERWRITE
duckport_parquet Local/file/S3 Parquet dataset directory Create, APPEND
duckport_iceberg Unpartitioned Iceberg REST table Create, APPEND
COPY (SELECT id, upper(body) AS body FROM events)
TO 'events.lance' (FORMAT duckport_lance);

COPY events TO 'events_dataset'
(FORMAT duckport_parquet, APPEND, TARGET_FILE_SIZE 268435456);

All sinks accept TARGET_FILE_SIZE, PRESERVE_ORDER, READ_CONCURRENCY, WRITE_CONCURRENCY, SAMPLE_PERCENT, SAMPLE_ROWS, GENERATED_COLUMNS and EXTRA_OPTIONS. Iceberg generated columns require compatible catalog metadata. EXTRA_OPTIONS forwards named arguments to explicit DuckPort readers. Writes default to one writer and a 512 MiB soft file-size target; WRITE_CONCURRENCY 'auto' opts into automatic writer planning.

Lance additionally supports nested URL BLOB_COLUMNS, automatic tagged ATIF media downloads, BLOB_INLINE_SIZE_THRESHOLD, BLOB_DEDICATED_SIZE_THRESHOLD, STORAGE_VERSION, COLUMN_STRUCTURAL_ENCODING, SCALAR_INDEX_COLUMNS, VECTOR_INDEX_COLUMNS, TEXT_INDEX_COLUMNS and BLOOM_FILTER_INDEX_COLUMNS. Lance and Parquet accept COLUMN_COMPRESSION and COLUMN_COMPRESSION_LEVEL; Parquet restricts these to top-level columns. Iceberg requires CATALOG_URI and STORAGE_ROOT, with optional WAREHOUSE.

COPY (SELECT id, image_url AS image FROM events)
TO 'images.lance' (FORMAT duckport_lance, BLOB_COLUMNS ('image'));

Credentials come from URI-scoped DuckDB secrets, independently for source storage, provider APIs, blob URLs, destinations and Iceberg catalogs. Load httpfs to register its S3 and Hugging Face secret types.

Parquet output is a directory; native FORMAT PARQUET writes a single file. Parquet and Iceberg do not support OVERWRITE, Lance blob ingestion or indexes. External commits are not rolled back by a DuckDB transaction; failure and publication behavior depend on the sink.

See the COPY reference for all 24 options, defaults and sink restrictions, the secrets guide for authentication, and the changelog for the initial release scope.

Added Functions

function_name function_type description comment examples
duckport_scan_arxiv table NULL NULL  
duckport_scan_arxiv_metadata table NULL NULL  
duckport_scan_atif table NULL NULL  
duckport_scan_bhl table NULL NULL  
duckport_scan_bhl_open_data table NULL NULL  
duckport_scan_bhl_pages table NULL NULL  
duckport_scan_biorxiv table NULL NULL  
duckport_scan_commoncrawl table NULL NULL  
duckport_scan_commoncrawl_segment table NULL NULL  
duckport_scan_courtlistener table NULL NULL  
duckport_scan_csv table NULL NULL  
duckport_scan_dataverse table NULL NULL  
duckport_scan_doab table NULL NULL  
duckport_scan_federal_register table NULL NULL  
duckport_scan_figshare table NULL NULL  
duckport_scan_govinfo table NULL NULL  
duckport_scan_gutenberg table NULL NULL  
duckport_scan_hathifiles table NULL NULL  
duckport_scan_huggingface table NULL NULL  
duckport_scan_internet_archive table NULL NULL  
duckport_scan_json table NULL NULL  
duckport_scan_jsonl table NULL NULL  
duckport_scan_library_of_congress table NULL NULL  
duckport_scan_meca table NULL NULL  
duckport_scan_ndjson table NULL NULL  
duckport_scan_oapen table NULL NULL  
duckport_scan_openstax table NULL NULL  
duckport_scan_parquet table NULL NULL  
duckport_scan_pmc table NULL NULL  
duckport_scan_pmc_inventory table NULL NULL  
duckport_scan_pmc_shard table NULL NULL  
duckport_scan_regulations table NULL NULL  
duckport_scan_semantic_scholar table NULL NULL  
duckport_scan_tsv table NULL NULL  
duckport_scan_uspto table NULL NULL  
duckport_scan_warc table NULL NULL  
duckport_scan_xml table NULL NULL  
duckport_scan_zenodo table NULL NULL  

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 typed_value
conversion_storage_io_request_size Target bytes per source and Blob storage read request BIGINT GLOBAL [] 2097152
conversion_storage_io_timeout_ms IO operation and body method timeout per attempt (ms) BIGINT GLOBAL [] 30000
conversion_storage_retry_factor Storage exponential retry backoff multiplier for reads and writes DOUBLE GLOBAL [] 2.0
conversion_storage_retry_max_delay_ms Maximum exponential retry backoff (ms) BIGINT GLOBAL [] 10000
conversion_storage_retry_max_times Maximum retries after the initial attempt (0 disables retries) BIGINT GLOBAL [] 5
conversion_storage_retry_min_delay_ms Initial exponential retry backoff (ms) BIGINT GLOBAL [] 500
conversion_storage_timeout_ms Control operation timeout per attempt (ms) BIGINT GLOBAL [] 30000
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp
© 2026 DuckDB Foundation, Amsterdam NL
DuckDB Home Code of Conduct Trademark Use Blog