> ## 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.

# Metabase

## Prerequisites

Before you connect Metabase to Connect AI, you must perform the following prerequisites.

In Connect AI:

* Connect a data source to your Connect AI account. See [Sources](https://docs.cloud.cdata.com/ja/Sources.md) for more information.
* Generate a Personal Access Token (PAT) on the [Settings](https://docs.cloud.cdata.com/ja/Settings/Personal-Access-Tokens.md) page. Copy this down, as it acts as your password during authentication.

To use the Open Source version of Metabase with Connect AI, you need to have a Java Runtime Environment installed on your system. Metabase recommends version 11 of JRE. See the [Metabase Documentation](https://www.metabase.com/latest/installation-and-operation/running-the-metabase-jar-file) for details.

## Download and Install the Metabase JAR File

**Step 1**

[Download the Metabase OSS JAR file](https://www.metabase.com/start/oss/jar).

**Step 2**

Create a new directory and move `metabase.jar` to the new directory.

**Step 3**

In the new directory, run the JAR file:

```bash theme={null}
java -jar metabase.jar
```

Metabase logs its progress in the terminal as it starts up. Wait until you see the message `Metabase Initialization Complete` before you start Metabase.

**Step 4**

Visit `http://localhost:3000/setup` to start Metabase and complete your setup.

![Metabase Client Welcome](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_welcome.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=ac4163659f90523657079b844382f9a7)

**Step 5**

Follow the prompts to set up an admin account.

## Connect to Connect AI

Step 4 of the Metabase setup is adding your data. To connect to Connect AI, do the following:

**Step 1**

Click **SQL Server**.

![Metabase Client Add Data](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_add_data.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=59318b4e2c7a178402d24992aff91154)

**Step 2**

Enter the following information:

* **Display name**—the name of your data for display purposes.
* **Host**—*tds.cdata.com*
* **Port**—*14333*
* **Database name**—接続したいConnect AI データソースのConnection Name を入力します。例：*Salesforce1*
* **Database Instance name**—N/A
* **Username**—Connect AI のユーザー名を入力します。ユーザー名は、Connect AI の画面の右上に表示されています。例：*[test@cdata.co.jp](mailto:test@cdata.co.jp)*
* **Password**—[Settings](https://docs.cloud.cdata.com/ja/Settings/Personal-Access-Tokens.md) ページで生成したPAT を入力します。

![Metabase Client Add Data 2](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_add_data_2.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=516697fc63a739ce9629e10178204842)

Leave the rest of the connection settings at their default values unless you need to modify them. You can change the database details later in Metabase Admin.

**Step 3**

Click **Next**.

**Step 4**

Click **Take me to Metabase**.

## Query Your Data

**Step 1**

In the Home screen, click **New** > **SQL Query**.

![Metabase Client SQL Query](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_sql_query.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=ae25fe546cad691205995ae9fb590470)

**Step 2**

Select the database you just added.

![Metabase Client Select Database](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_select_database.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=395ea9b6c7de7416a70964ed232de82b)

**Step 3**

Create a SQL query for the data.

![Metabase Client Query](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_query.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=eb3c41b597364fb0b540afa51af5581a)

**Step 4**

Click **Run query** to retrieve your data.

![Metabase Client Query Results](https://mintcdn.com/cdata/tJfdD354GT5ojxph/ja/images/metabase_client_query_results.png?fit=max\&auto=format\&n=tJfdD354GT5ojxph\&q=85\&s=ddbb282b0d8104d125a0b533194e8d7b)

**Step 5**

Click **Save** to save your query and add it to your collection.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.