|
2 | 2 |
|
3 | 3 | [Azure SQL](https://azure.microsoft.com/en-us/products/azure-sql) is "a family of managed, secure, and intelligent products that use the SQL Server database engine in the Azure cloud."
|
4 | 4 |
|
5 |
| -The Azure SQL adapter only supports authentication with a username and password. It does not support authentication with Microsoft Entra or Azure Active Directory. |
6 |
| - |
7 | 5 | ## Local/Built-in Scheduler
|
8 | 6 | **Engine Adapter Type**: `azuresql`
|
9 | 7 |
|
10 | 8 | ### Installation
|
| 9 | +#### User / Password Authentication: |
11 | 10 | ```
|
12 | 11 | pip install "sqlmesh[azuresql]"
|
13 | 12 | ```
|
| 13 | +#### Microsoft Entra ID / Azure Active Directory Authentication: |
| 14 | +``` |
| 15 | +pip install "sqlmesh[azuresql-odbc]" |
| 16 | +``` |
14 | 17 |
|
15 | 18 | ### Connection options
|
16 | 19 |
|
17 | 20 | | Option | Description | Type | Required |
|
18 | 21 | | ----------------- | ---------------------------------------------------------------- | :----------: | :------: |
|
19 | 22 | | `type` | Engine type name - must be `azuresql` | string | Y |
|
20 | 23 | | `host` | The hostname of the Azure SQL server | string | Y |
|
21 |
| -| `user` | The username to use for authentication with the Azure SQL server | string | N | |
22 |
| -| `password` | The password to use for authentication with the Azure SQL server | string | N | |
| 24 | +| `user` | The username / client ID to use for authentication with the Azure SQL server | string | N | |
| 25 | +| `password` | The password / client secret to use for authentication with the Azure SQL server | string | N | |
23 | 26 | | `port` | The port number of the Azure SQL server | int | N |
|
24 | 27 | | `database` | The target database | string | N |
|
25 | 28 | | `charset` | The character set used for the connection | string | N |
|
26 | 29 | | `timeout` | The query timeout in seconds. Default: no timeout | int | N |
|
27 | 30 | | `login_timeout` | The timeout for connection and login in seconds. Default: 60 | int | N |
|
28 | 31 | | `appname` | The application name to use for the connection | string | N |
|
29 | 32 | | `conn_properties` | The list of connection properties | list[string] | N |
|
30 |
| -| `autocommit` | Is autocommit mode enabled. Default: false | bool | N | |
| 33 | +| `autocommit` | Is autocommit mode enabled. Default: false | bool | N | |
| 34 | +| `driver` | The driver to use for the connection. Default: pymsql | string | N | |
| 35 | +| `driver_name` | The driver name to use for the connection. E.g., *ODBC Driver 18 for SQL Server* | string | N | |
| 36 | +| `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 | |
0 commit comments