pyapacheatlas.core.client.PurviewClient.classify_entity#

PurviewClient.classify_entity(guid, classifications, force_update=False)#

Given a single entity, you want to apply many classifications. This call will fail if any one of the classifications exist on the entity already, unless you choose force_update=True.

force_update will query the existing entity and sort the classifications into NEW (post) and UPDATE (put) and do two requests to add and update.

force_update is not transactional, it performs adds first. If the add succeeds, it moves on to the updates. If the update fails, the adds will continue to exist on the Atlas server and will not be rolledback.

An error can occur if, for example, the classification has some required attribute that you do not provide.

Parameters
  • guid (str) – The guid you want to classify.

  • classifications – The list of AtlasClassification object you want to apply to the entities.

  • force_update (bool) – Mark as True if any of your classifications may already exist on the given entity.

Returns

A message indicating success and which classifications were ‘updates’ vs ‘adds’ for the given guid.

Return type

dict(str, str)