Integrate Power Query with Astra DB Serverless

query_builder 30 min

Microsoft Power Query is a data preparation and transformation ETL engine that connects to various data sources.

Power Query uses Connectors to connect data sources. To connect Power Query to Astra DB, you use an ODBC connector paired with the DataStax ODBC driver for Apache Cassandra®.

This guide explains how to configure the ODBC connector for Astra DB in Power BI Desktop. You might need to modify these instructions for other platforms, such as Power Query Desktop or command line tools.

Prerequisites

ODBC custom connector

Create and configure an ODBC connector to your Astra DB database, and then connect to it from Power Query.

  1. Download the DataStax ODBC driver for Cassandra. This example uses the Windows 64-bit version.

  2. Run the ODBC driver executable and follow the installation instructions.

  3. Open the ODBC Data Source Administrator application.

  4. On the System DSN tab, select the DataStax ODBC Driver for Apache Cassandra, and then click Configure. If the driver isn’t listed, click Add, and then select the driver.

  5. Enter the following connection parameters:

    • Authentication Mechanism: Enter Cloud secure connect bundle.

    • User Name: Enter token. This must be the exact, all-lowercase word token.

    • Password: Your application token, which is prefixed by AstraCS:.

    • Connection Bundle: The path to your database’s secure connect bundle.

    • Default keyspace: The namespace in your database that you want to connect to, such as default_keyspace.

  6. Click Test. A valid configuration returns a Test completed successfully message.

  7. Click OK to close the configuration window.

Next, use the custom connector in Power BI.

Enable ODBC custom connector in Power BI

  1. In Power BI Desktop, create a new report.

  2. Select Get Data from Another Source.

  3. In the connectors list, select ODBC, and then click Connect.

  4. Make sure the datasource name is the same datasource that you configured in the ODBC Data Source Administrator application, and then click OK.

    Now you can load your database’s tables in the Power Query Navigator.

  5. To load data into Power BI, select a table, and then click Load.

  6. To publish your data to Power BI, in the Power BI Desktop menu, select Publish, and then create a .pbix report.

  7. Select the workspace where you want to publish the report, and then click Select.

Verify the connection

Confirm that the Power BI Service can read changes from Astra DB Serverless.

Power BI now uses the term Semantic Model to refer to the dataset that is published to the cloud workspace.

  1. In your Power BI workspace, find your dataset, and then click refresh Refresh.

    The first refresh always fails because there are no gateway credentials.

  2. In your dataset, click Schedule Refresh.

  3. Click Data Source Credentials, click Edit Credentials, and then and enter your credentials:

  4. Click Sign in.

  5. In your Power BI workspace, find your dataset, and then refresh Refresh again.

The dataset now pulls the latest data from Astra DB Serverless.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2024 DataStax | Privacy policy | Terms of use

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com