# Setting up Power BI on-premises Gateway

This setup guide helps you configure Microsoft’s on-premises data gateway to enable Power BI to access data through e6data securely. By following these steps, you can register a gateway, configure data source connections, and support both scheduled refresh and live query modes in Power BI.

### Setup Step 1: Download and Install the Gateway

1. Visit the official Microsoft download page: <https://learn.microsoft.com/en-us/data-integration/gateway/service-gateway-install>
2. Select **Standard Mode** (recommended for enterprise use).
3. Download and run the installer.
4. Follow the on-screen installation instructions.
5. After installation, sign in using your **Power BI (Azure)** credentials.

### Setup Step 2: Register the Gateway

1. Once signed in, choose one of the following options:
   * **Register a new gateway** (for first-time setup)
   * **Migrate, restore, or take over an existing gateway** (if applicable)
2. Provide a unique **Gateway Name**.
3. Set a **Recovery Key** — this will be required if you need to restore the gateway later.

### Setup Step 3: Configure Data Source Connections

1. Go to the Power BI Service: <https://app.powerbi.com>
2. Navigate to **Settings > Manage Connections and Gateways**.

<figure><img src="https://3484040590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeVBYKZm1xFKFFVzS0lRJ%2Fuploads%2FsZrve8QFFmbCcLWXUFsX%2Fimage.png?alt=media&#x26;token=c189c39d-ac0a-41b5-9486-bd8751712117" alt=""><figcaption></figcaption></figure>

3. Under your registered gateway, click **Add Data Source** and configure the following:
   * **Connection Type**: Starburst
   * **Server Name**: \[your Starburst hostname]
   * **Port**: 443
4. Provide authentication details:
   * **Username**: e6data username
   * **Password**: e6data Auth Token

<figure><img src="https://3484040590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeVBYKZm1xFKFFVzS0lRJ%2Fuploads%2FLPmvRuwf6MfQNSxwz0jj%2Fimage.png?alt=media&#x26;token=71c7975d-f2d3-4f4d-960d-65733c141f77" alt=""><figcaption></figcaption></figure>

### Setup Step 4: Enable Data Refresh or Live Query

For **Import Mode Reports**:

* Open your dataset settings in Power BI
* Enable **Scheduled Refresh**
* Set your **refresh frequency** and **time zone**

For **DirectQuery or Live Connection**:

* Make sure the gateway is **always online**
* No scheduling is needed; Power BI will query the data source in real time

### Best Practices

* Install the gateway on a **dedicated server or virtual machine**, not on a personal workstation or laptop
* Ensure **stable network connectivity** and high uptime on the machine hosting the gateway
* **Update the gateway software regularly** to apply performance improvements and security fixes
* Use Power BI’s **gateway monitoring tools** to track availability and refresh success


---

# 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.e6data.com/product-documentation/connectors-and-drivers/power-bi/setting-up-power-bi-on-premises-gateway.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.
