Search Shortcut cmd + k | ctrl + k
duck_lk

Query LabKey Server tables with automatic local Parquet caching

Maintainer(s): nrminor

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.4.4 1.4.5 1.5.5 1.5.6 2.0.0
Linux AMD64
Linux ARM64
macOS AMD64
macOS ARM64
Windows AMD64
Windows ARM64
WebAssembly

Installing and Loading

INSTALL duck_lk FROM community;
LOAD duck_lk;

Example

-- Set LABKEY_BASE_URL, LABKEY_CONTAINER, and LABKEY_API_KEY env vars, then:
CALL labkey_sync('lists', 'People');
FROM People LIMIT 10;

About duck_lk

Query LabKey Server tables directly from DuckDB with automatic local Parquet caching and staleness detection. Provides labkey_query() for one-shot access, labkey_sync() for explicit cache warming, and helper functions like labkey_cache_info() and labkey_cache_clear() for cache inspection and management. For best performance on repeated analysis, sync the table first and then query the synced table directly so DuckDB can read the cached Parquet natively.

For full documentation, see the GitHub repository.

Added Functions

function_name function_type description comment examples
labkey_cache_clear table NULL NULL  
labkey_cache_info table NULL NULL  
labkey_is_stale scalar NULL NULL  
labkey_parquet_path scalar NULL NULL  
labkey_query table NULL NULL  
labkey_sync 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
temp_directory Set the directory to which temporary files are written. VARCHAR GLOBAL [] post.db.tmp