6.7.19SHOW TAG
Syntax
SHOW TAG [DATASET | ATTRIBUTE] [file_name] object_name
[post_processing_option]
[output_redirecting_option]
Description
Show (i.e. get) the tag of an HDF5 dataset or attribute or of its members named object_name. In case a dataset and an attribute with identical names (object_name) are stored in the same location (i.e. group) and neither the keyword DATASET nor ATTRIBUTE is specified, the tag returned belongs to the dataset. To explicitly get the tag of object_name according to its type, the keyword DATASET or ATTRIBUTE must be specified. If object_name ends with “/” and is of data type HDFQL_COMPOUND, the tags of members of object_name are returned instead.
Parameter(s)
file_name – optional string that specifies the name of the HDF5 file storing the dataset or attribute whose tag is to be obtained. If file_name is specified, the file is opened on the fly, the tag of the dataset or attribute is obtained, and the file is subsequently closed. If not specified, the file currently in use is used instead.
object_name – mandatory string that specifies the name of the HDF5 dataset or attribute whose tag is to be obtained, or the tags of its members if the name ends with “/” and the dataset or attribute is of data type HDFQL_COMPOUND.
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
The tag of an HDF5 dataset or attribute or of its members as an HDFQL_VARCHAR, which can either be a string or NULL depending on whether the dataset or attribute, or its members, is of data type HDFQL_OPAQUE or not, respectively.
Example(s)
# create an HDF5 dataset named "my_dataset0" of data type int
CREATE DATASET my_dataset0 AS INT
# show (i.e. get) tag of dataset "my_dataset0" (should return NULL)
SHOW TAG my_dataset0
# create an HDF5 dataset named "my_dataset1" of data type opaque
CREATE DATASET my_dataset1 AS OPAQUE
# show (i.e. get) tag of dataset "my_dataset1" (should return "")
SHOW TAG my_dataset1
# create an HDF5 dataset named "my_dataset2" of data type opaque of one dimension (size 15) with a tag value "my_tag1"
CREATE DATASET my_dataset2 AS OPAQUE(15) TAG my_tag1
# show (i.e. get) tag of dataset "my_dataset2" (should return "my_tag1")
SHOW TAG my_dataset2
# create an HDF5 attribute named "my_attribute0" of data type opaque of two dimensions (size 3x5) with a tag value "Hierarchical Data Format"
CREATE ATTRIBUTE my_attribute0 AS OPAQUE(3, 5) TAG "Hierarchical Data Format"
# show (i.e. get) tag of attribute "my_attribute0" (should return "Hierarchical Data Format")
SHOW TAG my_attribute0
# create an HDF5 attribute named "my_attribute1" of data type compound composed of three members named "m0" (of data type int), "m1" (of data type opaque), and "m2" (of data type opaque with a tag value "Test")
CREATE ATTRIBUTE my_attribute1 AS COMPOUND(m0 AS INT, m1 AS OPAQUE, m2 AS OPAQUE TAG Test)
# show (i.e. get) tag of attribute "my_attribute1" (should return NULL)
SHOW TAG my_attribute1
# show (i.e. get) tag of members of attribute "my_attribute1" (should return NULL, "", "Test")
SHOW TAG my_attribute1/
# create an HDF5 dataset named "my_common" of data type opaque with a tag value "Dataset tag"
CREATE DATASET my_common AS OPAQUE TAG "Dataset tag"
# create an HDF5 attribute named "my_common" of data type opaque of one dimension (size 10) with a tag value "Attribute tag"
CREATE ATTRIBUTE my_common AS OPAQUE(10) TAG "Attribute tag"
# show (i.e. get) tag of dataset "my_common" (should return "Dataset tag")
SHOW TAG my_common
# show (i.e. get) tag of dataset "my_common" (should return "Dataset tag")
SHOW TAG DATASET my_common
# show (i.e. get) tag of attribute "my_common" (should return "Attribute tag")
SHOW TAG ATTRIBUTE my_common