Canner / wren-engine

🤖 The semantic engine for LLMs, bringing semantic context to AI agents. 🔥
https://getwren.ai/oss
Apache License 2.0
129 stars 34 forks source link

fix(mssql): escape special characters for odbc #889

Closed grieve54706 closed 1 week ago

grieve54706 commented 1 week ago

We found the error

'IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found and no default driver specified (0) (SQLDriverConnect)'

Because the password of mssql includes special characters like {R;3G1/8Al2AniRye that start with { or include ;. It should be covered by { and } and replace } with}}.

Reference: https://github.com/mkleehammer/pyodbc/wiki/Connecting-to-databases https://stackoverflow.com/questions/78531086/pyodbc-connection-string-correctly-escaping-password-with-special-characters/78532507#78532507

grieve54706 commented 1 week ago

The connection string test should wait until ibis handles special characters by https://github.com/ibis-project/ibis/pull/10437.

goldmedal commented 1 week ago

The connection string test should wait until ibis handles special characters by ibis-project/ibis#10437.

filed https://github.com/Canner/wren-engine/issues/890 for it