> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Analysis Services

> This page outlines the steps to connect Azure Analysis Services to Connect AI. You can use either Connect AI Virtual SQL Server API or the Connect AI OData endpoint to connect. Note that the performance of Azure Analysis Services is much slower with an OData connection.

## Prerequisites for Connecting via Virtual SQL Server API

Before you connect via Virtual SQL Server API, you must first do the following:

* Create a server in Azure Analysis Services to which you will deploy your data from Connect AI.
* An on-premises data gateway is required when one or more Azure Analysis Services servers in the same region connect to on-premises data sources. To install and configure an on-premises gateway to access data sources, refer to the Microsoft documentation: [Install an On-Premises Gateway](https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-gateway-install?tabs=azure-portal).
* Connect a data source to your Connect AI account. See [Sources](/ja/Sources) for more information.
* Generate a Personal Access Token (PAT) on the [Settings](/ja/Settings#personal-access-tokens) page. Copy this down, as it acts as your password during authentication.

## Connect to Connect AI via Virtual SQL Server API

To establish a connection from Azure Analysis Services to the Connect AI Virtual SQL Server API, follow these steps.

<Note>
  These steps involve creating a tabular model project through Visual Studio and deploying the model to Azure Analysis Services. For further instructions on using Azure Analysis Services, please refer to Microsoft documentation.
</Note>

### Step 1: Prepare Visual Studio

<Steps>
  <Step>
    Open Visual Studio. In the navigation bar, select **Extensions** > **Manage Extensions**.
  </Step>

  <Step>
    In the search bar, enter *Microsoft Analysis Services Projects 2022*. When it appears in the list, click **Download**.
  </Step>

  <Step>
    When the installer file finishes downloading, close Visual Studio and double-click the extension installation file to install it.
  </Step>

  <Step>
    Follow the installation prompts. When the installation finishes, restart Visual Studio.
  </Step>
</Steps>

### Step 2: Create the Data Model Project

<Steps>
  <Step>
    In Visual Studio, create a new project.
  </Step>

  <Step>
    Select **Analysis Services Tabular Project**.
  </Step>

  <Step>
    In **Configure your new project**, enter a name for your project in the **Project name** field.
  </Step>

  <Step>
    Specify a location for the project files and set **Framework** to the latest available value.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_configurenewproject.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=67e5f6716e76250b431201d37e9d7e43" alt="Azure Analysis Configure New Project" width="1014" height="675" data-path="ja/images/azureanalysis_configurenewproject.png" />
    </Frame>
  </Step>

  <Step>
    Click **Create**. The **Tabular model designer** dialog opens.
  </Step>

  <Step>
    Select **Workspace server** and enter the address of your Azure Analysis Services server (for example, `asazure://eastus.azure.windows.net/myAzureServer`).
  </Step>

  <Step>
    Set **Compatibility Level** to **SQL Server 2022 / Azure Analysis Services (1600)**.

    <Note>
      The rest of this guide is written for this compatibility level. If you select a different compatibility level, the steps below may not apply, and you might encounter issues when connecting to your data.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_tmd.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=5194b7179e288715b7311a73ffa293d9" alt="Azure Analysis TMD" width="572" height="500" data-path="ja/images/azureanalysis_tmd.png" />
    </Frame>
  </Step>

  <Step>
    Click **Test Connection** and sign in to your server.
  </Step>

  <Step>
    Click **OK** to create the project. Your Visual Studio window should resemble the following screenshot:

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_start.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=ef0fe36ade40007b8c04450ad194c313" alt="Azure Analysis Start" width="1776" height="875" data-path="ja/images/azureanalysis_start.png" />
    </Frame>
  </Step>
</Steps>

### Step 3: Import Data

<Steps>
  <Step>
    In Visual Studio, in **Tabular model Explorer**, right-click **Data Sources** and select **Import From Data Source**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_import.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=22c5c71636152974ef16376a99ea8993" alt="Azure Analysis Import" width="677" height="723" data-path="ja/images/azureanalysis_import.png" />
    </Frame>
  </Step>

  <Step>
    In **Table Import Wizard**, select **SQL Server database** and click **Connect**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_ssdb.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=c21f30a0c8415c0e32c5ffe83789972b" alt="Azure Analysis SSDB" width="598" height="658" data-path="ja/images/azureanalysis_ssdb.png" />
    </Frame>
  </Step>

  <Step>
    In the **Server** field, enter the Virtual SQL Server endpoint and port separated by a comma: *tds.cdata.com*,*14333*.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_enterdb.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=3df5abe3de6208a8f0098259466ff635" alt="Azure Analysis Enter DB" width="699" height="261" data-path="ja/images/azureanalysis_enterdb.png" />
    </Frame>
  </Step>

  <Step>
    Click **OK**. In the new window, select **Database**.
  </Step>

  <Step>
    Enter the following information:

    * **User name**—Connect AI のユーザー名を入力します。ユーザー名は、Connect AI の画面の右上に表示されています。例：*[test@cdata.co.jp](mailto:test@cdata.co.jp)*
    * **Password**—[Settings](/ja/Settings#personal-access-tokens) ページで生成したPAT を入力します。

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_entercredentials.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=25422dd42b28808e0e8341e5bde0e57e" alt="Azure Analysis Enter Credentials" width="699" height="328" data-path="ja/images/azureanalysis_entercredentials.png" />
    </Frame>
  </Step>

  <Step>
    Click **Connect**. In the **Navigator** window that opens, select your desired data source and click **OK**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_navigator.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=a25971a9900be143bdc13c845540daef" alt="Azure Analysis Navigator" width="879" height="699" data-path="ja/images/azureanalysis_navigator.png" />
    </Frame>
  </Step>

  <Step>
    **Navigator** refreshes and displays the tables in your data source. Select your tables and click **Load**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_tableselect.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=cc17713a3abbcbca40dfb41a1e9ea1d3" alt="Azure Analysis Table Select" width="879" height="699" data-path="ja/images/azureanalysis_tableselect.png" />
    </Frame>
  </Step>
</Steps>

### Step 4: Deploy the Project

<Steps>
  <Step>
    In Visual Studio, select **Solution Explorer**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_solution.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=1dcc8e39fcf2754f1de6724aeb72a469" alt="Azure Analysis Solution" width="525" height="623" data-path="ja/images/azureanalysis_solution.png" />
    </Frame>
  </Step>

  <Step>
    Right-click your project and select **Deploy**.

    * For more information about deploying data, please see [this Microsoft help page](https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-deploy).
    * For more information about on-premises data gateways, please see [this Microsoft help page](https://learn.microsoft.com/en-us/azure/analysis-services/analysis-services-gateway-install?tabs=azure-portal).
  </Step>
</Steps>

Once you deploy your data to Azure Analysis Services, you can use your data to create data models. For more information please see [Azure Analysis Services documentation](https://learn.microsoft.com/en-us/azure/analysis-services/).

## Prerequisites for Connecting via OData Endpoint

If you do not want to use a local gateway with Azure Analysis Services, you can use an OData endpoint to connect to Connect AI. However, the performance is slower than with a Virtual SQL Server connection.

* Connect a data source to your Connect AI account. See [Sources](/ja/Sources) for more information.
* Create a [Workspace](/ja/Workspaces). Later, you will use the **OData Service URL** on that page (*`https://cloud.cdata.com/api/odata/{workspace_name}`*) with the relevant workspace name to establish the connection.
* Generate a Personal Access Token (PAT) on the [Settings](/ja/Settings#personal-access-tokens) page. Copy this down, as it acts as your password during authentication.

## Connect to Connect AI via OData Endpoint

To connect to Connect AI using the OData protocol, follow these steps.

<Steps>
  <Step>
    After creating a project in Azure Analysis Services, right-click the data source option and select **New Data Source**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_newdatasource.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=b3e0764615859dca54bf1fb31661f29f" alt="Azure Analysis New Data Source" width="645" height="552" data-path="ja/images/azureanalysis_newdatasource.png" />
    </Frame>
  </Step>

  <Step>
    Search for *OData Feed*.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_odata_feed.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=aefd32a6e2c258dc6c51108eb3d4de6f" alt="Azure Analysis OData Feed" width="1183" height="526" data-path="ja/images/azureanalysis_odata_feed.png" />
    </Frame>
  </Step>

  <Step>
    In the **OData feed** dialog, enter the following URL: *[https://cloud.cdata.com/api/odata/\{workspace\\\_name}](https://cloud.cdata.com/api/odata/\{workspace\\_name})*. Then click **OK**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_odata_url.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=33490e1e314fe287a9df5494b2b90176" alt="Azure Analysis OData URL" width="992" height="315" data-path="ja/images/azureanalysis_odata_url.png" />
    </Frame>
  </Step>

  <Step>
    Next, enter **Basic** credentials. The **User name** is your Connect AI user name, and the **Password** is the PAT from the prerequisites.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_odata_credentials.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=e7ebefb2802a09b415d85fbdd7d45338" alt="Azure Analysis OData Credentials" width="990" height="406" data-path="ja/images/azureanalysis_odata_credentials.png" />
    </Frame>
  </Step>

  <Step>
    Click **Connect** to test the new connection.
  </Step>

  <Step>
    In the **Navigator**, select the desired table and click **Load**.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_odata_load.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=246b079f20977ee19b2dc498ee441774" alt="Azure Analysis OData Load" width="1158" height="610" data-path="ja/images/azureanalysis_odata_load.png" />
    </Frame>
  </Step>

  <Step>
    You can now view your data in the Navigator.

    <Frame>
      <img src="https://mintcdn.com/cdata/TfqVmUuBCnNRmW2K/ja/images/azureanalysis_odata_navigator.png?fit=max&auto=format&n=TfqVmUuBCnNRmW2K&q=85&s=7787444bdd213563eb9ce3ecadcc80b8" alt="Azure Analysis OData Navigator" width="1029" height="544" data-path="ja/images/azureanalysis_odata_navigator.png" />
    </Frame>
  </Step>
</Steps>
