在 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 软件下载中心下载 SAP HANA ODBC 驱动程序。You can download the SAP HANA ODBC driver from the SAP Software Download Center. 在这里,搜索 Windows 计算机的 SAP HANA 客户端。From there, search for the SAP HANA CLIENT for Windows computers. 由于 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 数据库时,指定服务器名称和端口,格式为服务器:端口 - 下图显示名称为 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.

在此版本中,DirectQuery 中的 SAP HANA 模式受 Power BI Desktop 和 Power BI Serivice 的支持 ,并且你可以向 Power BI 服务发布和上传 DirectQuery 模式中使用的 SAP HANA 的报表。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 信息模型(如 Analytic 和 Calc 视图),并具有经过优化的导航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