def enrich_entity_relationships()

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


    def enrich_entity_relationships(cls, entity_types_dict):
        for _, entity_type_dict in entity_types_dict.items():
            entities = entity_type_dict['entities']

            if entities:
                for _, entity_dict in entities.items():
                    data = entity_dict['data']
                    attributes = data['attributes']

                    if attributes:
                        for key, attribute in attributes.items():
                            if isinstance(attribute, list):
                                for item in attribute:
                                    cls.__enrich_relationship_dict(
                                        item, entity_types_dict)
                            else:
                                cls.__enrich_relationship_dict(
                                    attribute, entity_types_dict)