Power BI Gateway - PersonalPower BI Gateway - Personal

注意

Power BI 有一個新版本的 Personal Gateway,稱為內部部署資料閘道 (個人模式)There is a new version of the personal gateway for Power BI called the on-premises data gateway (personal mode). 下列文章描述舊版的個人閘道,稱為 Power BI Gateway - Personal,將於 2017 年 7 月 31 日之後淘汰並停止運作。The following article describes the previous version of the personal gateway, called Power BI Gateway - Personal, which will be retired and stop working after July 31, 2017. 如需新版個人閘道的相關資訊,包括如何安裝新版本,請參閱內部部署資料閘道 (個人模式) 文章For information about the new version of the personal gateway, including how to install the new version, see the On-premises data gateway (personal mode) article.

Power BI Gateway - Personal 以橋接器的角色連結 Power BI 服務和支援重新整理的內部部署資料來源,提供兩者之間快速且安全的資料傳輸。The Power BI Gateway - Personal acts as a bridge, providing quick and secure data transfer between the Power BI service and on-premises data sources that support refresh. 本文旨在帶領您深入了解閘道器的運作方式,以及閘道器對您來說是否必要。This article is meant to provide you with an in-depth understanding of how the gateway works and whether or not a gateway is necessary for you. 另外我們也針對個人閘道器整理出這個實用影片We've also put together this helpful video about the personal gateway.

此工具會以服務在您的電腦上安裝並執行。It installs and runs as a service on your computer. 這項服務會使用組態期間所指定的 Windows 帳戶來執行。As a service, it runs using a Windows account you specify during configuration. 在某些情況下,閘道會以應用程式來執行。In some cases, the Gateway runs as an application. 我們稍後會討論更多有關這方面的資訊。We'll go into more about that later.

當 Power BI 重新整理內部部署資料來源的資料時,閘道器可確保您的 Power BI 帳戶具有適當權限,以便連接到來源的資料並加以查詢。When Power BI refreshes data from an on-premises data source, the gateway assures your Power BI account has the right permissions to connect to and query data from the source.

Power BI 和閘道器之間的資料傳輸會透過 Azure 服務匯流排加以保護。Data transfer between Power BI and the gateway is secured through Azure Service Bus. 服務匯流排會在 Power BI 服務與您電腦之間,建立安全的通道。The Service Bus creates a secure channel between the Power BI service and your computer. 由於閘道器提供這種安全的連線,所以通常不需要在防火牆中開啟連接埠。Because the gateway provides this secure connection, there’s usually no need to open a port in your firewall.

在我們詳細討論閘道器之前,請先看一看 Power BI 中所用到的一些字詞:Before we go into details about the gateway, let’s look at some terms used in Power BI:

「資料集」 是指從線上或內部部署資料來源上傳到 Power BI 服務內的資料。A dataset is data uploaded into the Power BI service from an online or on-premises data source. 當您使用 [取得資料] 連接並上傳資料時,就會建立資料集。You create a dataset when you use Get Data to connect to and upload data. 資料集會出現在瀏覽器裡的 Power BI 工作區的 [我的工作區] 窗格中。Datasets appear in the My Workspace pane of your Power BI Workspace in your browser. 當您建立報表並將磚釘選到儀表板時,您看到的資料便是來自您的資料集。When you create reports and pin tiles to your dashboards, you’re looking at data from your datasets.

資料來源 是指您上傳至資料集內之資料的實際來源處,A data source is where the data you upload into a dataset really comes from. 可以是近乎任何項目,像是資料庫、Excel 工作表、Web 服務等等。如果是在 Excel 活頁簿中,您可以建立含有資料列的簡易工作表,而這即視為資料來源。It can be just about anything; a database, Excel worksheet, Web service, etc. With Excel workbooks, you can create a simple worksheet with rows of data, and that is considered a data source. 您也可以使用 Excel 中的 Power Query 或 Power Pivot 同時連接並查詢來自線上和內部部署資料來源的資料,全都在同一個活頁簿中作業。You can also use Power Query or Power Pivot in Excel to connect to and query data from both online and on-premises data sources, all in the same workbook. 若為 Power BI Desktop,您可以使用 [取得資料] 同時連接並查詢線上和內部部署資料來源的資料。With Power BI Desktop, you use Get Data to connect to and query data from both online and on-premises data sources.

