Skip to content

Commit a80e43c

Browse files
committed
docs(mssql-python): Note python >= 3.10 and login_attempts option.
- Revised duplicated headings. - Added relevant links and useful context for `odbc_properties`. Signed-off-by: walanguzzi <walanguzzi@outlook.com>
1 parent 09a5ef6 commit a80e43c

3 files changed

Lines changed: 82 additions & 58 deletions

File tree

docs/integrations/engines/azuresql.md

Lines changed: 25 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,36 @@ Set `driver: "pyodbc"` in your connection options.
1919

2020
#### Python Driver (Official Microsoft driver for Azure SQL):
2121
See [`mssql-python`](https://pypi.org/project/mssql-python/) for more information.
22+
2223
```
2324
pip install "sqlmesh[azuresql-mssql-python]"
2425
```
2526

26-
Set `driver: "mssql-python"` in your connection options.
27+
Set `driver: "mssql-python"` in your connection options. This driver supports
28+
[Entra ID auth](https://github.com/microsoft/mssql-python/wiki/Microsoft-Entra-ID-support),
29+
for detailed connection options see [this link](https://github.com/microsoft/mssql-python/wiki/Connection-to-SQL-Database).
30+
31+
!!! note
32+
The `mssql-python` driver [requires](https://pypi.org/project/mssql-python/) `python >= 3.10`.
2733

2834

2935
### Connection options
3036

31-
| Option | Description | Type | Required |
32-
| ----------------- | ---------------------------------------------------------------- | :----------: | :------: |
33-
| `type` | Engine type name - must be `azuresql` | string | Y |
34-
| `host` | The hostname of the Azure SQL server | string | Y |
35-
| `user` | The username / client ID to use for authentication with the Azure SQL server | string | N |
36-
| `password` | The password / client secret to use for authentication with the Azure SQL server | string | N |
37-
| `port` | The port number of the Azure SQL server | int | N |
38-
| `database` | The target database | string | N |
39-
| `charset` | The character set used for the connection | string | N |
40-
| `timeout` | The query timeout in seconds. Default: no timeout | int | N |
41-
| `login_timeout` | The timeout for connection and login in seconds. Default: 60 | int | N |
42-
| `appname` | The application name to use for the connection | string | N |
43-
| `conn_properties` | The list of connection properties | list[string] | N |
44-
| `autocommit` | Is autocommit mode enabled. Default: false | bool | N |
45-
| `driver` | The driver to use for the connection. Default: pymssql | string | N |
46-
| `driver_name` | The driver name to use for the connection. E.g., *ODBC Driver 18 for SQL Server* | string | N |
47-
| `odbc_properties` | The dict of ODBC connection properties. E.g., authentication: ActiveDirectoryServicePrincipal. See more [here](https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16). | dict | N |
37+
| Option | Description | Type | Required |
38+
| ----------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :----------: | :------: |
39+
| `type` | Engine type name - must be `azuresql` | string | Y |
40+
| `host` | The hostname of the Azure SQL server | string | Y |
41+
| `user` | The username / client ID to use for authentication with the Azure SQL server | string | N |
42+
| `password` | The password / client secret to use for authentication with the Azure SQL server | string | N |
43+
| `port` | The port number of the Azure SQL server | int | N |
44+
| `database` | The target database | string | N |
45+
| `charset` | The character set used for the connection | string | N |
46+
| `timeout` | The query timeout in seconds. Default: no timeout | int | N |
47+
| `login_timeout` | The timeout for connection and login in seconds. Default: 60 | int | N |
48+
| `login_attempts` | The number of reconnection attempts before failing. Default: 1 <br><br>*This option only applies to the `mssql-python` driver. | int | N |
49+
| `appname` | The application name to use for the connection | string | N |
50+
| `conn_properties` | The list of connection properties | list[string] | N |
51+
| `autocommit` | Is autocommit mode enabled. Default: false | bool | N |
52+
| `driver` | The driver to use for the connection. Default: pymssql | string | N |
53+
| `driver_name` | The driver name to use for the connection (e.g., *ODBC Driver 18 for SQL Server*). | string | N |
54+
| `odbc_properties` | The dict of ODBC connection properties (e.g., *authentication: ActiveDirectoryServicePrincipal*). See more [here](https://learn.microsoft.com/en-us/sql/connect/odbc/dsn-connection-string-attribute?view=sql-server-ver16).<br><br>*For the `mssql-python` driver, please see [this link](https://github.com/microsoft/mssql-python/wiki/Connection-to-SQL-Database). | dict | N |

0 commit comments

Comments
 (0)