6.8.15SET EXTERNAL LINK PREFIX
Syntax
SET EXTERNAL LINK PREFIX {prefix_value | DEFAULT}
Description
Set the prefix54 to prepend to file names stored in HDF5 external links. In other words, before resolving a file name stored in an external link, the prefix prefix_value is prepended to the name. In case the keyword DEFAULT is specified, the prefix used to resolve file names is set to empty (i.e. nothing is prepended).
Parameter(s)
prefix_value – optional string that specifies the prefix to prepend to file names stored in HDF5 external links.
Return
Nothing
Example(s)
# set directory currently in use to "/data"
USE DIRECTORY /data
# create two HDF5 files named "my_file0.h5" and "my_file1.h5" in the directory currently in use (i.e. directory "/data") and in a root directory named "target", respectively
CREATE FILE my_file0.h5, /target/my_file1.h5
# create an HDF5 dataset named "my_dataset" (in file "my_file1.h5" located in root directory "target") of data type float with an initial value of 7.8
CREATE DATASET /target/my_file1.h5 my_dataset AS FLOAT VALUES(7.8)
# use (i.e. open) HDF5 file "my_file0.h5" located in the directory currently in use (i.e. directory "/data")
USE FILE my_file0.h5
# create an HDF5 external link named "my_link" in file "my_file0.h5" to object "my_dataset" in file "my_file1.h5"
CREATE EXTERNAL LINK my_link TO my_file1.h5 my_dataset
# select (i.e. read) data from object "my_link" and populate cursor in use with it (should raise an error since "my_link" is a dangling link due to "my_file1.h5" being located in directory "/target" and not in the directory currently in use)
SELECT FROM my_link
# set external link prefix to "/target"
SET EXTERNAL LINK PREFIX /target
# select (i.e. read) data from object "my_link" and populate cursor in use with it (should return 7.8)
SELECT FROM my_linkNotes
- By default (i.e. upon initialization of the HDFql library), the prefix is set to empty (i.e. nothing is prepended). ↩