HDFql Reference Manual v2.6.0

6.7.14SHOW STORAGE ALLOCATION

Syntax

SHOW STORAGE ALLOCATION [file_name] dataset_name [, [file_name] dataset_name]* [BY NAME]

[post_processing_option]

[output_redirecting_option]

Description

Show (i.e. get) the storage allocation of an HDF5 dataset named dataset_name. Multiple datasets’ storage allocation can be obtained at once by separating their names with a comma (,). If dataset_name was not found or its storage allocation could not be obtained (due to unknown/unexpected reasons), no subsequent datasets are checked, and an error is raised.

Parameter(s)

file_name – optional string that specifies the name of the HDF5 file storing the dataset whose storage allocation is to be obtained. If file_name is specified, the file is opened on the fly, the storage allocation of the dataset is obtained, and the file is subsequently closed. If not specified, the file currently in use is used instead.

dataset_name – mandatory string that specifies the name of the HDF5 dataset whose storage allocation is to be obtained.

post_processing_option – optional option that transforms the result set according to the programmer’s needs, such as ordering or truncating (please refer to the section PROCESSING for additional information).

output_redirecting_option – optional option that specifies the cursor in use, an HDF5 object (i.e. dataset or attribute), a (text, binary, or Excel) file, or memory (i.e. user-defined variable) to write the result set into (please refer to the subsection INTO for additional information). If not specified, the cursor in use is populated with the result set instead (please refer to the chapter CURSOR for additional information).

Return

If the keyword BY NAME is not specified, it returns the storage allocation of an HDF5 dataset as an HDFQL_INT, which can be HDFQL_EARLY, HDFQL_INCREMENTAL, or HDFQL_LATE depending on whether the storage allocation is early, incremental, or late, respectively. Otherwise, if the keyword BY NAME is specified, it returns the storage allocation of a dataset as an HDFQL_VARCHAR, which can be “EARLY”, “INCREMENTAL”, or “LATE”.

Example(s)

# create an HDF5 dataset named "my_dataset0" of data type unsigned int 
CREATE DATASET my_dataset0 AS UNSIGNED INT

# show (i.e. get) storage allocation of dataset "my_dataset0" (should return 4 (i.e. HDFQL_LATE))
SHOW STORAGE ALLOCATION my_dataset0

# create an HDF5 dataset named "my_dataset1" of data type int of two dimensions (size 5x7) 
CREATE CONTIGUOUS DATASET my_dataset1 AS INT(5, 7)

# show (i.e. get) storage allocation of dataset "my_dataset1" (should return 4 (i.e. HDFQL_LATE))
SHOW STORAGE ALLOCATION my_dataset1

# create an HDF5 dataset named "my_dataset2" of data type double of one dimension (size 8) 
CREATE COMPACT DATASET my_dataset2 AS DOUBLE(8)

# show (i.e. get) storage allocation of dataset "my_dataset2" (should return 1 (i.e. HDFQL_EARLY))
SHOW STORAGE ALLOCATION my_dataset2

# create an HDF5 dataset named "my_dataset3" of data type float of three dimensions (size 3x5x20)
CREATE CHUNKED DATASET my_dataset3 AS FLOAT(3, 5, 20)

# show (i.e. get) storage allocation of dataset "my_dataset3" (should return 2 (i.e. HDFQL_INCREMENTAL))
SHOW STORAGE ALLOCATION my_dataset3