0% found this document useful (0 votes)
2 views

Module-2-PPT

Module 2 covers data extraction in Power BI, detailing various data sources including databases, files, Azure, and SaaS connectors. It explains the functionalities of Power BI Desktop, including Report, Data, and Model views, as well as the use of Power Query Editor for data transformation. The module also highlights the process of importing data from Excel, updating files, and utilizing Python and R scripts for advanced data manipulation.

Uploaded by

leadermaharshi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Module-2-PPT

Module 2 covers data extraction in Power BI, detailing various data sources including databases, files, Azure, and SaaS connectors. It explains the functionalities of Power BI Desktop, including Report, Data, and Model views, as well as the use of Power Query Editor for data transformation. The module also highlights the process of importing data from Excel, updating files, and utilizing Python and R scripts for advanced data manipulation.

Uploaded by

leadermaharshi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 49

Module 2 – Data Extraction

Copyright Intellipaat. All rights


Agenda

Overview of Data Sources in


01 Power BI 02 Power BI
Desktop

Using Files as a Updating Files in


03 Data Source
04 Power BI

Using a Database as a Using SaaS


05 Data Source
06
Connectors

Copyright Intellipaat. All rights


Agenda

07 Other Data sources 08 Python Script

09 R Script 10 Power Query Editor

Areas in Power
11 12 Advanced Editor
Query Editor

Copyright Intellipaat. All rights


Overview of Power BI
Desktop

Copyright Intellipaat. All rights


Overview of Power BI Desktop

Power BI Desktop features a workspace for creating reports and comprises


three key views in which we can work

Report View Data View Model View

Copyright Intellipaat. All rights


Overview of Power BI Desktop

This is the main workspace where we add report items, such as bar
charts, maps, and pie charts, and display data using these report items

Report View

Data View

Model View

Copyright Intellipaat. All rights


Overview of Power BI Desktop
Report View

Copyright Intellipaat. All rights


Overview of Power BI Desktop

The data view is used to see imported datasets, in addition to shaping


the data using transformations and M expressions
Report View

Data View

Model View

Copyright Intellipaat. All rights


Overview of Power BI Desktop
Data View

Copyright Intellipaat. All rights


Overview of Power BI Desktop

Power BI has an autodetect relationships feature, and we can also


create relationships manually and set relationship properties

Report View

Data View

Model View

Copyright Intellipaat. All rights


Overview of Power BI Desktop
Model View

Copyright Intellipaat. All rights


Data Sources in Power BI

Copyright Intellipaat. All rights


Data Sources in Power BI

In Power BI Desktop, we have a wide choice of sources to import data from,


including database, file, Azure, and SaaS connectors

Database Connectors File Connectors Azure Connectors SaaS Connectors

Copyright Intellipaat. All rights


Data Sources in Power BI

Power BI supports the database connections for importing data


Data Sources from on-premises sources

Database
Database connectors include:
Connectors

File Connectors
MySQL

Azure Connectors SQL Server IBM Db2

SaaS Connectors
Oracle Teradata

Copyright Intellipaat. All rights


Data Sources in Power BI

Using a file connector, we can import either a single file or a folder to


select multiple files. This is useful when we have a folder location used
Data Sources
to store files created on a schedule

Database
Connectors File connectors include:

File Connectors
CSV

Azure Connectors MS Excel Text

SaaS Connectors
XML JSON

Copyright Intellipaat. All rights


Data Sources in Power BI

Using Azure connectors in Power BI, we can connect to the database in


the Azure cloud
Data Sources

Database
Connectors Azure connectors include:

File Connectors
Azure SQL Data Warehouse

Azure Connectors
Azure Table
Azure Blob Storage Storage
SaaS Connectors
Azure SQL Database

Copyright Intellipaat. All rights


Data Sources in Power BI

Power BI Desktop makes it easy to connect to external SaaS


applications for analyzing data related to fields such as sales,
Data Sources
marketing, finance, and social media

Database
Connectors SaaS connectors include:

File Connectors
Salesforce

Azure Connectors Google Analytics GitHub

SaaS Connectors
Facebook QuickBooks Online

Copyright Intellipaat. All rights


Using Excel as a Data
Source

Copyright Intellipaat. All rights


Using Excel as a Data Source

In Power BI, we can connect to files from Power BI Desktop or from Power BI Service

Using Power BI, we can also connect to various file formats, folders, etc. and
even import Power BI Report files with the .pbix extension

When we import data directly into Power BI Service, the maximum file
size should be 250 MB

Copyright Intellipaat. All rights


Using Excel as a Data Source

There are two approaches in extracting an Excel file as a Data Source:

Connect to an Excel workbook and use its contents as a dataset for Power BI reports and dashboards.
We can edit our data using Power Query Editor

Connect the contents of Excel to


Power BI Desktop

Import a whole Excel workbook and explore it in the same way we would do when using Excel Online,
but here we cannot edit our data

Connect the whole Excel


workbook to Power BI Desktop

Copyright Intellipaat. All rights


Using Excel as a Data Source

1 Click on Get Data

2 Different data sources appears

3 Click on Files

Select the file format of our


4
choice

Copyright Intellipaat. All rights


Demo: Importing Data from Excel

Copyright Intellipaat. All rights


Updating Files in Power BI

Copyright Intellipaat. All rights


