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

# Querybook

> Querybook supports querying and visualizing both internal data and external data in the database.

Querybook supports querying and visualizing both internal data and external data in the database.

## Prerequisites

Make sure that you have finished the following preparations:

1. Clone and download the Querybook repository.

   ```SQL theme={null}
   git clone git@github.com:pinterest/querybook.git
   cd querybook
   ```

2. Create a file named `local.txt` under the `requirements` folder in the project's root directory.

   ```SQL theme={null}
   touch requirements/local.txt
   ```

3. Add the required packages.

   ```SQL theme={null}
   echo -e "starrocks\nmysqlclient" > requirements/local.txt 
   ```

4. Start the container.

   ```SQL theme={null}
   make
   ```

## Integration

Visit the following URL and add a new query engine:

```Plain theme={null}
https://localhost:10001/admin/query_engine/
```

![Querybook](https://mintcdn.com/mirrorship-docs/PYpCw6ZrekIEuuQL/documents/images/d0a07348fb67719a410c7773.png?fit=max\&auto=format\&n=PYpCw6ZrekIEuuQL\&q=85\&s=7f5a1d3256c48b2cc1562f260265cd34)

Take note of the following points:

* For **Language**, select **the database**.
* For **Executor**, select **sqlalchemy**.
* For **Connection\_string**, enter a URI in the database SQLAlchemy URI format as below:

  ```SQL theme={null}
  starrocks://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>
  ```

  The parameters in the URI are described as follows:

  * `User`: the username that is used to log in to your cluster, for example, `admin`.
  * `Password`: the password that is used to log in to your cluster.
  * `Host`: the FE host IP address of your cluster.
  * `Port`: the FE query port of your cluster, for example, `9030`.
  * `Catalog`: the target catalog in your cluster. Both internal and external catalogs are supported.
  * `Database`: the target database in your cluster. Both internal and external databases are supported.


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