Skip to content

Commit

Permalink
docs: clarify URL encoding requirement for connection strings
Browse files Browse the repository at this point in the history
Adding extra information for the better understanding of connection string which is used for the backend of Superset. Based on this [Issue](#29979) People are finding difficulties in understanding the connection string, The `SQLAlchemy` documentation clearly talks about this URL encoded connection string, but users of superset not required to read / understand the concept of `SQLAlchemy` so adding this extra information may help them.
  • Loading branch information
kalai-logicsoft authored Aug 29, 2024
1 parent 07985e2 commit d4b6b25
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/docs/configuration/databases.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1287,6 +1287,13 @@ The connection string for SQL Server looks like this:
mssql+pyodbc:///?odbc_connect=Driver%3D%7BODBC+Driver+17+for+SQL+Server%7D%3BServer%3Dtcp%3A%3Cmy_server%3E%2C1433%3BDatabase%3Dmy_database%3BUid%3Dmy_user_name%3BPwd%3Dmy_password%3BEncrypt%3Dyes%3BConnection+Timeout%3D30
```

:::note
You'all might have noticed that some special form of charecters are used in above connection string. For example see the `odbc_connect` parameter, the value is `Driver%3D%7BODBC+Driver+17+for+SQL+Server%7D%3B` which is URL encoded form of `Driver={ODBC+Driver+17+for+SQL+Server};`. It's important to give the connection string as URL encoded format.

For more information about this check the [sqlalchemy documentation](https://docs.sqlalchemy.org/en/20/core/engines.html#escaping-special-characters-such-as-signs-in-passwords). Which says `When constructing a fully formed URL string to pass to create_engine(), special characters such as those that may be used in the user and password need to be URL encoded to be parsed correctly.. This includes the @ sign.`
:::


#### StarRocks

The [sqlalchemy-starrocks](https://pypi.org/project/starrocks/) library is the recommended
Expand Down

0 comments on commit d4b6b25

Please sign in to comment.