個人閘道可透過內部部署資料閘道安裝。The personal gateway is installed through the on-premises data gateway. 可以在 Power BI 閘道頁面下載。You can download it on the Power BI Gateway page.

我需要閘道器嗎?Do I need a gateway?

安裝閘道器之前,請務必了解您是否確實需要閘道器。Before you install a gateway, it's important to know whether or not you really need one. 實際上,這取決於您的資料來源:It really depends on your data sources:

內部部署資料來源On-premises data sources

如果要重新整理從您組織內受支援之內部部署資料來源取得資料的資料集,就「需要」個人閘道器。A personal gateway is required in order to refresh datasets that get data from a supported on-premises data source in your organization.

透過閘道器,從以下來源上傳的資料集可支援 [立即重新整理] 和 [排程重新整理]:With a gateway, REFRESH NOW and SCHEDULE REFRESH are supported for datasets uploaded from:

  • Microsoft Excel 2013 (或更新版本) 活頁簿;您可在其中使用 Power Query 或 Power Pivot 來連接及查詢受支援之內部部署資料來源的資料。Microsoft Excel 2013 (or later) workbooks where Power Query or Power Pivot is used to connect to and query data from a supported on-premises data source. Power Query 或 Power Pivot 的 [取得外部資料] 中所顯示的所有內部部署資料來源都支援重新整理,Hadoop 檔案 (HDFS) 與 Microsoft Exchange 除外。All on-premises data sources shown in Get External Data in Power Query or Power Pivot support refresh except for Hadoop file (HDFS) and Microsoft Exchange.
  • Microsoft Power BI Desktop 的檔案;您可在其中使用 [取得資料] 來連接並查詢受支援之內部部署資料來源的資料。Microsoft Power BI Desktop files where Get Data is used to connect to and query data from a supported on-premises data source. [取得資料] 中所顯示的所有內部部署資料來源都支援重新整理,Hadoop 檔案 (HDFS) 與 Microsoft Exchange 除外。All on-premises data sources shown in Get Data support refresh except for Hadoop file (HDFS) and Microsoft Exchange.

線上資料來源Online data sources

「唯有」在您使用 Web.Page 函式的情況下才需要閘道器。A gateway is only required if you are using the Web.Page function. 在其他情況下,如果是要重新整理只從線上資料來源取得資料的資料集,則「不需要」閘道器。In other cases, a gateway is not required in order to refresh datasets that get data only from an online data source.

注意

如果您使用 Web.Page 函式,則唯有在您於 2016 年 11 月 18 日之後重新發佈資料集或報表的情況下才需要閘道器。If you are using the Web.Page function, you only need a gateway if you have republished the dataset or your report after November 18th, 2016.

從以下來源上傳的資料集可支援 [立即重新整理] 和 [排程重新整理],不需要閘道器:REFRESH NOW and SCHEDULE REFRESH are supported without a gateway for datasets uploaded from:

  • 來自線上資料來源的內容套件 (內容套件\服務)。Content packs from online data sources (content packs\services). 根據預設,內容套件的資料集會每天自動更新一次,不過您也可以手動重新整理或設定重新整理排程。By default, datasets from content packs are automatically updated once a day, but you can also refresh manually or setup a refresh schedule.
  • Microsoft Excel 2013 (或更新版本) 活頁簿;您可在其中使用 Power Query 或 Power Pivot 來連接及查詢線上資料來源的資料。Microsoft Excel 2013 (or later) workbooks where Power Query or Power Pivot is used to connect to and query data from an online data source.
  • Microsoft Power BI Desktop 檔案;您可在其中使用 [取得資料] 來連接並查詢線上資料來源的資料。Microsoft Power BI Desktop files where Get Data is used to connect to and query data from an online data source.