Updating Files in Power BI

Uploading a File Data Refresh

Data Refresh in Power BI works based on the


This applies to CSV, Power BI Desktop files, and Excel
subscription types and on the data sources

We upload a local file to Power BI to build reports and • For free users, data can be refreshed daily with a
dashboards; then, we make changes to the file and upload maximum of 10,000 rows/hour
it again, providing the file name as the same, and then • For pro users, data can be refreshed hourly up to
Power BI will update the file 1
million rows/hour
Copyright Intellipaat. All rights
Using a Database as a
Data Source

Copyright Intellipaat. All rights


Using a Database as a Data Source

Microsoft SQL Server is one of the database sources available in Power BI, which is a popular relational
database management system (RDBMS)

It can handle multiple user connections and a high volume of data transactions, and it
can run both in the cloud and on-premises

The steps for connecting SQL Server to Power BI is the same as connecting
other databases such as Oracle, MySQL, or IBM Db2

Copyright Intellipaat. All rights


Using a Database as a Data Source

Power BI Desktop
1 --> Get Data

Click on SQL Server


Database 2

Enter the server name


3 and the database
name

Use a query or select


tables and views 4

Load into Power Query


5 Editor or directly into
a data model
Copyright Intellipaat. All rights
Demo: Importing Data from
SQL Server

Copyright Intellipaat. All rights


Using SaaS Connectors

Copyright Intellipaat. All rights


Using SaaS Connectors

From Power BI Desktop, we can import data from third-party online solutions
and combine the data in reports and dashboards

For example, we can create a report from Facebook that shows marketing data combined with the sales
data that is from Salesforce

Copyright Intellipaat. All rights


Other Data Sources

Copyright Intellipaat. All rights


Other Data Sources

R Script
Web Python Script
Connector

OData Feed SharePoint

Copyright Intellipaat. All rights


Python Script

Copyright Intellipaat. All rights


Python Script

We can directly run Python scripts in Power BI Desktop by importing the datasets into the
Power BI data model and adding visualizations to them

To run Python scripts in Power BI Desktop, install


1 Python and the required Python packages

2 In Power BI Desktop, enable Python scripting

Run our Python script and import data from


3 Power BI Desktop
Get data > Others > Python Script

Click on Connect; copy the Python script to the


4 Python script dialog box, and click on OK

Copyright Intellipaat. All rights


Python Script

Python can also be used for data cleansing, performing advanced data shaping,
analytics, etc. in Power BI Query Editor
Python in Query Editor

We can also use an external Python IDE to create Python scripts and use those
scripts in Power BI Desktop

Python IDE

We can also create Python visuals in Power BI Desktop

Python Visuals

Copyright Intellipaat. All rights


R Script

Copyright Intellipaat. All rights


R Script

The R programming language has been integrated with the Transact-SQL language that helps Data
Scientists develop applications in R and deploy them in a SQL Server production environment

To integrate R and SQL, a service was introduced known


as SQL Server R Services

This service helps us run R scripts, create data models,


and import results to Power BI Desktop

Copyright Intellipaat. All rights


Power Query Editor

Copyright Intellipaat. All rights


Power Query Editor

Power Query Editor helps us load data from a wide number of data
sources and apply transformations on it

Load
Transform
Data Data

Shape
Merge Data
Data

Format
Data

Copyright Intellipaat. All rights


Areas in Power Query
Editor

Copyright Intellipaat. All rights


Areas in Power Query Editor

Four areas in Power Query Editor are:

01 Ribbon

02 Queries Pane

03 Data View Pane

04 Query Settings Pane

Copyright Intellipaat. All rights


Areas in Power Query Editor

Ribbon

01 Ribbon
The ribbon in Power Query Editor has six tabs:
• Home
02 Queries Pane • Transform
• Add Column
• View
03 Data View Pane • Tools
• Help
04 Query Settings Pane

Copyright Intellipaat. All rights


Areas in Power Query Editor

Queries Pane

01 Ribbon The Queries pane will show the active queries and their names.
When we select a query from this pane, data will be displayed on
the Data View pane
02 Queries Pane

03 Data View Pane

04 Query Settings Pane

Copyright Intellipaat. All rights


Areas in Power Query Editor

Data View Pane

01 Ribbon In this pane, the data from the selected query is displayed where we
can shape, transform, or merge the data to meet our needs

02 Queries Pane

03 Data View Pane

04 Query Settings Pane

Copyright Intellipaat. All rights


Areas in Power Query Editor

Query Settings Pane

01 Ribbon This pane shows the steps associated with a query. All the operations
that we perform on the data are captured by APPLIED STEPS in the
Query Settings pane
02 Queries Pane

03 Data View Pane

04 Query Settings Pane

Copyright Intellipaat. All rights


Advanced Editor

Copyright Intellipaat. All rights


Advanced Editor

Using Advanced Editor, we can see the code that Power Query Editor
uses with each step, and we can also create our own code

To launch Advanced Editor, go to View > Advanced Editor

Copyright Intellipaat. All rights


Demo: Overview of Query
Editor

Copyright Intellipaat. All rights


India: +91-7847955955

US: 1-800-216-8930 (TOLL FREE)

[email protected]

24/7 Chat with Our Course Advisor

Copyright Intellipaat. All rights

You might also like