Skip to content

Update-and-replace metadata script #46

@corviday

Description

@corviday

Many files in modelmeta have incorrect metadata. It is extremely laborious to update them - usually index_metadata detects a "conflict" when a file has updated metadata, so you have to remove it from the database, update it, reindex it, and re-add it to ensembles. It is slow and fussy work.

It would be easy to automate this process with a wrapper script that calls the various other tools.This script should:

  • Accept a database, a a dataset file, and a .yaml.
  • Connect to the database and note which ensembles the file is part of
  • Delete the file from the database
  • run update_metadata on the dataset file using the *.yaml
  • index the file into the database using index_netcdf
  • associate the file to all previously-noted ensembles using associate_ensemble

Alternately, index_netcdf could be updated to handle "conflicts" in a more sophisticated fashion and allow updates to dataset metadata more easily.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions