QUICK START
CREATE
Create a group named “group1” (in root group “/”):
Create two groups in one go named “subgroup1” and “subgroup2” (both in group “group1”):
Create three groups in one go named “group2” (in root group “/”), “subgroup1” (in group “group2”), and “subsubgroup1” (in group “group2/subgroup1”):
CREATE GROUP group2/subgroup1/subsubgroup1
Create a dataset named “dataset1” (in root group “/”) of data type double:
Create a dataset named “dataset1” (in group “group1”) of data type int of two dimensions (size 3×2):
Create a chunked (size 2x2x2) dataset named “dataset2” (in group “group1”) of data type short of three dimensions (size 4x6x8):
Create three chunked (with an automatically calculated size) datasets in one go named “dataset1”, “dataset2”, and “dataset3” (all in group “group2”) of data type float of two dimensions (size 100×500), with shuffle and compression (using ZLIB) enabled:
Create an extendible dataset named “dataset1” (in group “group2/subgroup1”) of data type char of two dimensions (size UNLIMITEDx5000) with Fletcher32 checksum error detection enabled:
Create an attribute named “attribute1” (in root group “/”) of data type long long:
Create an attribute named “attribute2” (in root group “/”) of data type unsigned int with an initial value of 1789:
Create two attributes in one go that are both named “attribute1” (one in group “group1” and the other in “group2”) of data type variable-length float of one dimension (size 2):
Create an attribute named “attribute1” (in dataset “dataset1”) of data type variable-length char with an initial value of “Hierarchical Data Format”:
Overview of executing all the above CREATE operations:
|
– group1
| |
| – subgroup1
| |
| – subgroup2
| |
| – dataset1
| |
| – dataset2
| |
| – attribute1
|
– group2
| |
| – subgroup1
| | |
| | – subsubgroup1
| | |
| | – dataset1
| |
| – dataset1
| |
| – dataset2
| |
| – dataset3
| |
| – attribute1
|
– dataset1
| |
| – attribute1
|
– attribute1
|
– attribute2
INSERT
Insert (i.e. write) the value 12.78 into dataset “dataset1” (in root group “/”):
Insert (i.e. write) the values 7 and 8 into the first row, the values 3 and 5 into the second row, and the values 4 and 1 into the third row of dataset “dataset1” (in group “group1”):
Insert (i.e. write) values from a text file named “input.txt” into dataset “dataset2” (in group “group1”):
Insert (i.e. write) values from a binary file named “input.bin” into dataset “dataset1” (in group “group2/subgroup1”):
INSERT INTO group2/subgroup1/dataset1 VALUES FROM BINARY FILE input.bin
Insert (i.e. write) the values 6.72 and 8.98 into the first row, and the values 3.52, 5.35, and 4.11 into the second row of attribute “attribute1” (in group “group1”):
Insert (i.e. write) values from a user-defined variable (previously registered and assigned to number 0) into attribute “attribute1” (in group “group2”):
Insert (i.e. write) the value 1789 (from attribute “attribute2” (in root group “/”)) into attribute “attribute1” (in root group “/”):
SELECT
Select (i.e. read) dataset “dataset1” (in group “group1”) and write its content into a text file named “output.txt” using a DOS-based end-of-line (EOL) terminator:
Select (i.e. read) dataset “dataset1” (in group “group2”) and write its content into a user-defined variable (previously registered and assigned to number 3):
SHOW
Show (i.e. get) the HDF5 file currently in use (i.e. open):
Show (i.e. get) the group currently in use (i.e. open):
Show (i.e. get) all objects existing in the current group (i.e. root group “/”):
attribute2
dataset1
group1
group2
Show (i.e. get) all attributes in the current group (i.e. root group “/”):
attribute2
Check whether object “group1” (in root group “/”) exists:
dataset1
dataset2
subgroup1
subgroup2
dataset2
dataset3
Show (i.e. get) all objects recursively starting from the current group (i.e. root group “/”):
attribute2
dataset1
dataset1/attribute1
group1
group1/attribute1
group1/dataset1
group1/dataset2
group1/subgroup1
group1/subgroup2
group2
group2/attribute1
group2/dataset1
group2/dataset2
group2/dataset3
group2/subgroup1
group2/subgroup1/dataset1
group2/subgroup1/subsubgroup1
Show (i.e. get) all attributes recursively starting from the current group (i.e. root group “/”):
attribute2
dataset1/attribute1
group1/attribute1
group2/attribute1
dataset3
subgroup1/dataset1