QubolePresto

Power BI is a powerful data visualization tool that helps organizations to gain insights from their data. It allows you to connect to various data sources, including QubolePresto, a distributed SQL query engine designed to perform interactive ad-hoc queries on large datasets. In this article, we will explore how to connect to the QubolePresto data source from inside Power BI using Power Query M Language code.

Prerequisites

QubolePresto

Before we proceed, make sure that you have the following prerequisites:

– A Qubole account

– Access to the QubolePresto data source

– Power BI Desktop installed on your computer

Step 1: Get the Qubole API Token

QubolePresto

To connect to the QubolePresto data source, we first need to get the Qubole API token. Here are the steps to get the token:

1. Log in to your Qubole account.

2. Click on the “Profile” icon at the top right corner of the screen.

3. Select “Account Settings” from the drop-down menu.

4. Click on the “API Token” tab.

5. Click on the “Generate New Token” button.

6. Give a name to the token and select the required scopes.

7. Click on the “Create Token” button.

8. Note down the token value.

Step 2: Create a Connection String

Next, we need to create a connection string that contains the necessary information to connect to the QubolePresto data source. Here is the Power Query M Language code to create the connection string:


let

token = ““,

endpoint = “QubolePresto endpoint>”,

catalog = “QubolePresto catalog>”,

schema = “QubolePresto schema>”,

connectionString = “DRIVER={Presto};Server=” & endpoint & “;Catalog=” & catalog & “;Schema=” & schema & “;UID=;AuthMech=4;SSL=1;KrbRealm=;KrbHostFQDN=”

in

connectionString


Replace the placeholders with your Qubole API token, QubolePresto endpoint, catalog, and schema.

Step 3: Connect to the QubolePresto Data Source

Now, let’s use the connection string to connect to the QubolePresto data source using Power Query M Language code. Here is the code:


let

connectionString = ““,

source = Odbc.DataSource(connectionString, [HierarchicalNavigation=true, Implementation=”2.0″]),

db = MySQL.Database(source, “QubolePresto database>”)

in

db


Replace the placeholder with your connection string and QubolePresto database name.

Step 4: Load Data into Power BI

Finally, we can load data from QubolePresto into Power BI. Here are the steps:

1. Click on the “Home” tab in Power BI Desktop.

2. Click on the “Get Data” button.

3. Select “Blank Query” from the drop-down menu.

4. Click on the “Advanced Editor” button.

5. Replace the existing Power Query M Language code with the code we created in Step 3.

6. Click on the “Done” button.

7. Click on the “Close & Apply” button.

Now, you can use the loaded data to create visualizations and gain insights from your data.

Conclusion

In this article, we have learned how to connect to the QubolePresto data source from inside Power BI using Power Query M Language code. By following these steps, you can easily connect to the QubolePresto data source and load data into Power BI for analysis and visualization.

Power BI Training Courses by G Com Solutions (0800 998 9248)

Contact Us

    Subject

    Your Name (required)

    Company/Organisation

    Email (required)

    Telephone

    Training Course(s)

    Your Message

    Upload Example Document(s) (Zip multiple files)

    Similar Posts