問題: 如果我的 Excel 活頁簿或 Power BI Desktop 檔案同時從線上和內部部署資料來源取得資料呢?Question: What if my Excel workbook or Power BI Desktop file gets data from both online and on-premises data sources?

回答: 「需要」 閘道。Answer: A gateway is required. 您必須安裝和設定閘道器,才能重新整理來自內部部署資料來源的資料。You will need to install and configure a gateway in order to refresh data from your on-premises data sources.

問題: 如果我的 Excel 活頁簿中只有我輸入的資料列呢?Question:** What if my Excel workbook just has rows of data I typed in?**

回答: 「不」 需要閘道。Answer: A gateway is not required. 只有在活頁簿使用 Power Query 或 Power Pivot 來查詢資料並將資料載入受支援之內部部署資料來源的資料模型時,您才需要安裝並設定閘道器。You only need to install and configure a gateway if your workbook uses Power Query or Power Pivot to query and load data to the data model from a supported on-premises data source

首次設定閘道器Setting up a gateway for the first time

首次設定閘道器的程序有三個步驟:Setting up a gateway for the first time is a three step process:

  1. 下載並安裝閘道器Download and install a gateway
  2. 設定閘道Configure the gateway
  3. 登入 Power BI 中的資料來源Sign in to data sources in Power BI

接下來我們進一步討論每個步驟。Let’s take a closer look at each step.

下載並安裝閘道器Download and install a gateway

注意

Power BI 有一個新版本的個人閘道,稱為內部部署資料閘道 (個人模式)There is a new version of the personal gateway for Power BI, called the on-premises data gateway (personal mode). 本文描述舊版的個人閘道,稱為 Power BI Gateway - Personal,將於 2017 年 7 月 31 日之後淘汰並停止運作。This article describes the previous version of the personal gateway, called Power BI Gateway - Personal, which will be retired and stop working after July 31, 2017. 如需新版個人閘道的相關資訊,包括如何安裝新版本,請參閱內部部署資料閘道 (個人模式) 文章For information about the new version of the personal gateway, including how to install the new version, see the On-premises data gateway (personal mode) article.

當您第一次針對受支援的資料集按一下 [立即重新整理] 或 [排程重新整理] 時,系統會提示您安裝閘道器。You’ll be prompted to install a gateway when you click on REFRESH NOW or SCHEDULE REFRESH for a supported dataset for the first time. 或者,於 [下載] 功能表下選取 [資料閘道] 以下載閘道。Or, to download the gateway, select Data Gateway under the Downloads menu. 下載內部部署資料閘道Download the on-premises data gateway.

您會想要選取 [個人閘道] 而不是 [內部部署資料閘道],以擁有您專屬的閘道。You will want to select Personal Gateway instead of On-premises data gateway to have a gateway that is for yourself.

安裝閘道其實不會很複雜。There’s really not much to installing a gateway. 您只要選取要安裝的位置,閱讀並接受授權合約,一如安裝任何其他應用程式。You’ll select a location to install to, and read and accept the license agreement just like any other application. 不過有一些重要須知,請務必了解。There are however some important things to know. 尤其是安裝閘道器所在電腦的類型,以及在該電腦上用來登入 Windows 的帳戶類型。In particular, the type of computer you install the gateway on and the type of account you’re logged in to Windows with on that computer.

注意

閘道必須能夠存取資料來源。The gateway needs to have access to the data source. 如果您的個人電腦無法連線到資料來源,建議您考慮在能夠存取資料來源的電腦上安裝內部部署資料閘道If your personal machine cannot connect to the data source, you may want to consider installing an on-premises data gateway on a machine that does have access to the data source. 將 SQL Server 安裝在裝載於 Azure 的虛擬機器 (VM) 上,即為此做法的範例之一。An example of this would be SQL Server installed on an virtual machine (VM) hosted in Azure. 您的個人電腦可能無法存取 VM。You personal machine may not have access to the VM. 您可以改為在 VM 上安裝內部部署資料閘道,並在 Power BI 服務內設定資料來源。You could install the on-premises data gateway on the VM instead, and configure the a data source within the Power BI service.

