def map_fields(raw: str, field_map):
    """Map raw field values to column name and perform type cast on value"""
    fields = raw.split(',')
    return {key: field_map[key](fields[i]) for i, key in enumerate(field_map.keys())}