Module 1 - Lesson 2: Getting Data from Multiple Sources
Lesson 2: Getting Data from Multiple Sources
Learn with Raushan
Getting Data in Power BI

Welcome back, aspiring data analysts! In our previous lesson, we explored the fundamentals of data analysis and the role of Power BI. Now, let's get our hands dirty with the crucial first step: bringing data into Power BI from various sources. Think of Power BI as your central hub, ready to ingest data from all corners of your business or domain.
Understanding Data Sources: Where Does Our Information Live?
Data can reside in a multitude of places. Understanding these sources is the first step towards connecting with them. Common data sources include:
- Databases: Structured collections of data organized for easy access and management (e.g., SQL Server, Oracle, MySQL).
- Spreadsheets: Files like Microsoft Excel or CSV (Comma Separated Values) that store data in rows and columns.
- Cloud Services: Data stored in online platforms (e.g., Azure SQL Database, Amazon S3, Google BigQuery).
- Web: Data available through web pages or APIs (Application Programming Interfaces).
- Files: Local files on your computer or network (e.g., text files, JSON files).
- Power BI Datasets: Previously created and published Power BI data models.
- Online Services: Data from various online platforms like SharePoint, Dynamics 365, Salesforce, and Google Analytics.

Data Connectivity Mode: The Lifeline to Your Data
When connecting to a data source in Power BI, you'll encounter different data connectivity modes. These modes dictate how Power BI interacts with the underlying data:
Import
This mode copies the data from the source into the Power BI model.
Technical Definition: In Import mode, Power BI retrieves the entire dataset from the specified source and stores it within the Power BI (.pbix) file. All subsequent analysis and visualization are performed on this in-memory data.
Use Case: Ideal for smaller to medium-sized datasets where performance is critical, and you need to perform complex transformations and calculations. Power BI has full control over the data, allowing for fast query responses.
Real-World Example: Importing sales data from an Excel file or a small customer database for monthly performance analysis.
DirectQuery
This mode doesn't import the data. Instead, Power BI sends queries directly to the data source to retrieve the necessary data for each visual or interaction.
Technical Definition: In DirectQuery mode, Power BI sends native queries to the underlying data source whenever a user interacts with a report. The data remains at the source, and Power BI only retrieves the data needed for the specific request.
Use Case: Best suited for large datasets where importing the entire data would be impractical or where near real-time data is required. The performance depends heavily on the speed and responsiveness of the data source.
Real-World Example: Analyzing constantly updating sensor data from a manufacturing plant where the latest information is crucial.
Live Connection
This mode is specifically used for connecting to existing Power BI datasets in the Power BI service or to Analysis Services models (Tabular or Multidimensional). Similar to DirectQuery, data isn't imported.
Technical Definition: Live Connection establishes a direct link to a published Power BI dataset or an Analysis Services model. All querying and rendering happen within that remote model.
Use Case: Enables collaboration and reusability of curated data models. Ensures consistency across multiple reports built on the same data.
Real-World Example: Building multiple reports for different departments that all rely on a central, well-governed sales data model published in the Power BI service.

Connectors: Your Data Access Keys
Power BI offers a vast library of connectors – pre-built components that facilitate the connection to various data sources. These connectors handle the underlying technical complexities of communicating with different systems.
Technical Definition: A Power BI connector is a software component that enables Power BI to establish a connection with a specific data source, handle authentication, and retrieve data in a format that Power BI can understand.
Categories of Connectors:
- Files: Excel, CSV, Text/CSV, XML, JSON, PDF, etc.
- Databases: SQL Server, Access, Oracle, MySQL, PostgreSQL, Azure SQL Database, etc.
- Power Platform: Power BI datasets, Dataflows, Common Data Service.
- Azure: Azure Blob Storage, Azure Table Storage, Azure HDInsight, etc.
- Online Services: SharePoint Online, Dynamics 365, Salesforce, Google Analytics, Facebook, etc.
- Other: Web, OData Feed, ODBC, OLE DB, Blank Query.
Real-World Example: To connect to a SQL Server database, you would use the "SQL Server database" connector. You'd need to provide server details, database name, and authentication credentials. Power BI then uses this connector to establish the connection and allow you to select the tables and views you need.
In our next lesson, we'll tackle a common challenge: resolving data import errors. Stay tuned to learn how to troubleshoot and ensure a smooth data loading process!
Comments
Post a Comment