datacube.index.abstract.AbstractProductResource.can_update#

abstract AbstractProductResource.can_update(product, allow_unsafe_updates=False, allow_table_lock=False)[source]#

Check if product can be updated. Return bool,safe_changes,unsafe_changes

(An unsafe change is anything that may potentially make the product incompatible with existing datasets of that type)

Parameters
  • product (Product) – product to update

  • allow_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

Tuple[bool, Iterable[Tuple[Tuple[Union[str, int], ...], Union[MissingSentinel, str, int, None, Sequence[Any], Mapping[str, Any]], Union[MissingSentinel, str, int, None, Sequence[Any], Mapping[str, Any]]]], Iterable[Tuple[Tuple[Union[str, int], ...], Union[MissingSentinel, str, int, None, Sequence[Any], Mapping[str, Any]], Union[MissingSentinel, str, int, None, Sequence[Any], Mapping[str, Any]]]]]

Returns

Tuple of: boolean (can/can’t update); safe changes; unsafe changes