HDFql Reference Manual v2.6.0

6Language

HDFql is a high-level (declarative) language to manage HDF5 files in a simple and natural way. It was designed to be similar to SQL (wherever possible), so that its learning effort is kept to a minimum while still providing great power and flexibility to the programmer. This chapter describes data types, processing options to further transform result sets, redirecting options to read/write data/result sets from/into disparate input/output sources, and operations (i.e. the language itself) available in HDFql. It also introduces the text formatting conventions used throughout this chapter to describe HDFql operations (Table 6.1), as well as a summary of existing operations (Table 6.2). Before continuing, it is recommended to first read the HDF5 User’s Guide available at https://support.hdfgroup.org/documentation/hdf5/latest/_u_g.html to facilitate understanding of the current chapter.

Convention Description Example
Bold Keyword that must be typed exactly as shownCREATE
Italic Value that the programmer must supplydataset_name
Between brackets ([])Optional keyword/value[DATASET]
Between braces ({})Logical grouping of keywords/values (to ease understanding){[TRUNCATE] BINARY FILE file_name}
Separated with a pipe (|)Set of keywords/values from which one must be chosenGROUP | DATASET | ATTRIBUTE
Asterisk (*)Keyword/value that may be supplied zero or more timesgroup_name [, group_name]*
Plus (+)Keyword/value that must be supplied one or more times{, [chunk_dim]}+

Table 6.1 – HDFql operations text formatting conventions

