import copy


def geo_to_text(dss_schema):
    """
    Transform the input dss schema `dss_schema` in order to set the `geopoint` storage type column to `string`.

    This function is used when writing geo-data in a hyper file. A temporary table must be created with
    no geopoint column in it.

    :param dss_schema: The schema of a dss dataset
    :example: {"columns": [{"name": "customer_id", "type": "bigint"}, ...]}, ...]}
    >>> dss_schema = {"columns": [{"name": "customer_id", "type": "bigint"}]}
    :return: regular_schema : The schema after the change of type of the `geopoint` type to `string`
    """
    regular_schema = copy.deepcopy(dss_schema)
    for typed_column in regular_schema['columns']:
        name, dss_type = typed_column['name'], typed_column['type']
        if dss_type == 'geopoint':
            typed_column['type'] = 'string'
    return regular_schema