Skip to content

KxSystems/hdf5

Repository files navigation

hdf5

Interface for conversion between HDF5 and kdb+ data

GitHub release (latest by date) Travis (.org) branch

Introduction

This interface lets kdb+ users convert data between HDF5 and kdb+ in order to allow users familiar with either technology to analyze data in a format which they may be more familiar with.

The interface follows closely the HDF5 C API. In certain cases structures or types common in HDF5 or q may by necessity need to be modified to account for differences between the two data formats. In cases where this is necessary, documentation will indicate the assumptions made and expected behavior. This is particularly the case in the mapping of types.

Exposed functionality includes

  • creation of files/attributes/datasets/groups/links
  • read/write HDF5 data or attributes from a kdb+ session
  • link locations within files

This is part of the Fusion for kdb+ interface collection.

Use cases

This data format is used across a number of sectors with use-cases including but limited to the storage of

  • Neural network architectures (Python Keras)
  • Geological and Hydrological datasets.
  • Astrophysical earth observation data for NASA

Further information on sectors which make use of this technology can be found here

New to kdb+ ?

Kdb+ is the world's fastest time-series database, optimized for ingesting, analyzing and storing massive amounts of structured data. To get started with kdb+, please visit https://code.kx.com/q for downloads and developer information. For general information, visit https://kx.com/

New to HDF5 ?

Hierarchical Data Format 5 (HDF5) is a file format designed specifically for the storage and organization of large amounts of data. It is supported by the HDF Group and free to use under a BSD-like licence.

In many ways HDF5 acts like a truly hierarchical file system similar to that used by Linux or Windows. This structure contains two primary objects:

Datasets may contain multidimensional arrays of homogenously-typed data or compound data containing a mixture of types. These act similarly to files within a traditional POSIX file system.

Groups act as container structures which can hold datasets or other further groups. These act similarly to folders in a traditional POSIX file system.

A number of secondary objects and structures add complexity to the format and in doing so allow the format to be used for a wider number of use cases.

Attributes allow metadata information to be associated with a dataset or group, i.e. associate the date of data collection with a group or the room temperature at the time a set of results was collected.

Linking functionality Like a traditional POSIX file system, it is possible to create links between objects (hard/soft/external); these allow datasets or groups relevant to multiple experiments or use cases to be accessed via routes that a user may find more intuitive.

If you have any HDF5 related questions, you can raise them on the HDF Forum.

API Documentation

👉 API reference

Mapping of HDF5 Types

👉 Type Mapping

Installation Documentation

👉 Install guide

Building From Source

👉 Building guide

Example Usage

👉 Examples

⚠️ Unsupported functionality

This interface is in active development; as such, there are a number of use cases currently unsupported.

  • Creation of compressed datasets
  • Access to unlimited datasets
  • Interaction with HDF5 images

If your use case requires the above functionality, please open an issue. If you are able, please consider contributing to the project.

Threaded/concurrent access

👉 Thread safety explains when you can use threads (e.g. peach), or concurrently process files from multiple instances.

By default, our releases are built without multithread support. For multithread support, download the source from our release page to build against your HDF5 library with threading enabled. We recommend you use the standard non-thread safe version of HDF5 if not using multiple threads.

Status

This interface is currently available under an Apache 2.0 licence and is supported on a best-efforts basis by the Fusion team. This interface is currently in active development, with additional functionality to be released on a rolling basis.

If you find issues with the interface or have feature requests please raise an issue.

To contribute to this project please follow the contribution guide .