Skip to main content

Welcome to a Grasp lesson

Create a free account to keep studying and create your own study path.

Lesson 57

Connecting BI Tools to Data Warehouses/Lakehouses

This lesson is built with resources from youtube.com, dawiso.com and 1 more site.

Hello! Welcome back to our module on Business Intelligence & Visualization.

In our last lesson, we took an architect's view on evaluating major BI tools, understanding the core philosophies of Tableau, Power BI, and Looker. We established that choosing a tool is a significant architectural decision that impacts governance, scalability, and cost.

Today, we'll bridge the gap between theory and practice. As promised, we will get hands-on and fulfill this lesson's learning outcome: to connect a BI tool to a data warehouse or data lakehouse. You will learn the practical steps for establishing these connections and, more importantly, the critical architectural decisions you must make during the process.

1. The BI Tool in the Modern Data Architecture

Before diving into the "how," let's revisit the "where." A BI tool is the final, user-facing layer of the data stack. It's the primary interface through which the value of your entire data platform is realized by the business. The connection between the BI tool and the data platform is, therefore, a crucial linkage in your architecture.

Databricks Lakehouse Platform Architecture with BI Integration
This diagram of the Databricks Lakehouse Platform shows how BI tools serve as a key consumption layer, connecting directly to Databricks SQL to provide business intelligence from the data processed within the lakehouse.
BI Tool to Data Warehouse Connection with Data Access Management
Similarly, this architecture shows a BI tool (Tableau) connecting to a cloud data warehouse (Snowflake). Notice the presence of a data access management layer (Satori), highlighting that security and governance are integral to this connection.

As these diagrams show, the connection is more than just a wire. It's a managed and governed interface that enables analytics. Let's explore how to create this interface for two common scenarios.


2. Connecting Power BI to a Databricks Lakehouse

We have spent a significant amount of time in this course building our understanding of the Databricks lakehouse. Now, let's connect Power BI, a leading BI tool, to it.

First, it's important to understand that there are several ways to make this connection.

Connecting Power BI to Databricks: Complete Integration Guide

The article 'Connecting Power BI to Databricks' from Dawiso provides a great overview of the different connection methods and the rationale behind the integration.

Please read the sections 'Why Connect Power BI to Databricks' and 'Connection Methods Overview'. This will give you the context for why this integration is powerful and the main ways to achieve it: via Partner Connect, the Native Connector, or ODBC/JDBC.

While Partner Connect is often the simplest method, as an architect, it's essential to understand the manual process using the native connector, as it gives you more insight and control.

The following video demonstrates this manual process. You'll see how to retrieve the necessary connection parameters from your Databricks workspace and use them within Power BI Desktop.

How to connect Power BI with Azure Databricks? #azure #powerbi #databricks

This video from BI Consulting Pro walks through the practical steps of connecting Power BI to Azure Databricks.

Please watch the following segments: Prerequisites (01:01 - 01:22): Note the required components (workspace, running cluster/SQL warehouse, data). Finding Connection Details (01:22 - 03:00): Focus on how to navigate the Databricks UI to find the 'Server Hostname' and 'HTTP Path'. These are the key coordinates for your data platform. Connecting from Power BI (03:19 - 04:29): Observe how these details are entered into the Azure Databricks connector in Power BI Desktop to establish the connection.


3. The Architect's Choice: Import vs. DirectQuery

During the connection process, you are faced with the most critical architectural decision: choosing the data connectivity mode. Power BI offers two primary modes when connecting to sources like Databricks: Import and DirectQuery.

  • Import Mode: Power BI loads a copy of the data into its own highly compressed, in-memory engine (VertiPaq). All visuals and calculations query this internal copy.
  • DirectQuery Mode: No data is copied. Power BI acts as a visualization layer, translating user interactions (like clicking a filter) into live queries that are sent directly to the source data platform (e.g., Databricks).

This choice represents a fundamental trade-off between performance, data freshness, and scalability.

Connecting Power BI to Databricks: Complete Integration Guide

The 'Connecting Power BI to Databricks' article provides a good high-level comparison of these two modes in the context of Databricks.

Read the section titled 'DirectQuery vs Import Mode'. Pay close attention to the 'Advantages' and 'Considerations' for each, as these are the factors you'll weigh in your architectural designs.

To deepen your understanding, let's turn to the official Microsoft documentation, which provides a definitive guide on the implications of this choice.

DirectQuery in Power BI: When to Use, Limitations, ...

This Microsoft Learn article offers a detailed breakdown of data connectivity modes. It's an essential read for any data architect working with Power BI.

