Search Shortcut cmd + k | ctrl + k
biosignals

Reader utilities to import medical time series data into DuckDB as EDF(+)/BDF(+) files.

Maintainer(s): nmontesg

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 biosignals FROM community;
LOAD biosignals;

Example

INSTALL biosignals FROM community;
LOAD biosignals;
FROM read_edf_global_header('path/to/edf_file.edf');

About biosignals

The biosignals extension for DuckDB provides reader functions to import medical time series data directly into DuckDB. This is suitable for storing and analyzing data in SQL that is typically stored in EDF(+) of BDF(+) files:

  • Electrocardiography (ECG)
  • Electroencephalography (EEG)
  • Polysomnography (PSG Sleep studies)
  • And many others

For full documentation and examples, see the project README.

Reader functions:

  • read_edf_global_header(): Import the global header information into a table, one row per file.
  • read_edf_signal_headers(): Import the header information for each individual signals into a table, one row per every file signal.
  • read_edf_signal(): Import the time series data of EDF(+)/BDF(+) files into a table. Only non-annotation signals are included.
  • read_edf_annotations(): Import the annotation data of EDF(+)/BDF(+) files into a table, one row per TAL (time-stamped annotation list). Only annotation signals are included.

Added Functions

function_name function_type description comment examples
read_edf_annotations table Read annotation signals from EDF(+) / BDF(+) files into DuckDB. NULL [FROM read_edf_annotations('/path/to/recording.edf');, FROM read_edf_annotations('/path/to/all_recordings/*');]
read_edf_global_header table Read global header information from EDF(+) / BDF(+) files into DuckDB. NULL [FROM read_edf_global_header('/path/to/recording.edf');, FROM read_edf_global_header('/path/to/all_recordings/*');]
read_edf_signal table Read signal records from EDF(+) / BDF(+) files into DuckDB. NULL [FROM read_edf_signal('/path/to/recording.edf');, FROM read_edf_signal('/path/to/all_recordings/*');]
read_edf_signal_headers table Read signal information from the headers of EDF(+) / BDF(+) files into DuckDB. NULL [FROM read_edf_signal_headers('/path/to/recording.edf');, FROM read_edf_signal_headers('/path/to/all_recordings/*');]

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