power bi数据分析_设置Power BI数据网关

时间:2024-03-28 19:34:03

power bi数据分析

In this article, I’m going to explain what a Power BI Data Gateway is and how to set it up. I’ll also cover the underlying architecture that the gateway uses and how to manage on-premise data using the Data Gateway.

在本文中,我将解释什么是Power BI Data Gateway以及如何设置它。 我还将介绍网关使用的基础体系结构以及如何使用数据网关管理本地数据。

Please note that this article is not an introductory course to Power BI and assumes that you have a fair knowledge of working with Power BI Desktop as well as the Power BI service. (https://app.powerbi.com)

请注意,本文不是Power BI的入门课程,并且假定您具有使用Power BI Desktop和Power BI服务的丰富知识。https://app.powerbi.com

The Power BI Data Gateway, as the name suggests, is a kind of gateway that acts as a connecting platform between the Power BI Cloud service and the on-premise datasets that are not on the cloud. For example, if you have set up your data sources on your local system or on a customer’s data center which is behind a firewall, you will need to install the Power BI Data Gateway for the Power BI Service to be able to connect to those data sources and fetch the data.

顾名思义,Power BI数据网关是一种网关,它充当Power BI Cloud服务与不在云上的内部部署数据集之间的连接平台。 例如,如果您已在本地系统或防火墙后面的客户数据中心上设置了数据源,则需要安装Power BI Service的Power BI Data Gateway才能连接到这些数据源并获取数据。

The Power BI Data Gateway is not only limited for use by Power BI, but it can also be used by the other Azure cloud services like the Azure Analysis Services, Power Apps, Azure Logic Apps, and Power Automate. All these cloud services can use the same data gateway without any other specifications required.

Power BI数据网关不仅限于供Power BI使用,还可以由其他Azure云服务(例如Azure Analysis Services,Power Apps,Azure Logic Apps和Power Automate)使用。 所有这些云服务都可以使用同一数据网关,而无需任何其他规范。

数据网关架构 (Data Gateway Architecture)

As I have already mentioned, the Power BI Data Gateway is a kind of bridge between the on-premises data sources and the Power BI service available on the cloud. The gateway is a windows application that has to be installed on the same network as the other data sources are in. If you see the figure below, there are multiple steps that take place while querying through the data gateway. As you can see, there is also a clear distinction in the architecture between the cloud services and the on-premise data sources.

正如我已经提到的那样,Power BI数据网关是内部部署数据源和云上可用的Power BI服务之间的一种桥梁。 网关是Windows应用程序,必须与其他数据源所在的网络安装在同一网络上。如果您看到下图,则在通过数据网关查询时需要执行多个步骤。 如您所见,云服务和本地数据源之间的体系结构也有明显区别。

Let us now try to understand in a step-by-step manner, how the data processing is done using the data gateway.

现在,让我们尝试逐步了解如何使用数据网关完成数据处理。

  1. Any of the cloud services, like the Power BI Service, Power Automate or Azure Analysis Services etc. have the data model defined within them. This model also keeps the necessary queries that are required to refresh the data

    诸如Power BI Service ,Power Automate或Azure Analysis Services等任何云服务都在其中定义了数据模型。 此模型还保留刷新数据所需的必要查询
  2. These queries, along with the credentials are first of all encrypted by the Power BI Cloud Service

    这些查询以及凭据首先由Power BI Cloud Service 加密
  3. Once encrypted, the information is then passed on to the Gateway Cloud Service

    加密后,信息将传递到网关云服务
  4. The Gateway Cloud service just analyzes the query and then puts the query into the Azure Service Bus queue for further processing

    网关云服务仅分析查询,然后将查询放入Azure Service Bus队列以进行进一步处理
  5. It is the job of the Azure Service Bus to push the encrypted queries to the Application Gateway which is installed locally

    Azure Service Bus的工作是将加密的查询推送到本地安装的Application Gateway
  6. Once the information is received by the application gateway, it decrypts the source credentials and then connects to one or more data sources as defined by the connection string

    一旦应用程序网关接收到信息,它将解密源凭据,然后连接到由连接字符串定义的一个或多个数据源
  7. The query is then executed by the Application Gateway on the data source and the results are sent back

    然后由应用程序网关在数据源上执行查询,并将结果发送回
  8. As the Application Gateway receives the data from the data source, it then passes on the information back to the Power BI Cloud Service

    当Application Gateway从数据源接收数据时,它随后将信息传递回Power BI Cloud Service
  9. The cloud service finally processes the results and updates the visuals/datasets

    云服务最终处理结果并更新视觉效果/数据集

power bi数据分析_设置Power BI数据网关

Figure 1 – Data Gateway Architecture (Image Source: https://docs.microsoft.com/en-us/data-integration/gateway/media/service-gateway-onprem-indepth/on-prem-data-gateway-how-it-works.png)

图1 –数据网关体系结构(图片来源:https://docs.microsoft.com/zh-cn/data-integration/gateway/media/service-gateway-onprem-indepth/on-prem-data-gateway-how- it-works.png)

下载并安装Power BI Data Gateway (Download and Install Power BI Data Gateway)

The Power BI Data Gateway can be installed on a Windows PC or Server. However, it is not advisable to install it on a device that might be turned off, because in such a case the gateway service will stop, and the data refresh will stop. In order to install the gateway, please follow the steps below.

Power BI数据网关可以安装在Windows PC或服务器上。 但是,建议不要将其安装在可能已关闭的设备上,因为在这种情况下,网关服务将停止,并且数据刷新将停止。 为了安装网关,请按照以下步骤操作。

  1. Log onto the Power BI service and sign in with your credentials

    登录到Power BI服务并使用您的凭据登录
  2. Under the downloads section, click on Data Gateway

    power bi数据分析_设置Power BI数据网关

    Figure 2 – Download Data Gateway

    在下载部分下,单击数据网关

    图2 –下载数据网关

  3. On the next page that opens, click on DOWNLOAD GATEWAY

    power bi数据分析_设置Power BI数据网关

    Figure 3 – Download Data Gateway Button

    在打开的下一页上,单击“ 下载网关”

    图3 –下载数据网关按钮

  4. Once it is downloaded, open the file as an administrator

    下载后,以管理员身份打开文件
  5. As the application starts, click on Next on the first page

    power bi数据分析_设置Power BI数据网关

    Figure 4 – Data Gateway Installer

    在应用程序启动时,在第一页上单击“ 下一步”

    图4 –数据网关安装程序

  6. On the next page that appears, select the On-premises data gateway (recommended) and click Next

    power bi数据分析_设置Power BI数据网关

    Figure 5 – Installation Mode

    在出现的下一页上,选择本地数据网关(推荐) ,然后单击下一步。

    图5 –安装模式

  7. The application might take a few minutes to install

    power bi数据分析_设置Power BI数据网关

    Figure 6 – Time to Install

    该应用程序可能需要几分钟才能安装

    图6 –安装时间

  8. Once the application is installed, it will open the page to sign in to the service

    安装该应用程序后,它将打开该页面以登录该服务

配置Power BI数据网关 (Configure Power BI Data Gateway)

Once the Power BI Data Gateway is installed, the next step is to configure it to connect to the Power BI service. Follow the steps below to connect the gateway to the Power BI Service.

一旦安装了Power BI Data Gateway,下一步就是将其配置为连接到Power BI服务。 请按照以下步骤将网关连接到Power BI服务。

  1. As the page for sign-in opens, click on Sign-On

    power bi数据分析_设置Power BI数据网关

    Figure 7 – Data Gateway Sign-in

    打开登录页面后,单击“ 登录”

    图7 –数据网关登录

  2. Provide your email address that you use to login to the Power BI Service and click on Next. Please note that this user must have administrative rights in the Power BI service workspace

    power bi数据分析_设置Power BI数据网关

    Figure 8 – Sign-in Credentials

    提供您用于登录Power BI服务的电子邮件地址 ,然后单击“ 下一步” 。 请注意,该用户必须在Power BI服务工作区中具有管理权限

    图8 –登录凭证

  3. Enter the password for the account and click Sign In

    power bi数据分析_设置Power BI数据网关

    Figure 9 – Sign-in Credentials

    输入该帐户的密码,然后单击登录。

    图9 –登录凭证

  4. In the following page, the message will appear as “Gateway was not found”. This means that the service was not able to find any gateway configured in our Power BI Service that connects to the PC on which we just installed the gateway

    在下一页中,消息将显示为“ 找不到网关 ”。 这意味着该服务无法找到在Power BI服务中配置的任何网关,该网关连接到我们刚刚安装了网关的PC上

  5. Just go ahead and click Configure

    power bi数据分析_设置Power BI数据网关

    Figure 10 – Configuring the Gateway

    只需继续并单击配置

    图10 –配置网关

  6. Select Register a new gateway on this computer and click Next

    power bi数据分析_设置Power BI数据网关

    Figure 11 – Registering the gateway

    选择在此计算机上注册新网关 ,然后单击下一步。

    图11 –注册网关

  7. Provide a name for the gateway and an 8-digit recovery key and Click on Configure

    power bi数据分析_设置Power BI数据网关

    Figure 12 – Registering the gateway

    提供网关名称和8位恢复**,然后单击“ 配置”

    图12 –注册网关

  8. Once configured, the gateway will display a message saying it is online and now ready for use. You can click on Close

    power bi数据分析_设置Power BI数据网关

    Figure 13 – Gateway Registered

    配置完成后,网关将显示一条消息,表明它已联机,现在可以使用了 。 您可以点击关闭

    图13 –网关注册

  9. The gateway has been successfully installed on the PC and is now ready for use by Power BI and Power Apps as mentioned on the page

    该网关已成功安装在PC上,现在可以按页面上的说明供Power BI和Power Apps使用

Now that the Gateway is installed and ready for use locally, the next step is to configure the same in the Power BI Service. Please follow the steps below.

现在已经安装了网关并准备在本地使用该网关,下一步是在Power BI Service中对其进行配置。 请按照以下步骤操作。

  1. Log-in to the Power BI Service

    登录到Power BI服务
  2. Click on Settings Icon and then select Manage Gateways

    power bi数据分析_设置Power BI数据网关

    单击设置图标 ,然后选择管理网关

  3. You’ll see that the name that we specified while installing the gateway is automatically being listed under the cluster

    power bi数据分析_设置Power BI数据网关

    Figure 15 – Data Gateway Cluster

    您会看到我们在安装网关时指定的名称会自动列在集群下

    图15 –数据网关集群

  4. Once the cluster is available, the next step is to add a data source to it

    群集可用后,下一步就是向其中添加数据源
  5. Click on Add data sources to use this gateway

    power bi数据分析_设置Power BI数据网关

    Figure 16 – Add Data Sources to use the Gateway

    单击添加数据源以使用此网关

    图16 –添加数据源以使用网关

  6. In the Data Source Settings page that appears, provide the name of the Data Source and select the type of the data source, which in our case is SQL Server

    power bi数据分析_设置Power BI数据网关

    Figure 17 – Selecting the Data Source and Source Type

    在出现的“ 数据源设置”页面中,提供数据源名称并选择数据源类型 ,在本例中为SQL Server

    图17 –选择数据源和源类型

  7. Once the Data Source Type is selected, provide the required details that are needed to connect to the source database in the local system and click Add

    power bi数据分析_设置Power BI数据网关

    Figure 18 – Provide Data Source Details

    选择数据源类型后,提供连接到本地系统中的源数据库所需的必需详细信息,然后单击添加。

    图18 –提供数据源详细信息

  8. If the connection is established, you’ll receive a message that says, “Connection Successful

    power bi数据分析_设置Power BI数据网关

    Figure 19 – Connection Successful

    如果建立了连接,您将收到一条消息,指出“ Connection Success

    图19 –连接成功

That’s all. You have now successfully set up Power BI Data Gateway and this can be used in any Power BI reports as per the requirements.

就这样。 现在,您已经成功设置了Power BI Data Gateway,并且可以根据要求将其用于任何Power BI报告中。

结论 (Conclusion)

In this article, we have seen how to set up Power BI Data Gateway and configure the same in the Power BI Service. Data Gateway is essential if there are data sources that are available on-premises and not on the cloud. This data gateway acts as the bridge between the Power BI Cloud Service and the on-premise data sources through a secured network.

在本文中,我们已经了解了如何设置Power BI数据网关并在Power BI服务中对其进行配置。 如果存在本地可用而不是云上可用的数据源,则数据网关必不可少。 该数据网关充当Power BI Cloud Service和通过安全网络的内部部署数据源之间的桥梁。

翻译自: https://www.sqlshack.com/setting-up-power-bi-data-gateway/

power bi数据分析