電腦類型Computer type

您安裝閘道器所在電腦的類型非常重要。The type of computer you install the gateway on is important.

注意

個人閘道僅適用於 64 位元的 Windows 作業系統。The personal gateway is supported only on 64-bit Windows operating systems.

膝上型電腦 - 若要讓排程的重新整理執行,閘道器必須啟動並執行。On a laptop computer - In order for a scheduled refresh to occur, the gateway needs to be up and running. 膝上型電腦關閉或處於睡眠狀態的機率,通常高於正在執行。Laptop computers are usually shut down or asleep more than they’re running. 如果您在膝上型電腦上安裝閘道器,請務必將排定的重新整理時間設為膝上型電腦執行的時段。If you install your gateway on a laptop, be sure to set your scheduled refresh times for when the laptop will be running. 若不如此,直到下次排定的重新整理時間之前,都不會再次嘗試重新整理。If it isn’t, the refresh will not be attempted again until the next scheduled refresh time.

桌上型電腦 – 問題不多。On a desktop computer – Not many issues here. 只要確認在您所排定的重新整理時間,電腦和閘道器都在執行中即可。Just make sure the computer and the gateway is running at your scheduled refresh times. 許多桌上型電腦會進入睡眠模式,如果電腦處於睡眠狀態,則排定的重新整理就無法執行。Many desktop computers go to sleep, scheduled refresh cannot occur if it’s asleep.

您只需要安裝一個閘道器。Once you install a gateway, you won’t have to install another. 一個閘道器即可用於任何數目的受支援資料集。One gateway will work for any number of supported datasets. 您也不需要在您上傳活頁簿和 Power BI Desktop 檔案的同一部來源電腦上安裝閘道器。You also don’t have to install the gateway on the same computer you upload your workbook and Power BI Desktop files from. 範例如下:假設您有一個連接到您組織內 SQL Server 資料來源的 Excel 活頁簿。Here’s an example: Let’s say you have an Excel workbook that connects to a SQL Server data source in your organization. 您使用 Power BI 中的 [取得資料] 從膝上型電腦上傳活頁簿。You used Get Data in Power BI to upload the workbook from your laptop computer. 您另外還有一部隨時都在執行的桌上型電腦,且已在該電腦上安裝並設定閘道器。You also have a desktop computer you leave running all the time, and you’ve installed and configured a gateway on that computer. 在 Power BI 中,您登入資料來源並針對資料集設定好重新整理排程。In Power BI, you’ve signed in to your data sources, and you’ve setup a refresh schedule for the dataset. 排定的重新整理時間一到,Power BI 就會建立與您安裝在桌上型電腦上閘道器的安全連線。When a scheduled refresh time comes, Power BI makes a secure connection to the gateway installed on your desktop computer. 接著它會安全地連接到資料來源以取得更新。It then securely connects to the data sources to get updates. 針對重新整理這個部分,並不會與您從膝上型電腦上傳的原始活頁簿進行通訊。For refresh, there’s no communication with the original workbook you uploaded from your laptop computer.

注意

您可以在同一部電腦上安裝個人和企業閘道。You can install the personal and enterprise gateways on the same computer.

Windows 帳戶Windows account

當您安裝閘道器時,系統會使用您的 Windows 帳戶將您登入電腦。When you install the gateway, you’ll be logged in to your computer using your Windows account. 您的 Windows 帳戶所擁有的權限類型,會影響閘道器在 Windows 中的安裝及執行方式。The type of permissions your Windows account has will have an effect on how the gateway is installed and how it is run in Windows.

當您登入 Windows:When you’re logged into Windows:

