def fetch_entities()

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


    def fetch_entities(self, guids):
        logging.info('Retreiving all entries from guids: %s', guids)
        entities_dict = {}

        # We chunk the limit because of the request size limit
        for chunked_guids in self.__chunk_list(guids):
            bulk_collection = self.__apache_atlas.entity_bulk(
                guid=chunked_guids)
            for collection in bulk_collection:
                entities = collection.entities()
                for fetched_entity in entities:
                    guid = fetched_entity.guid
                    entity_data = fetched_entity._data
                    logging.debug(entity_data)
                    entities_dict[guid] = {'guid': guid, 'data': entity_data}
        logging.info('Returned: %s entities from Fetch', len(entities_dict))
        return entities_dict