def __make_tags_for_columns()

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


    def __make_tags_for_columns(self, classifications, entity, tags,
                                enum_types_dict):
        entity_data = entity['data']
        attributes = entity_data['attributes']
        columns = attributes.get('columns')

        if columns:
            for column in columns:
                column_guid = column['guid']
                column_data = column.get('data')
                if column_data:
                    column_attributes = column_data.get('attributes')
                    column_name = column_attributes.get('name')
                    data_type = attr_normalizer.\
                        DataCatalogAttributeNormalizer.\
                        get_column_data_type(
                            column_attributes)

                    # This means this is a valid column.
                    if data_type and column_name:
                        column_classifications = column.get('classifications')
                        if column_classifications:
                            for classification in column_classifications:
                                tags.append(
                                    self.__datacatalog_tag_factory.
                                    make_tag_for_classification(
                                        classification, classifications,
                                        enum_types_dict, column_name))
                        tags.append(
                            self.__datacatalog_tag_factory.
                            make_tag_for_column_ref(column_guid, column_name))