使用系統管理員權限With Administrator permissions 不使用系統管理員權限Without Administrator permissions
Power BI Gateway - Personal 執行為Power BI Gateway - Personal runs as a 服務Service 應用程式Application
排定的重新整理Scheduled Refresh 只要您的電腦與閘道器服務正在執行,您就不須在已排程的重新整理時間登入。As long as your computer and the gateway service is running, you do not have to be logged in at the scheduled refresh time. 您必須在已排程的重新整理時間登入您的電腦。You must be logged in to your computer at the scheduled refresh time.
變更 Windows 帳戶密碼Change Windows account password 您必須變更閘道器服務的密碼。You must change your Password in the gateway service. 如果閘道器所使用的帳戶密碼不再有效,重新整理就會失敗。If the account password used by the gateway is no longer valid, refresh will fail. 閘道器執行時一律使用您目前登入所用的帳戶和密碼。The gateway will always run using the account and password you are currently logged in with. 如果您未登入 Windows,閘道器就不會執行,且重新整理會失敗。If you aren’t logged in to Windows, the gateway will not be running and refresh will fail.

設定閘道Configure the gateway

安裝精靈完成之後,系統會提示您啟動 [組態精靈]。When the Installation Wizard finishes, you’ll be prompted to launch the Configuration Wizard. 設定閘道器其實不會很複雜。There’s really not much to configuring a gateway. 您必須從精靈登入 Power BI。You’ll need to sign in to Power BI from the Wizard. 精靈需要此動作,才能使用您的 Power BI 帳戶在 Power BI 服務中建立連線。This is necessary for the Wizard to establish a connection with your Power BI account in the Power BI service.

如果您是以具有系統管理員權限的帳戶登入 Windows,系統會要求您輸入您的 Windows 帳戶認證。If you’re logged in to Windows with an account with Administrator permissions, you’ll be asked to enter your Windows account credentials. 您可以指定不同的 Windows 帳戶,但請務必記得,權限會決定閘道器的執行方式。You can specify a different Windows account, but remember the permissions determine how the gateway is run. 閘道器服務會使用此帳戶來執行。The gateway service will run using this account.

登入的資料來源Sign in to data sources

一旦 [組態精靈] 完成且您的閘道器已啟動並執行,您就必須指定驗證類型,然後登入您每一個資料集的資料來源。Once the Configuration Wizard finishes and your gateway is up and running, you’ll have to specify an Authentication type and sign in to each of your dataset’s data sources. 您會在 Power BI 中完成這個步驟。You'll complete this step in Power BI.

您只需要指定驗證類型並登入資料來源一次。You only need to specify an authentication type and sign in to a data source once. 您可以從資料集 [設定] 畫面的 [管理資料來源] 區段登入。You sign in from the Manage Data Sources section in a dataset’s Settings screen. 如果您有多個資料來源,您就必須一一登入。If you have multiple data sources, you’ll have to sign in to each one. 閘道器會根據資料來源判定預設的驗證類型。The gateway determines a default Authentication type depending on the data source. 在大部分情況下,驗證類型為 Windows 驗證。不過在某些情況下,您的資料來源可能需要不同的驗證類型。In most cases, it’s Windows authentication; however, in some cases, your data source might require a different authentication type. 如果您不確定,請洽詢您的資料來源管理員。If you’re unsure, check with your data source administrator.

啟動並執行!Up and running!

閘道器啟動並執行之後,您就可以按一下資料集的 [排程重新整理],並看到資料集的 [設定] 頁面。When your gateway is up and running, you can click SCHEDULE REFRESH for a dataset where you’ll see your dataset’s Settings page.

