datalad meta-dump

Synopsis

datalad meta-dump [-h] [-d DATASET] [-r] [--version] [DATASET_FILE_PATH_PATTERN]

Description

Dump a dataset’s aggregated metadata for dataset and file metadata

Two types of metadata are supported:

  1. metadata describing a dataset as a whole (dataset-global metadata), and
  2. metadata for files in a dataset (content metadata).

The DATASET_FILE_PATH_PATTERN argument specifies dataset and file patterns that are matched against the dataset and file information in the metadata. There are two format, UUID-based and dataset-tree based. The formats are:

TREE: [“tree:”] [DATASET_PATH] [“@” VERSION-DIGITS] [“:” [LOCAL_PATH]] UUID: “uuid:” UUID-DIGITS [“@” VERSION-DIGITS] [“:” [LOCAL_PATH]]

(The tree-format is the default format and does not require a prefix).

Examples

Dump the metadata of the file “dataset_description.json” in the dataset “simon”. (The queried dataset is determined based on the current working directory):

% datalad meta-dump simon:dataset_description.json

Sometimes it is helpful to get metadata records formatted in a more accessible form, here as pretty-printed JSON:

% datalad -f json_pp meta-dump simon:dataset_description.json

Same query as above, but specify that all datasets should be queried for the given path:

% datalad meta-dump :somedir/subdir/thisfile.dat

Dump any metadata record of any dataset known to the queried dataset:

% datalad meta-dump -r

Dump any metadata record of any dataset known to the queried dataset and output pretty-printed JSON:

% datalad -f json_pp meta-dump -r

Show metadata for all files ending in .json in the root directories of all datasets:

% datalad meta-dump *:*.json -r

Show metadata for all files ending in .json in all datasets by not specifying a dataset at all. This will start dumping at the top-level dataset.:

% datalad meta-dump :*.json -r

Options

DATASET_FILE_PATH_PATTERN

path to query metadata for. Constraints: value must be a string or value must be NONE [Default: ‘’]

-h, –help, –help-np

show this help message. –help-np forcefully disables the use of a pager for displaying the help message

-d DATASET, –dataset DATASET

Dataset for which metadata should be dumped. If no directory name is provided, the current working directory is used.

-r, –recursive

If set, recursively report on any matching metadata based on given paths or reference dataset. Note, setting this option does not cause any recursion into potential sub-datasets on the filesystem. It merely determines what metadata is being reported from the given/discovered reference dataset.

–version

show the module and its version which provides the command

Authors

datalad is developed by The DataLad Team and Contributors <team@datalad.org>.