# \[Data Connector 1.0] Microsoft Power BI

With the DataCamp Data Connector 1.0 it's easy to get started analyzing your data in Microsoft Power BI. All you need to do is set up a connection using the PowerBI Athena Connector and configure it using the credentials you can retrieve via the DataCamp Group hub.

{% hint style="info" %}
This guide assumes you are using Power BI desktop on Windows
{% endhint %}

Complete these two steps to view your learning data in Power BI.

1. Set up an ODBC Data Source
2. Configuring the connection in Power BI

## Set up an OCBC Data Source

First, you'll need to install the necessary drivers and configure a Data Source in windows.

### Step 1: Download and install the ODBC driver

Go to <https://docs.aws.amazon.com/athena/latest/ug/connect-with-odbc.html> and download & install the v1 driver for your operating system\
(Make sure you remember which version (32 or 64 bit) you chose!)

### Step 2: Configure your ODBC Data Source

{% hint style="info" %}
Make sure you have collected your credentials as described on the [Your Credentials](https://enterprise-docs.datacamp.com/data-connector-1.0-documentation/data-connector-1.0-getting-started/data-connector-1.0-your-credentials) page.
{% endhint %}

1. Open the "ODBC Data Sources" application on your windows machine (chose the version that aligns with the driver you installed! Either 32 or 64 bit)
2. Select the "Drivers" tab and verify there is a "Simba Athena ODBC Driver" entry in the list, if there isn't you haven't installed the driver properly.
3. Select the "System DNS" tab
4. Click the "Add" button
5. Select "Simba Athena ODBC driver" as Data Source
6. The "Simba Athena ODBC Driver DNS Setup" dialog will now open.\
   Enter the following data on the "Simba Setup" dialog:
   1. Data Source Name: Free to choose (eg: DataCamp Data Connector)\
      \&#xNAN;*Choose an easy name here, you'll need this to set up your connection in Power BI*
   2. Description: optional, you can leave it blank
   3. AWS Region: the **Region** from your credentials
   4. Catalog: AwsDataCatalog
   5. Schema: default
   6. Workgroup: primary
   7. Metadata Retrieval Method: Auto
   8. S3 Output location: `s3://{bucketname}/tmp-powerbi` → *replace* `{bucketname}` *with the **S3 Bucket Name** from your credentials*
   9. Encryption Options: NOT\_SET
   10. Endpoint Override: empty
   11. Streaming Endpoint Override: empty
7. Click "Authentication Options" (don't close the dialog yet!)
   1. Authentication Type: IAM Credentials
   2. Username: the **Access Key** from your credentials
   3. Password: the **Secret Password** from your credentials
   4. Click the "OK" button
8. Click "Test"
9. If everything is configured properly, this should result in a "SUCCESS" message.
10. Click "OK"

The list of items under the "System DSN" tab should now contain your newly created Data Source.

You can close the ODBC application now and start Power BI.

🎉 Your Data Source is successfully set up! On to the next part.

## Set up the Power BI Athena Connector

{% hint style="warning" %}
Make sure you restart Power BI if you had it running before you set up your Data Source.
{% endhint %}

In Power BI Desktop click on the "Get Data" button on the Home ribbon.

The dialog that appears shows you all available Data Sources, use the search field to find the "Amazon Athena" option and click the "connect" button.

<div align="left"><img src="https://562960931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJKV1xpCBb6myYGAGdfV%2Fuploads%2Fe0AcEXju7UKS7TP9gtKV%2F1-get-data.png?alt=media&#x26;token=50d5b48b-1808-4f8d-8d2d-6acbea8ce421" alt=""></div>

In the "Amazon Athena" dialog that appears enter the name of the ODBC connection, you created before. (Our example uses "DataCamp Data Connector")

<div align="left"><img src="https://562960931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJKV1xpCBb6myYGAGdfV%2Fuploads%2FMWTWeFqpm4N4QmuqJxkC%2F2-athena-connector.png?alt=media&#x26;token=48d2aed6-1e02-4ed3-be38-ec75bc2b0bb9" alt=""></div>

Choose which Connectivity mode you want to use:

* **Import** loads the data into your local instance of Power BI, meaning you'll have a snapshot of the data locally. This is the most performant option.
* **DirectQuery** will query the live service meaning you'll have the most up-to-date data every day without the need to import it again. This is the slower option.

Click the "OK" button.

Power BI now will ask you how to Authenticate\
Choose "Use Data Source Configuration" here and click "Connect"

<div align="left"><img src="https://562960931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJKV1xpCBb6myYGAGdfV%2Fuploads%2Frvh86nQTfZRsy3iBATK9%2Fimage.png?alt=media&#x26;token=5ff6537a-33f1-40bb-bf5d-8ef465c76326" alt=""></div>

After a few moments, the Navigator panel will appear, showing your catalog, databases, and tables. Open the "AwsDataCatalog" node, wait for the data to load, and then open the data\_connector node. This will show you all the tables available in our Data Connector.

{% hint style="info" %}
Want to know what data all the tables contain? Learn more by exploring our Data Model in the [Data Model](https://enterprise-docs.datacamp.com/data-connector-1.0-documentation/data-connector-1.0-explore-data-model/data-connector-1.0-data-model) article!
{% endhint %}

Choose the tables you wish to use and click the "Load" button.

![](https://562960931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJKV1xpCBb6myYGAGdfV%2Fuploads%2FlVEeOeH9S9ibtu3Q6bKK%2F3-load-data.png?alt=media\&token=ac9ab7b9-5816-4696-8cba-ecbbc9e89059)

This will take some time to complete, but after it is finished, you now have all the data from the Data Connector 1.0, right at your fingertips in Power BI.

![](https://562960931-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkJKV1xpCBb6myYGAGdfV%2Fuploads%2FiFKIPQ0h00z6JaOkusRv%2F4-use-data.png?alt=media\&token=4bcb1e3e-d202-405a-8a3e-d09d84fa5d32)

## Resources

This is a list of official resources related to Power BI and Athena

{% embed url="<https://www.microsoft.com/en-us/power-platform/products/power-bi/>" %}
Offical Microsoft Power Bi website
{% endembed %}

{% embed url="<https://docs.aws.amazon.com/athena/latest/ug/connect-with-odbc-and-power-bi.html>" %}
Amazon guide to set up Amazon Athena in Power BI
{% endembed %}

{% embed url="<https://docs.aws.amazon.com/athena/latest/ug/connect-with-odbc.html#connect-with-odbc-driver-documentation>" %}
OBDC setup guide for Windows
{% endembed %}
