在 Power BI Desktop 中使用 SAP HANAUse SAP HANA in Power BI Desktop

使用 Power BI Desktop,您現在可以存取 SAP HANA 資料庫。With Power BI Desktop, you can now access SAP HANA databases. 若要使用 SAP HANA,SAP HANA ODBC 驅動程式必須安裝在本機用戶端電腦,以便 Power BI Desktop SAP HANA 資料連接正常運作。To use SAP HANA, the SAP HANA ODBC driver must be installed on the local client computer in order for the Power BI Desktop SAP HANA data connection to work properly. 您可以從 SAP Software Download Center (SAP 軟體下載中心) 下載 SAP HANA ODBC 驅動程式.You can download the SAP HANA ODBC driver from the SAP Software Download Center. 從該處搜尋適用於 Windows 電腦的 SAP HANA CLIENT。From there, search for the SAP HANA CLIENT for Windows computers. 由於 SAP Software Download Center (SAP 軟體下載中心) 經常變更其結構,因此未提供瀏覽該網站的更具體指引。Since the SAP Software Download Center changes its structure frequently, more specific guidance for navigating that site is not available.

若要連線到 SAP HANA 資料庫,請選取 [取得資料] > [資料庫] > [SAP HANA 資料庫],如下圖所示。To connect to a SAP HANA database, select Get Data > Database > SAP HANA Database as shown in the following image.

連接至 SAP HANA 資料庫時,請指定伺服器名稱和連接埠,格式為 server: port -下圖顯示的範例使用名為 ServerXYZ 和連接埠為 30015 的伺服器。When connecting to a SAP HANA database, specify the server name and the port in the format server:port - the following image shows an example with a server named ServerXYZ and port 30015.

在此版本中,Power BI Desktop 和 Power BI Service 支援 DirectQuery 模式中的 SAP HANA,而且您可以在 DirectQuery 模式中,將使用 SAP HANA 的報表發佈或上傳至 Power BI 服務。In this release SAP HANA in DirectQuery mode is supported in Power BI Desktop and the Power BI Service, and you can publish and upload reports that use SAP HANA in DirectQuery mode to the Power BI service. 如果不在 DirectQuery 模式中使用 SAP HANA ,您可以發佈和上傳報表至 Power BI Service。You can also publish and upload reports to the Power BI Service when not using SAP HANA in DirectQuery mode.

SAP HANA 的支援功能Supported features for SAP HANA

這個版本包含許多 SAP HANA功能,如下列清單所示:This release has many capabilities for SAP HANA, as shown in the following list:

  • 適用於 SAP HANA 的 Power BI 連接器使用 SAP ODBC 驅動程式來提供最佳使用體驗。The Power BI connector for SAP HANA uses the SAP ODBC driver, to provide the best use experience
  • SAP HANA 同時支援 [DirectQuery] 和 [匯入] 選項SAP HANA supports both DirectQuery and Import options
  • Power BI 支援 HANA 資訊模型 (例如 [分析] 和 [計算] 檢視),而且已最佳化瀏覽Power BI supports HANA information models ( such as Analytic and Calc views) and has optimized navigation
  • 透過 SAP HANA ,您也可以使用直接 SQL 功能連接到資料列和資料行資料表With SAP HANA you can also use the direct SQL feature to connect to Row and Column Tables
  • 包含 HANA 模型的最佳化瀏覽Includes Optimized Navigation for HANA Models
  • Power BI 支援 SAP HANA 變數和輸入參數Power BI supports SAP HANA Variables and Input parameters

安裝 SAP HANA ODBC 驅動程式Installing the SAP HANA ODBC driver

SAP HANA 的限制Limitations of SAP HANA

使用 SAP HANA也會有一些限制,如下所示:There are also a few limitations to using SAP HANA, shown below:

  • NVARCHAR 字串會截斷成 4000 個 Unicode 字元的最大長度NVARCHAR strings are truncated to maximum length of 4000 Unicode characters
  • 不支援 SMALLDECIMALSMALLDECIMAL is not supported
  • 不支援 VARBINARYVARBINARY is not supported
  • 有效日期介於 1899/12/30 到 9999/12/31 之間。Valid Dates are between 1899/12/30 and 9999/12/31