Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Power Query Cookbook
  • Table Of Contents Toc
  • Feedback & Rating feedback
Power Query Cookbook

Power Query Cookbook

By : Janicijevic
4.5 (14)
close
close
Power Query Cookbook

Power Query Cookbook

4.5 (14)
By: Janicijevic

Overview of this book

Power Query is a data preparation tool that enables data engineers and business users to connect, reshape, enrich, and transform their data to facilitate relevant business insights and analysis. With Power Query's wide range of features, you can perform no-code transformations and complex M code functions at the same time to get the most out of your data. This Power Query book will help you to connect to data sources, achieve intuitive transformations, and get to grips with preparation practices. Starting with a general overview of Power Query and what it can do, the book advances to cover more complex topics such as M code and performance optimization. You'll learn how to extend these capabilities by gradually stepping away from the Power Query GUI and into the M programming language. Additionally, the book also shows you how to use Power Query Online within Power BI Dataflows. By the end of the book, you'll be able to leverage your source data, understand your data better, and enrich it with a full stack of no-code and custom features that you'll learn to design by yourself for your business requirements.
Table of Contents (12 chapters)
close
close

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

Create a Note

Modal Close icon
You need to login to use this feature.
notes
bookmark search playlist download font-size

Change the font size

margin-width

Change margin width

day-mode

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Delete Bookmark

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Delete Note

Modal Close icon
Are you sure you want to delete it?
Cancel
Yes, Delete

Edit Note

Modal Close icon
Write a note (max 255 characters)
Cancel
Update Note

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY