# Add an Azure SQL connector

## Connector features

You can use the Toucan Azure SQL connector to connect to your Azure SQL cluster with a basic authentication and access `tables` with a SQL query.

With this connection, you can fetch data from your Azure SQL to fill your charts and dashboards.

{% hint style="info" %}
**Changelog**

**April 25**\
\- This connector supports the option Trust server certificate

**October 25**\
\- This data connector is supported for connection and [NativeSQL](https://docs-v3.toucantoco.com/data-management-in-datahub/datasources-in-toucan/managing-connectors/create-a-dataset-from-a-connector/code-mode-and-single-mode) by our new
{% endhint %}

## Configuring an Azure SQL connection

Follow the steps described in [..](https://docs-v3.toucantoco.com/data-management-in-datahub/datasources-in-toucan/managing-connectors/setting-up-a-connector "mention"), choose `AzureSQL` and fill out the form with the following info:

| Field                                          | Format / Type | Description                                                                                                                                                                                                                                                                             | Example                                 |
| ---------------------------------------------- | ------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------- |
| Name (mandatory)                               | String        | Use it to identify your connection                                                                                                                                                                                                                                                      | *MyMsSQLConnection*                     |
| Host (mandatory)                               | String        | The domain name or IP address of your database server                                                                                                                                                                                                                                   | "*db.example.com*" or "*192.168.1.100*" |
| Port (optional)                                | Integer       | The listening port of your database server                                                                                                                                                                                                                                              | *1433*                                  |
| User (mandatory)                               | String        | Your login username                                                                                                                                                                                                                                                                     | *my\_user*                              |
| Password (mandatory)                           | String        | Your login password                                                                                                                                                                                                                                                                     | *my\_password*                          |
| Connect Timeout (optional)                     | Integer       | Connection timeout in seconds                                                                                                                                                                                                                                                           | *30*                                    |
| Trust server certificate (optional)            | Boolean       | Disable server certificate validation, can be used if the certificate used is untrusted. Connexion stays encrypted                                                                                                                                                                      |                                         |
| Retry Policy (optionl)                         | Boolean       | <p><em>Boolean</em> allows to configure a retry policy if the connection is flaky.</p><ul><li>max attempts: maximum number of retries before giving up</li><li>max\_delay: in seconds, above the connection is dropped</li><li>wait\_time: time in seconds between each retry</li></ul> |                                         |
| Slow Queries' Cache Expiration Time (optional) | Integer       | Slow queries' cache expiration time in seconds                                                                                                                                                                                                                                          |                                         |

Click on the `TEST CONNECTION` button then `SAVE` the connection

{% hint style="success" %}
After successfully configuring the connector, you will be able to find it in the Connector section of the DataHub "Datasource" tab
{% endhint %}

## Create a dataset from an Azure SQL connection

To create a dataset from AzureSQL, click on the "create from icon", you will then be able to:

* Select the `Database`
* Add a Query: you can query `tables`, `views`, and even stored procedures using the AZURE SQL.

{% hint style="success" %}
After selecting data from your connector you will be able to create a dataset thanks to [YouPrep](https://docs-v3.toucantoco.com/data-management-in-datahub/datasets-in-toucan/preparing-data/overview-of-youprep-tm) using the selection as "source step".
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-v3.toucantoco.com/data-management-in-datahub/datasources-in-toucan/managing-connectors/setting-up-a-connector/database-and-data-warehouse-connectors/setting-up-an-azure-sql-connector.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
