OPH_METADATA

Description

Type

Metadata Process.

Behaviour

It provides CRUD operations (Create, Read, Update and Delete) on OphidiaDB metadata.

Parameters

  • mode: set the appropriate operation among these:
    • insert: insertion of new metadata
    • read (default): visualization of the values of all requested metadata
    • update: change the value of specified metadata (only 1)
    • delete: remove the values of all specified metadata
  • cube: name of the input datacube. The name must be in PID format.
  • metadata_key: name of the key (or the enumeration of keys) identifying requested metadata. It can be used always but not in update mode, where it is necessary the id of the to-be-updated metadata (retrievable by a previous read). In read or delete mode, default value (“all”) can be used to specify all keys related to the specified container, as well as a group of keys (key1|key2|key3|...). Note that the name of a key can be related to multiple instances or values, so specifying the name of only 1 key can result in multiple rows returned by the operator. If it is necessary to interact with only 1 particular instance, use the parameter metadata_id.
  • variable: name of the variable to which we can associate a new metadata key. Its default value (“global”) can be used to refer to a global metadata.
  • metadata_id: id of the particular metadata instance to interact with. It cannot be used in insert mode. It is mandatory in update mode. It can be used in read or delete mode to specify a particular instance to be read or deleted. In read or delete modes, if specified, it will mute the values of the parameter metadata_key; if not specified, it will be used its default value (0) in order to use metadata_key to select appropriate content.
  • metadata_type: name of the type of the to-be-inserted metadata. To change the type of already-inserted metadata, use a combination of a deletion and an insertion. Default value is “text”, but other values include “image”, “video”,”audio” and “url”, even if all contents will be saved as strings. Numerical data types are also available as well.
  • metadata_value: string value to be assigned to specified metadata. Valid only in insert or update modes. In insert mode, more values can be listed by using “|” as separator. Default value is “null”.
  • variable_filter: optional filter on variable name, valid in read/delete mode only. This filter will be considered only when metadata_id is not specified or equal to its default value (0). This filter is used with the SQL search pattern %filter% in order to select variables containing “filter”. Use “all” (default) to mute this filter.
  • metadata_type_filter: optional filter on the type of returned metadata, valid in read/delete mode only. This filter will be considered only when metadata_id is not specified or equal to its default value (0). This filter is used with the SQL search pattern %filter% in order to select types containing “filter”. Use “all” (default) to mute this filter.
  • metadata_value_filter: optional filter on the value of returned metadata, valid in read/delete mode only. This filter will be considered only when metadata_id is not specified or equal to its default value (0). This filter is used with the SQL search pattern %filter% in order to select values containing “filter”. Use “all” (default) to mute this filter.
  • force: force update or deletion of functional metadata associated to a vocabulary (e.g. time metadata). By default, update or deletion of functional metadata is not allowed (“no”). Set to “yes” to allow modification of functional metadata.

System parameters

  • exec_mode: operator execution mode. Possible values are async (default) for asynchronous mode, sync for synchronous mode with json-compliant output.
  • ncores: number of parallel processes to be used (min. 1). This operator is not parallel, so the only possible value is 1.
  • sessionid: session identifier used server-side to manage sessions and jobs. Usually, users don’t need to use/modify it, except when it is necessary to create a new session or switch to another one.
  • objkey_filter: filter on the output of the operator written to file (default=all => no filter, none => no output, metadata_list => shows metadata list, metadata_summary => shows the number of metadata).

Examples

Insert new metadata in ‘container1’ located into the ‘session1’ folder with ‘key1’, of type ‘text’ and value ‘test_text’:

[OPH_TERM] >>  oph_metadata mode=insert;cube=URL/1/1;metadata_key=key1;metadata_type=text;metadata_value=test_text;

Arguments

Argument name Type Mandatory Values Default Min/Max-value
mode “string” “no” “insert|read|update|delete” “read”  
cube “string” “yes”      
metadata_key “string” “no”   “all”  
variable “string” “no”   “global”  
metadata_id “int” “no”   “0” “0” /
metadata_type “string” “no” “text|image|video|audio|url|double|float|long|int|short” “text”  
metadata_value “string” “no”   “-“  
variable_filter “string” “no”   “all”  
metadata_type_filter “string” “no”   “all”  
metadata_value_filter “string” “no”   “all”  
force “string” “no” “yes|no” “no”  
exec_mode “string” “no” “async|sync” “async”  
sessionid “string” “no”   “null”  
ncores “int” “no”   “1” “1” / “1”
objkey_filter “string” “no” “all|none|metadata_list|metadata_summary” “all”