I am using mssql+pyodbc to form a connection string in order to connect to a database. However a credential to our database contains a dollar sign and I believe it throws an error because the error says whatever the string of characters after the dollar sign in the credentials is a missing variable.
password = 'pass$word1234'
drivers = [item for item in pyodbc.drivers() if item.endswith(' for SQL Server')]
if drivers:
driver = drivers[0]
else:
raise Exception("No drivers available")
connection_string = f"mssql+pyodbc://{username}:{password}@{server}/{database}?driver={driver}&charset=utf&autocommit=true"
Hardcoding the password in the string has the same result.
sqlalchemy is installed, and adding a backslash causes an authentication issue.
I have a separate connection in a different project via pyodbc.connect using the same credentials with no backslash that can connect.
Using a different set of credentials without a dollar sign does work.
EDIT: It seems this used to be an issue in the legacy version https://github.com/great-expectations/great_expectations/issues/1927