pyapacheatlas.core.whatif.WhatIfValidator#

class pyapacheatlas.core.whatif.WhatIfValidator(type_defs={}, existing_entities=[])#

Provides a simple way to validate that your entities will successfully upload. Provides functions to validate the type, check if required attributes are missing, and check if superfluous attributes are included.

Parameters
  • type_defs (dict) – The list of type definitions to be validated against. Should be in the form of an AtlasTypeDef composite wrapper.

  • existing_entities (list(dict)) – The existing entities that should be validated against.

__init__(type_defs={}, existing_entities=[])#

Methods

__init__([type_defs, existing_entities])

entity_has_invalid_attributes(entity)

Check if the entity is using attributes that are not defined on the type.

entity_missing_attributes(entity)

Check if the entity is missing required attributes.

entity_type_exists(entity)

Validate that the entity’s type is an actual entity definition.

entity_would_overwrite(entity)

Based on the qualified name attributes, does the provided entity exist in the entities provided to the What If Validator?

validate_entities(entities)

Provide a report of invalid entities.

Attributes

ASSET_ATTRIBUTES

ATLAS_MODEL

REFERENCABLE_ATTRIBUTES