此頁面會顯示:This page shows:

  1. 重新整理狀態 – 顯示重新整理成功和下次排定的重新整理時間。Refresh status – Shows refresh success and next scheduled refresh time.
  2. 閘道器 – 顯示閘道器是否已安裝且已上線。Gateway - Shows whether or not a gateway is installed and online. 如果閘道器已安裝但未上線,則會停用 [管理資料來源] 和 [排程重新整理] 設定。If a gateway is installed but not online, Manage Data Sources and Schedule Refresh settings are disabled.
  3. 管理資料來源 – 顯示資料集連接的資料來源。Manage Data Sources - Shows data sources the dataset connects to. 您可以登入或變更驗證類型。You can Sign in or change the authentication type. 您只需要登入每個資料來源一次。You’ll only need to Sign in to each data source once.
  4. 排程重新整理 – 您可以在此設定重新整理排程設定值。Schedule Refresh – You can configure a refresh schedule settings here. 如果閘道器未上線,則會停用這些設定。If the gateway isn’t online, these settings will be disabled.
  5. 重新整理失敗通知 – 此選項依預設為已選取,會在排定的重新整理失敗時傳送電子郵件給您。Refresh failure notifications – This option, selected by default, will send an e-mail to you if a scheduled refresh fails.

更新您的 Windows 帳戶密碼Updating your Windows account password

如果您在安裝閘道器時以具有系統管理員權限的 Windows 帳戶登入電腦,則閘道器會以服務的形式使用您在 [組態精靈] 中所指定的 Windows 帳戶來執行。If you were logged into your computer with a Windows account with administrator privileges when you installed your gateway, it runs as a service using the Windows account you specified in the Configuration Wizard. 通常這會是您用來登入電腦的同一個 Windows 帳戶。Most often, this will be the same Windows account you log in to your computer with. 當您變更 Windows 帳戶密碼時,也需要變更閘道器中的帳戶密碼,否則服務可能不會執行且重新整理將會失敗。When you change your Windows account password, you’ll also need to change it in the gateway, otherwise the service might not be running and refresh will fail. 若要變更閘道器的 Windows 帳戶密碼,請選取 Windows 桌面工作列上或應用程式中的個人閘道器圖示。To change your Windows account password for the gateway, select the personal gateway icon on your Windows Desktop Taskbar, or in Apps.

您可以從這裡更新密碼並檢查閘道器的連線狀態。From here, you can update your password and check your gateway's connection status.

連接埠Ports

閘道會在輸出連接埠上進行通訊:TCP 443 (預設)、5671、5672、9350 到 9354。The gateway communicates on outbound ports: TCP 443 (default), 5671, 5672, 9350 thru 9354. 閘道不需要輸入連接埠。The gateway does not require inbound ports.

網域名稱Domain names 輸出連接埠Outbound ports 描述Description
*.powerbi.com*.powerbi.com 443443 HTTPSHTTPS
*.analysis.windows.net*.analysis.windows.net 443443 HTTPSHTTPS
*.login.windows.net*.login.windows.net 443443 HTTPSHTTPS
*.servicebus.windows.net*.servicebus.windows.net 5671-56725671-5672 進階訊息佇列通訊協定 (AMQP)Advanced Message Queuing Protocol (AMQP)
*.servicebus.windows.net*.servicebus.windows.net 443, 9350-9354443, 9350-9354 透過 TCP 之服務匯流排轉送上的接聽程式 (需要 443 以取得存取控制 Token)Listeners on Service Bus Relay over TCP (requires 443 for Access Control token acquisition)
*.frontend.clouddatahub.net*.frontend.clouddatahub.net 443443 HTTPSHTTPS
*.core.windows.net*.core.windows.net 443443 HTTPSHTTPS
login.microsoftonline.comlogin.microsoftonline.com 443443 HTTPSHTTPS
login.windows.netlogin.windows.net 443443 HTTPSHTTPS

如果您需要白名單 IP 位址,而不是網域,您可以下載並使用 Microsoft Azure Datacenter IP 範圍清單。If you need to white list IP addresses instead of the domains, you can download and use the Microsoft Azure Datacenter IP ranges list. 下載Download

後續步驟Next steps

內部部署資料閘道 (個人模式) - 新版本的個人閘道 進行 Power BI Gateway 的 Proxy 設定On-premises data gateway (personal mode) - the new version of the personal gateway Configuring proxy settings for the Power BI Gateways
Power BI PremiumPower BI Premium

有其他問題嗎?More questions? 嘗試在 Power BI 社群提問Try asking the Power BI Community