datacube.index.abstract.AbstractProductResource.update_document#
- AbstractProductResource.update_document(definition, allow_unsafe_updates=False, allow_table_lock=False)[source]#
Update a metadata type from a document. Unsafe changes will throw a ValueError by default.
Safe updates currently allow new search fields to be added, description to be changed.
- Parameters:
definition (
dict
[str
,None
|bool
|str
|float
|int
|list
[None
|bool
|str
|float
|int
|list
[JsonLike] |dict
[str
, JsonLike]] |dict
[str
,None
|bool
|str
|float
|int
|list
[JsonLike] |dict
[str
, JsonLike]]]) – Updated definitionallow_unsafe_updates (
bool
) – Allow unsafe changes. Use with caution.allow_table_lock (
bool
) –Allow an exclusive lock to be taken on the table while creating the indexes. This will halt other user’s requests until completed.
If false, creation will be slower and cannot be done in a transaction.
- Return type:
- Returns:
Persisted updated Product model