Operation Description
CREATE DIRECTORYCreate a directory
CREATE FILECreate an HDF5 file
CREATE GROUPCreate an HDF5 group
CREATE DATASETCreate an HDF5 dataset
CREATE ATTRIBUTECreate an HDF5 attribute
CREATE [SOFT | HARD] LINKCreate an HDF5 soft or hard link
CREATE EXTERNAL LINKCreate an HDF5 external link
ALTER DIMENSIONAlter (i.e. change) the dimensions of an existing HDF5 dataset
RENAME DIRECTORYRename (or move) an existing directory
RENAME FILERename (or move) an existing file
RENAMERename (or move) an existing HDF5 group, dataset, attribute, (soft) link, or external link
COPY FILECopy an existing file
COPYCopy an existing HDF5 group, dataset, attribute, (soft) link, or external link
DROP DIRECTORYDrop (i.e. delete) an existing directory
DROP FILEDrop (i.e. delete) an existing file
DROPDrop (i.e. delete) an existing HDF5 group, dataset, attribute, (soft) link, or external link
INSERTInsert (i.e. write) data into an HDF5 dataset or attribute
SELECTSelect (i.e. read) data from an HDF5 dataset or attribute
SHOW FILE VALIDITYShow (i.e. get) the validity of a file (i.e. whether it is a valid HDF5 file or not)
SHOW USE DIRECTORYShow (i.e. get) the working directory currently in use
SHOW USE FILEShow (i.e. get) the HDF5 file currently in use or check if a certain HDF5 file is used (i.e. opened)
SHOW ALL USE FILEShow (i.e. get) all HDF5 files in use (i.e. open)
SHOW USE GROUPShow (i.e. get) the HDF5 group currently in use
SHOWShow (i.e. get) HDF5 objects (i.e. groups, datasets, attributes, (soft) links, and external links) or check for the existence of an object
SHOW TYPEShow (i.e. get) the type of an HDF5 object (i.e. group, dataset, or attribute)
SHOW DATA TYPEShow (i.e. get) the data type of an HDF5 dataset or attribute or of its members
SHOW MEMBERShow (i.e. get) the members of an HDF5 dataset or attribute
SHOW MASKShow (i.e. get) the (filter) mask of an HDF5 dataset
SHOW ENDIANNESSShow (i.e. get) the endianness of an HDF5 dataset or attribute or of its members
SHOW CHARSETShow (i.e. get) the charset of an HDF5 dataset or attribute or of its members
SHOW STORAGE TYPEShow (i.e. get) the storage type (layout) of an HDF5 dataset
SHOW STORAGE ALLOCATIONShow (i.e. get) the storage allocation of an HDF5 dataset
SHOW STORAGE DIMENSIONShow (i.e. get) the storage dimensions of an HDF5 dataset
SHOW DIMENSIONShow (i.e. get) the dimensions of an HDF5 dataset or attribute
SHOW ORDERShow (i.e. get) the (creation) order strategy of an HDF5 group or dataset
SHOW PADShow (i.e. get) the padding of an HDF5 dataset or attribute or of its members
SHOW TAGShow (i.e. get) the tag of an HDF5 dataset or attribute or of its members
SHOW OFFSETShow (i.e. get) the member offsets of an HDF5 dataset or attribute
SHOW FILL TYPEShow (i.e. get) the fill type of an HDF5 dataset
SHOW FILLShow (i.e. get) the fill values of an HDF5 dataset
SHOW FILE SIZEShow (i.e. get) the size (in bytes) of a file or of the HDF5 file currently in use
SHOW USERBLOCK SIZEShow (i.e. get) the size (in bytes) of a user-defined block of data stored within an HDF5 file or within the HDF5 file currently in use
SHOW USERBLOCKShow (i.e. get) the user-defined block of data stored within an HDF5 file or within the HDF5 file currently in use
SHOW ALIGNMENTShow (i.e. get) the alignment parameter values for accessing HDF5 files
SHOW SIZEShow (i.e. get) the size (in bytes) of an HDF5 dataset or attribute
SHOW HDFQL VERSIONShow (i.e. get) the version of the HDFql library
SHOW HDF5 VERSIONShow (i.e. get) the version of the HDF5 library used by HDFql
SHOW MPI VERSIONShow (i.e. get) the version of the MPI library used by HDFql
SHOW DIRECTORYShow (i.e. get) the directories within a directory or check for the existence of a directory
SHOW FILEShow (i.e. get) the files within a directory or check for the existence of a file
SHOW EXECUTE STATUSShow (i.e. get) the status of the last executed operation
SHOW LIBRARY BOUNDSShow (i.e. get) the library bound values for creating or opening HDF5 files
SHOW CACHEShow (i.e. get) the cache parameter values for accessing HDF5 files or datasets
SHOW ATOMICShow (i.e. get) the atomicity for accessing HDF5 files in an MPI environment
SHOW MPI SIZEShow (i.e.get) the number (i.e. size) of processes associated with the default MPI communicator (MPI_COMM_WORLD) or with a user-defined MPI communicator
SHOW MPI RANKShow (i.e. get) the rank of the calling process associated with the default MPI communicator (MPI_COMM_WORLD) or with a user-defined MPI communicator
SHOW MPI ROOTShow (i.e. get) the MPI root process rank (for gathering processed (HDF5) data by other MPI processes)
SHOW MPI HINTShow (i.e. get) MPI hints for accessing HDF5 files in an MPI environment
SHOW EXTERNAL LINK PREFIXShow (i.e. get) the prefix to prepend to file names stored in HDF5 external links
SHOW FLUSHShow (i.e. get) the status of automatic flushing
SHOW THREADShow (i.e. get) the number of (CPU) threads to use when executing operations that support parallelism
SHOW PLUGIN PATHShow (i.e. get) the path where plugins (in the form of shared libraries) are searched for and dynamically loaded by HDFql/HDF5 library
SHOW DECIMAL SCALEShow (i.e. get) the decimal scale (i.e. number of decimal places) to use when writing fractional numbers into a text or Excel file
SHOW DEBUGShow (i.e. get) the status of the debug mechanism
USE DIRECTORYUse (i.e. open) a directory for subsequent operations
USE FILEUse (i.e. open) an HDF5 file for subsequent operations
USE GROUPUse (i.e. open) an HDF5 group for subsequent operations
FLUSHFlush the entire virtual HDF5 file (global) or the specific HDF5 file (local) currently in use
CLOSE FILEClose the HDF5 file currently in use or a certain HDF5 file in use (i.e. opened)
CLOSE ALL FILEClose all HDF5 files in use (i.e. opened)
CLOSE GROUPClose the HDF5 group currently in use (i.e. opened)
SET USERBLOCKSet (i.e. write) a user-defined block of data stored within an HDF5 file or within the HDF5 file currently in use
SET ALIGNMENTSet the alignment for accessing HDF5 files
SET LIBRARY BOUNDSSet the library bound values for creating and opening HDF5 files
SET CACHESet the cache parameter values for accessing HDF5 files or datasets
SET ATOMICSet the atomicity for accessing HDF5 files in an MPI environment to enabled or disabled
SET MPI ROOTSet the MPI root process rank for gathering processed (HDF5) data by other MPI processes
SET MPI HINTSet MPI hints for accessing HDF5 files in an MPI environment
SET EXTERNAL LINK PREFIXSet the prefix to prepend to file names stored in HDF5 external links
SET FLUSHSet the automatic flushing of the entire virtual HDF5 file (global) or only the HDF5 file (local) currently in use to enabled or disabled
SET THREADSet the number of (CPU) threads to use when executing operations that support parallelism
SET PLUGIN PATHSet the path where plugins (in the form of shared libraries) are searched for and dynamically loaded by HDFql/HDF5 library
SET DECIMAL SCALESet the decimal scale (i.e. number of decimal places) to use when writing fractional numbers into a text or Excel file
SET DEBUGSet the debug mechanism to enabled or disabled

Table 6.2 – HDFql operations