def make_cnx_string(location, database):
    """
    Make a connection string for sqlalchemy for either sql or sqlite.

    Args
    ------
    location : str
    database : str, either 'sql' or 'sqlite'

    Returns
    ------
    location : str, amended location string for sqlalchemy

    """
    if database not in ['sql', 'sqlite']:
        raise Exception('database must be "sql" or "sqlite"')
    if database == 'sqlite':
        if 'sqlite:///' not in location:
            location = 'sqlite:///' + location
    if database == 'sql':
        if 'mysql+mysqlconnector://' not in location:
            location = 'mysql+mysqlconnector://' + location
    return location
