def __create_types_event_dict()

in google-datacatalog-apache-atlas-connector/src/google/datacatalog_connectors/apache_atlas/scrape/metadata_event_scraper.py [0:0]


    def __create_types_event_dict(cls, entity_events):
        types_event_dict = {}

        for entity_event in entity_events:
            entity = entity_event['entity']
            operation_type = entity_event['operationType']

            # We don't scrape metadata for delete events
            if operation_type != constant.ENTITY_DELETE_EVENT:
                guid = entity['guid']
                type_name = entity['typeName']

                guids = types_event_dict.get(type_name)

                if not guids:
                    guids = []

                guids.append(guid)

                types_event_dict[type_name] = guids

        return types_event_dict