# Azure Synapse

## Supported Capabilities

{% tabs %}
{% tab title="Supported Capabilities" %}
**General**

* **Metadata** — metadata extraction and display of asset information (tables, columns, schemas). Types collected: Schema, Table, Column
* **Profiling** — data profiling on the Profiler tab
* **Preview** — sample data preview
* **Data Quality** — data quality monitoring and observability
* **Configurable Collection** — selective ingestion of schemas/workspaces in Data Source Management
* **External Table** — external tables, enabling queries on data in external storage (e.g., S3, ADLS) without loading it into the database

**Data Quality Monitors**

* Freshness
* Volume
* Field Health
* Custom SQL
* Schema Drift

**Lineage**

* **External Table Lineage** — tracks the relationship between raw files in cloud storage (S3/ADLS) and the virtualized relational schema in your data platform
  {% endtab %}

{% tab title="Not Supported" %}
**General**

* View Table
* Stored Procedure

**Data Quality Monitors**

* Job Failure

**Lineage**

* View Table Lineage
* SQL Query Lineage
* Foreign Key Lineage
* Stored Procedure Lineage
  {% endtab %}
  {% endtabs %}

## Connection Requirements

Connecting to Azure Synapse requires credentials that can be easily found through this guide. These credentials include:

* `username`
* `password`
* `host`
* `database`

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-a156b971ca3df32201e4e1c4ffebf3d24659b672%2Fimage.png?alt=media" alt=""><figcaption><p>Azure Data Lake Storage</p></figcaption></figure>

## Prerequisite

* Ensure the Azure account you logged into has access to Azure Synapse credentials.\\

## Getting the Credentials.

Log into your Azure account that has access to manage Synapse and click on the Synapse workspace of your choice. These are the information that you need to be aware of.

* **Dedicated SQL server URL (1)** or **Serverless SQL endpoint (2)**. Depending on where the database you want to connect with decube resides, we will need to input this information for Host.

These are highlighted and numbered on the relevant image below.

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-01649aefb0b67f165959f267f7e63b2d1756c4a6%2Fsynapse%20credentials.png?alt=media" alt=""><figcaption><p>Retrieve the Dedicated SQL Server URL or Serverless SQL endpoint from this screen.</p></figcaption></figure>

Click on the Synapse workspace of your choice. These are the credentials that we will need from here.

1. Username
2. Password
3. Database name

<figure><img src="https://1779874722-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTw0qpCVzfrIXqS4FEg4T%2Fuploads%2Fgit-blob-6a0794eb30ff437a122e02a66f266d4954a56ef9%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

1. Select the master database on the `Use database` drop-down and create this login, we recommend calling it `decube_login` .

Save this login value and password value, the login will be for the `Username` and `Password` credentials respectively.

```sql
CREATE LOGIN decube_login WITH PASSWORD = 'strong_password_here!';
GO
```

2. Select the database you wish to connect with decube on with the `Connect to` and `Use database` drop-down. Create a user with the mapping for the login. We recommend naming it `decube_user` .

Save the database name as we will need that as the `Database` credential.

```sql
CREATE USER decube_user
FOR LOGIN decube_login;
GO
```

3. (a) If the database is in a serverless SQL built-in pool, run this code.

```sql
ALTER ROLE db_datareader ADD MEMBER decube_user;
GO
```

3. (b) Run this if it's in a dedicated SQL pool

```sql
EXEC sp_addrolemember db_datareader, decube_user;
GO
```

4. Add the credentials below to be able to use Profiler

```sql
GRANT VIEW DATABASE STATE TO decube_user;
GRANT VIEW DEFINITION TO decube_user;
```


---

# 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.decube.io/warehouses/azure-synapse.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.
