Skip to content
DuckDB community extension

duck_lk

Query LabKey Server tables with automatic local Parquet caching

01 / SETUP

Install and load

Run these commands in a Haybarn SQL session. The extension is available from the community repository.

Haybarn 2.0.0 · SQL
INSTALL duck_lk FROM community;
LOAD duck_lk FROM community;

Using upstream DuckDB? Follow the maintainer’s installation instructions.

02 / QUERY

Usage example

Set LABKEY_BASE_URL, LABKEY_CONTAINER, and LABKEY_API_KEY env vars, then:

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

Provided by nrminor. Not yet verified on Haybarn 2.0.0.

Sample data & setup

About this extension

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.

Project overview from the community descriptor.

Documentation and resources

Project and build details
Repository
nrminor/duck-lk
License
MIT OR Apache-2.0
Maintainers
nrminor
Written in
Rust
Build source
5c89b0a15c82
Build definition
Community descriptor