Overwriting a registered dataset type

Hi,
I’m developing a task and I changed task’s dimensions. I got the error that task’s metadata is incosistent with the previous version (–register-dataset-types won’t overwrite it). When I try to delete the metadata dataset type, I get an error that there are datasets using it. Now I’m trying to figure out how to delete those but I cannot even find them.

I should probably use something like this:

butler query-datasets --where DatasetType=mymetadata

But DatasetType cannot be used in the where clause. What is the keyword for dataset types to be used there and where can I find documentation about that? (Curiously, that is not linked from “query-datasets” command doc).

Thank you

Correct. You can’t change it after the fact. You have to delete the relevant datasets (butler prune-datsets) and then delete the dataset type (butler remove-dataset-type).

In fact it’s such an important feature that it’s a command line parameter and not an option:

$ butler query-datasets --help
Usage: butler query-datasets [OPTIONS] REPO [GLOB] ...

  List the datasets in a repository.

  REPO is the URI or path to an existing data repository root or
  configuration file.

  GLOB is one or more glob-style expressions that fully or partially
  identify the dataset type names to be queried.

GLOB above.

Right, I missed the GLOB part. No need for the --where expression… Thanks for the quick help.