# How to Set up an Azure Data Lake Storage for Integrating with Daton

## Prerequisites

To establish a connection between Azure Data Lake Storage and Daton, the following prerequisites are required:

* Azure ADLS Gen2 account with Administrator permissions and a Daton account.
* An ADLS Gen2 container
* Permission to create an Azure service principal

### Task 1: Create a Storage Account

To create a new Storage Account:

1. Log in to the [Azure portal](https://portal.azure.com/).
2. On the Navigation Pane, click **Storage Accounts.**&#x20;

   <figure><img src="/files/JSFj6fhddj3PuyHQnQl0" alt="" width="188"><figcaption></figcaption></figure>
3. On the redirected page, click **Create.**&#x20;

   <figure><img src="/files/4NdSFjjFKcSBkNDvgmKW" alt=""><figcaption></figcaption></figure>
4. Provide a unique **Storage account name** in the Basics tab. (This name will be used during integration in Daton)&#x20;

   <figure><img src="/files/fdffa3POO8pOskwEKN65" alt=""><figcaption></figcaption></figure>
5. Follow the [Microsoft Azure documentation](https://learn.microsoft.com/en-us/azure/storage/common/storage-account-create?toc=%2Fazure%2Fstorage%2Fblobs%2Ftoc.json\&bc=%2Fazure%2Fstorage%2Fblobs%2Fbreadcrumb%2Ftoc.json\&tabs=azure-portal#create-a-storage-account-1) for detailed information on creating a storage account.

### Task 2: Create an ADLS container

1. Navigate to the storage account you generated in [Task 1](#task-1-create-a-storage-account).
2. Access Containers in the navigation menu and click **Create Container**.&#x20;

   <figure><img src="/files/0a3uLSexJafIazh1XO8H" alt=""><figcaption></figcaption></figure>
3. Within the New Container pane, input a Name for your container. (This name will be used during integration in Daton)&#x20;

   <figure><img src="/files/vWAKC8i4kqJmLC5am1cQ" alt="" width="375"><figcaption></figcaption></figure>
4. Choose an **access level** for the container from the access level drop-down menu and click **Create**.

### Task 3: Register an Application and Add a Service Principal

1. Navigate to Azure Active Directory in the navigation menu.
2. Access **App registrations** and click **New registration**.&#x20;

   <figure><img src="/files/Qf6Fq5QpGwdbU44qUm7V" alt=""><figcaption></figcaption></figure>
3. Provide a **Name** for the application.&#x20;
4. In the Supported Account Types section, choose **Accounts in this organizational directory only**, and then click **Register**.&#x20;

   <figure><img src="/files/c9ZdZyTH8otEVYZpNdl0" alt=""><figcaption></figcaption></figure>
5. Your **Application (client) ID** and **Directory (tenant) ID** will be displayed. Take note of these as you will require them during Daton configuration.&#x20;

   <figure><img src="/files/i0AzjAc87SFlsqjMfwx1" alt=""><figcaption></figcaption></figure>

### Task 4: Create a Client Secret

1. Choose the application you registered in [Task 3](#task-3-register-an-application-and-add-a-service-principal).
2. Navigate to **Certificates & secrets** in the navigation menu, and click **New client secret**.&#x20;

   <figure><img src="/files/hck4Fg4JbGPKVM5BUR0s" alt=""><figcaption></figcaption></figure>
3. Provide a Description for your Client Secret.&#x20;

   <figure><img src="/files/HGU7I5cPrs2kox9cTVHE" alt="" width="375"><figcaption></figcaption></figure>
4. Select an expiry period for the client secret from the **Expires** drop-down menu and click **Add**.
5. Take note of the client secret, as you'll need it for configuring Daton.&#x20;

   <figure><img src="/files/prmZP8qjYWXhFSlayRho" alt=""><figcaption></figcaption></figure>

### Task 5: Assign a Role to the Container

1. Select the Container created in [Task 2](#task-2-create-an-adls-container) and select **Access Control (IAM)**.
2. Click **Add**, then select **Add role assignments**.
3. On the Role tab, choose **Storage Blob Data Contributor** and proceed.
4. Within the Member tab, opt for User, group, or service principal.
5. Click **Select members,** pick the service principal added in [Task 3](#task-3-register-an-application-and-add-a-service-principal), and then click **Select**.
6. Click **Review + Assign**.


---

# 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://daton-sarasanalytics.gitbook.io/daton/integrations/destinations/azure-data-lake-storage/how-to-set-up-an-azure-data-lake-storage-for-integrating-with-daton.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.
