Skip to content

Advanced Metadata Editing

In this section, you'll learn advanced options to add metadata to a data volume on MissingLink.

After adding metadata to a data volume using MissingLink CLI, you will be able to see the metadata as part of the query.

Added Metadata

Note

Currently, there are no locks implemented when adding data to data volumes. If multiple people are concurrently adding metadata to the same data volume, make sure that there are no conflicts.

Flags for adding metadata

Run the following command for viewing the flags available for the metadata add command:

ml data metadata add --help
  • files

    The path to the files that should be added.

    ml data metadata add yourDataVolumeID \
        --files pathToYourFiles --data '{"meta": "data"}'
    

    Note

    We will recursively attach metadata to every file that is found in the directory / subdirectories of the path provided.

  • data

    The metadata that should be tagged to the files that are being added. Note that this is a JSON string.

    ml data metadata add yourDataVolumeID \
        --files pathToYourFiles --data '{"meta": "data"}'
    
  • dataPoint

    The specific data point that the metadata should be tagged to.

    ml data metadata add yourDataVolumeID \
        --dataPoint yourDataPointID --data '{"meta": "data"}'
    

    Note

    Data point ID is the name of the file and path that is below the root mapping in the datavolume. For example, if the mapping is ~/data and the file is under ~/data/cats/cat1.jpg then the file id is cats/cat1.jpg.

  • dataFile

    The filepath of a JSON file that includes the list of data points and their respective metadata.

    ml data metadata add yourDataVolumeID --dataFile pathToYourDataFile
    

    Note

    Data file is a JSON file with a specific structure of dataPointID: '{meta data}'

    "ann/00008756_Y772PM50.json": {"entity_ID": "00008756_Y772PM50", "state": "Illinois", "type": "license plate"}

  • property

    The string metadata that should be tagged to the data supplied. The flag accepts two strings: the first is the property name and the second is the property string value.

    ml data metadata add yourDataVolumeID --files pathToYourFiles \
        --property propertyName propertyValue
    
  • propertyInt

    The integer metadata that should be tagged to the data supplied. The flag accepts two strings: the first is the property name and the second is the property integer value.

    ml data metadata add yourDataVolumeID --files pathToYourFiles \
        --propertyInt propertyName propertyValue
    
  • propertyFloat

    The float metadata that should be tagged to the data supplied. The flag accepts two strings: the first is the property name and the second is the property float value.

    ml data metadata add yourDataVolumeID --files pathToYourFiles \
        --propertyFloat propertyName propertyValue
    
  • no_progressbar

    Hides the progress bar during the add process.

  • enable_progressbar (default)

    Shows the progress bar during the add process.

  • update (default)

    Indicates that the metadata supplied should fill in missing details and overwrite conflicting metadata.

    Note

    The update flag only applies to uncommitted data in the staging area of the version control as data already committed into a version is immutable.

  • replace

    Indicates that the original metadata attached should be cleared before the supplied metadata supplied is attached.

    Note

    The replace flag only applies to uncommitted data in the staging area of the version control as data already committed into a version is immutable.