Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Power Query Cookbook

You're reading from   Power Query Cookbook Use effective and powerful queries in Power BI Desktop and Dataflows to prepare and transform your data

Arrow left icon
Product type Paperback
Published in Oct 2021
Publisher Packt
ISBN-13 9781800569485
Length 412 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Andrea Janicijevic Andrea Janicijevic
Author Profile Icon Andrea Janicijevic
Andrea Janicijevic
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Chapter 1: Getting Started with Power Query 2. Chapter 2: Connecting to Fetch Data FREE CHAPTER 3. Chapter 3: Data Exploration in Power Query 4. Chapter 4: Reshaping Your Data 5. Chapter 5: Combining Queries for Efficiency 6. Chapter 6: Optimizing Power Query Performance 7. Chapter 7: Leveraging the M Language 8. Chapter 8: Adding Value to Your Data 9. Chapter 9: Performance Tuning with Power BI Dataflows 10. Chapter 10: Implementing Query Diagnostics 11. Other Books You May Enjoy

Getting data and connector navigation

Power Query, thanks to its interface, offers an easy way to connect to data sources. In the previous chapter, you saw different authentication types, but here you will get an overview of the connector types and learn which one fits best. You will also learn the difference between preview (or beta) and general availability connectors.

Getting ready

For this recipe, you need to have Power BI Desktop running on your machine.

How to do it...

Open Power BI Desktop and you will be ready to perform the following steps:

  1. The first step in every version of the Power Query tool, whether it is the online or desktop version, is to click on Get data:
    Figure 2.1 – Get data in Power Query Desktop (left) and Get data in Power Query online (right)

    Figure 2.1 – Get data in Power Query Desktop (left) and Get data in Power Query online (right)

  2. Once you expand the Get data section, you will end up with the following view in the Power Query Desktop version:
Figure 2.2 – Get Data All connectors view in Power Query Desktop

Figure 2.2 – Get Data All connectors view in Power Query Desktop

And if you expand the same section in the Power Query online version, you will see the following:

Figure 2.3 – Get Data All categories view in Power Query online

Figure 2.3 – Get Data All categories view in Power Query online

Both versions have the following connectors divided into the same categories:

  • File: You can connect to different types of files, such as Excel, CSV/TXT, XML, JSON, Folder, PDF, and Parquet.
  • Database: You can connect to all mainstream databases such as Microsoft, Oracle, IBM, open source databases (MySQL, PostgreSQL, and MariaDB), Teradata, SAP, Amazon Redshift, Google BigQuery, Snowflake, and many others. This wide variety allows the user able to connect to the different sources and not have concerns about having the required data in only one standard data source.
  • Power Platform: You can connect live to Power BI datasets already published in the Power BI service. You will have the ability to connect to already prepared and transformed queries with the Power BI dataflow connectors and perform additional steps without doing everything from scratch.
  • Azure: You can connect to all Azure Data Services sources, such as Azure SQL Database, Azure Synapse, Azure Data Lake Storage, and to Azure open source services such as Azure Databricks and Azure HDInsight.
  • Online Services: You can connect to a wide range of third-party services and use native connectors to the Dynamics platform, Salesforce, Google Analytics, and other services that are continuously updated and released.
  • Other: This category collects more generic connectors, such as web connectors (used for getting data from websites, to make API calls, or to import files from the web), OData feeds, ODBC, and R and Python scripts. This set of connectors allows users to leverage some common connection logic that is used in other tools that can also be replicated with Power Query.

Users have to check what connectors are available in each version of Power Query – either the desktop or online version – and they have to research new connectors' availability. There are new ones both in beta (as shown in the following figure) and a general availability version with every release of Power Query. This list is constantly updated in the Microsoft documentation:

Figure 2.4 – Connector in the preview example

You have been reading a chapter from
Power Query Cookbook
Published in: Oct 2021
Publisher: Packt
ISBN-13: 9781800569485
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image