# Overwriting a registered dataset type

**URL:** <https://www.rubin.community/t/overwriting-a-registered-dataset-type/6331>\
**Category:** Data Management\
**Created:** [February 16, 2022, 8:26pm UTC](https://www.rubin.community/t/overwriting-a-registered-dataset-type/6331 "2022-02-16T20:26:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![petarz](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@petarz](https://www.rubin.community/u/petarz)\
**Post date:** [February 16, 2022, 8:26pm UTC](https://www.rubin.community/t/overwriting-a-registered-dataset-type/6331/1 "2022-02-16T20:26:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![timj](https://sea2.discourse-cdn.com/flex002/user_avatar/www.rubin.community/timj/32/10_2.png) [@timj](https://www.rubin.community/u/timj)\
**Post date:** [February 16, 2022, 8:36pm UTC](https://www.rubin.community/t/overwriting-a-registered-dataset-type/6331/2 "2022-02-16T20:36:59Z")

</div>

> [@petarz](#):
>
> (–register-dataset-types won’t overwrite it)

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`).

> [@petarz](#):
>
> What is the keyword for dataset types to be used

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

```auto
$ 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.

---

<div class="post-metadata">

**Author:** ![petarz](https://avatars.discourse-cdn.com/v4/letter/p/f19dbf/32.png) [@petarz](https://www.rubin.community/u/petarz)\
**Post date:** [February 16, 2022, 9:24pm UTC](https://www.rubin.community/t/overwriting-a-registered-dataset-type/6331/3 "2022-02-16T21:24:38Z")

</div>

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