Skip to content

docs(dwh): add data warehouse powerBI connection info MTA-6169 #5132

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 50 additions & 9 deletions pages/data-warehouse/how-to/connect-bi-tools.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,75 @@ Refer to the official [ClickHouse®](https://clickhouse.com/docs/integrations/me

## PowerBI Desktop

Power BI Desktop is a robust data visualization tool that allows users to create dynamic reports and dashboards from various data sources.
Power BI Desktop is a robust data visualization tool that allows users to create dynamic reports and dashboards from various data sources. To connect to your Data Warehouse for ClickHouse® deployment, PowerBI requires a MySQL connection using a dedicated user with a **plain text password**.

<Message type="note">
ODBC connection between PowerBI and Data Warehouse for ClickHouse® is currently not supported.
</Message>

### Creating a dedicated MySQL user

0. Make sure you installed [PowerBI Desktop]https://www.microsoft.com/en-us/download/details.aspx?id=58494/), and [MySQL Connector/NET](https://dev.mysql.com/downloads/connector/net/).
1. [Connect to your deployment](/data-warehouse/how-to/connect-applications/).

1. Open PowerBI Desktop.
2. Run the SQL query below to create a user with a plain text password. Replace the placeholders with the appropriate values:
```sql
CREATE USER mysql_user IDENTIFIED WITH plaintext_password BY 'mysql_user_password';
```

2. Click **Get Data** from the top ribbon, then select **More...** at the bottom of the drop-down menu. A pop-up displays.
3. Run the SQL query below to grant the user access to the database:

3. Select the **Database** category, select **MySQL database** in the list, then click **Connect**. A connection pop-up displays.
```sql
GRANT SELECT(id) ON my_database.my_table TO mysql_user WITH GRANT OPTION;
```

4. Enter the values below, then click **OK**.
Your user can now access the specified database using the credentials you just defined.

### Connecting PowerBI to your deployment

<Tabs id="power-bi-connection">
<TabsTab label="PowerBI Desktop">
1. Make sure you installed [PowerBI Desktop](https://www.microsoft.com/en-us/download/details.aspx?id=58494/), and [MySQL Connector/NET](https://dev.mysql.com/downloads/connector/net/).

2. Open PowerBI Desktop.

3. Click **Get Data** from the top ribbon, then select **More...** at the bottom of the drop-down menu. A pop-up displays.

4. Select the **Database** category, select **MySQL database** in the list, then click **Connect**. A connection pop-up displays.

5. Enter the values below, then click **OK**.
- **Server**: `<YOUR_DEPLOYMENT_ID>.dtwh.<REGION>.scw.cloud`
- **Database**: the name of the database to import

A credentials pop-up displays.

5. Select **Database** from the left menu, enter the values below, then click **Connect**.
- **User name**: your deployment admin user (`scwadmin` by default)
6. Select **Database** from the left menu, enter the values below, then click **Connect**.
- **User name**: your dedicated MySQL user [previously created](#creating-a-dedicated-mysql-user)
- **Password**: the password you set at deployment creation

The **Navigator** pop-up displays, showing the different schemas and tables contained in your Data Warehouse for ClickHouse® deployment.

6. Select the desired tables, then **Load** to import data, or **Transform Data** to start working with your dataset.
7. Select the desired tables, then **Load** to import data, or **Transform Data** to start working with your dataset.
</TabsTab>
<TabsTab label="PowerBI Service (Online)">

1. Access [PowerBI Service](https://app.powerbi.com).

2. From the PowerBI Service interface, click the **+ New** button from the toolbar. A list of data sources displays.

3. Select **MySQL Database** from the list. A connection wizard displays.

4. Enter the following values.
- **Server**: `<YOUR_DEPLOYMENT_ID>.dtwh.<REGION>.scw.cloud`
- **Database**: the name of the database to import (`default` if you did not create additional databases in your deployment)
- **Connection**: `<YOUR_DEPLOYMENT_ID>.dtwh.<REGION>.scw.cloud`
- **Connection name**: `<YOUR_DEPLOYMENT_ID>.dtwh.<REGION>.scw.cloud`
- Authentication type: `Basic`
- Username: your dedicated MySQL user [previously created](#creating-a-dedicated-mysql-user))
- Password: The plain text password assigned to your MySQL user
- Privacy level: `None`
5. Click **Next**. The **Power Query** interface displays, allowing you to use the `MySQL.Database` function from this interface.
</TabsTab>
</Tabs>

Your Data Warehouse for ClickHouse® is now integrated into your PowerBI platform.

Expand Down