def __create_schema()

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


    def __create_schema(cls, entry, columns):
        entry_columns = []
        if columns:
            for column in columns:
                column_data = column.get('data')
                if column_data:
                    column_attributes = column_data.get('attributes')
                    data_type = attr_normalizer.\
                        DataCatalogAttributeNormalizer.\
                        get_column_data_type(column_attributes)
                    column_name = column_attributes.get('name')
                    column_desc = column_attributes.get('comment')
                    if data_type and column_name:
                        column_name = attr_normalizer.\
                            DataCatalogAttributeNormalizer.format_name(
                                column_name)
                        entry_columns.append(
                            datacatalog.ColumnSchema(column=column_name,
                                                     description=column_desc,
                                                     type=data_type))
        entry.schema.columns.extend(entry_columns)