Please read the following sections: 'Import connections': Understand how data is cached and refreshed. 'DirectQuery connections': Contrast this with the live-query approach. 'DirectQuery use cases': This is the most important section for an architect. Focus on the scenarios where DirectQuery is the most appropriate choice, such as for very large datasets or when near real-time data is required.

In essence, DirectQuery allows your BI tool to leverage the full power and scale of your underlying lakehouse or data warehouse, querying terabytes of data in place. This aligns perfectly with the modern data architecture philosophy where the data platform does the heavy lifting.


4. A Contrasting Example: Connecting Tableau to Snowflake

To solidify your understanding, let's look at another common pairing: the Tableau BI tool and the Snowflake cloud data warehouse. While the tools are different, you'll notice the core concepts are very similar.

This video demonstrates the process, and also reveals some key architectural features of a modern cloud data warehouse.

Getting started with the Snowflake PT-1: Trial and connecting Tableau

This video from 'Data with Tableau Tim' shows how to connect Tableau to a Snowflake data warehouse. We will focus on the technical connection steps and the underlying architectural concepts.

Watch the following segments, paying attention to the architectural concepts highlighted: Driver Installation (13:03 - 14:15): A common prerequisite for BI tools is installing a specific ODBC/JDBC driver for the data source. Making the Connection (14:15 - 15:50): Observe the similar process of entering server details, username, and password to connect. Warehouse Selection (Compute) (15:50 - 19:27): This is a key architectural point. Notice how in Tableau, you select a Snowflake 'warehouse', which is a compute resource, separate from storage. This demonstrates the separation of storage and compute in modern data platforms. Query History (Passthrough) (23:27 - 25:02): The presenter shows Snowflake's query history, which logs the exact SQL queries Tableau is sending. This is a perfect illustration of the DirectQuery/Live Query model in action.

The principles are universal: locate your data platform's endpoint, provide credentials, and choose how the BI tool will query the data. The ability to see the queries being passed from the BI tool to the data warehouse is invaluable for performance tuning and debugging—a key task for a data architect.

Test your understanding!

A marketing team wants a Power BI dashboard to analyze customer campaign data stored in your Databricks lakehouse. They need two types of reports:

  1. A historical performance dashboard analyzing trends over the past 5 years. The dataset is 10 GB. The data is static and only updated monthly. Maximum interactivity and speed within the dashboard are the top priorities.
  2. A daily performance tracker showing the results of a campaign that launched today. This report must show data that is no more than 15 minutes old.

As the data architect, what data connectivity mode (Import or DirectQuery) would you recommend for each report, and why?

Show answer
  1. Historical Performance Dashboard: Import Mode.

    • Reasoning: The top priority is dashboard performance and interactivity. Since the data is static and the dataset size (10 GB) is manageable for Power BI's import engine, this mode is ideal. The data will be loaded into Power BI's fast in-memory cache, providing an excellent user experience. The monthly data update cadence is easily handled by a scheduled refresh.
  2. Daily Performance Tracker: DirectQuery Mode.

    • Reasoning: The requirement for data to be no more than 15 minutes old makes Import mode unsuitable (scheduled refreshes are not frequent enough). DirectQuery is the perfect solution here. It will query the Databricks lakehouse live each time a user interacts with the report, ensuring the data is always fresh and reflecting the near real-time campaign performance.

Conclusion

In this lesson, you have moved from evaluating BI tools to connecting them. You've learned the practical steps for linking Power BI to Databricks and Tableau to Snowflake, representing common lakehouse and data warehouse integration patterns.

Key Takeaways:

  • Connecting a BI tool involves locating the server/hostname of your data platform and using a native connector or driver to establish a link.
  • The most crucial architectural decision is the data connectivity mode:
    • Import mode prioritizes dashboard performance by caching data but sacrifices data freshness and has size limitations.
    • DirectQuery (Live Query) mode prioritizes data freshness and scalability by querying the data source directly, fully leveraging the power of your modern data platform.
  • Modern data platforms, like Snowflake, explicitly separate storage and compute, a configuration that you can control directly from the BI tool.
  • In a live query model, you can monitor the SQL being generated by the BI tool within the data platform, which is essential for performance optimization.

You are now equipped to not only connect analytics tools to your data stores but also to make informed architectural decisions about how they connect.

In our next lesson, "Describe key principles and best practices for effective data visualization," we will focus on what to do after the connection is made: how to design visuals and dashboards that communicate insights clearly and effectively.