If your user account has the Read, Write, or Own permission level on a data file in DME, the following command allows you to retrieve all metadata associated with that data file:
dm_get_dataobject [optional parameters] <dataobject-path>
The following table describes each parameter:
Parameter | Description |
---|---|
[-h] | If you want to print a usage (help) message for this command, specify this option. |
[-D <REST-response>] | An optional parameter, specifying a path and filename in your file system. The system always creates a response file:
|
[-o <metadata-file>] | An optional parameter, specifying a path and filename in your file system. The system always creates a metadata file:
The metadata includes information about the data file, a list of attribute values for the file, and a list of attribute values for the parent collection. |
<dataobject-path> | The path to the data file in DME. |
For example, the following command allows you to view the metadata associated with the sample.txt data file:
dm_get_dataobject /Example_Archive/PI_Lab1/Project_Orig/sample.txt
The basic format of the command output is as follows:
{ "dataObjects": [ { "dataObject": {...}, "metadataEntries": { "parentMetadataEntries": [...], "selfMetadataEntries": [...] } } ] }
In this format, the "dataObject" and "selfMetadataEntries" elements provide information about the file you specified, while the "parentMetadataEntries" element provides information about the collection that contains the file you specified.
For instructions on performing a similar task in the GUI, refer to Viewing Metadata via the GUI.