Power BIPower BI

重要

已集成到 Power BI Desktop 版本 2.85.681.0 及更高版本中的 Azure Databricks 连接器处于公共预览阶段。The Azure Databricks connector that is integrated in Power BI Desktop version 2.85.681.0 and above is in Public Preview.

Microsoft Power BI 是一种业务分析服务,它使用自助式商业智能功能提供交互式可视化效果,使最终用户能够自行创建报表和仪表板,而无需依赖于信息技术人员或数据库管理员。Microsoft Power BI is a business analytics service that provides interactive visualizations with self-service business intelligence capabilities, enabling end users to create reports and dashboards by themselves without having to depend on information technology staff or database administrators.

将 Azure Databricks 作为数据源与 Power BI 配合使用时,可以将 Azure Databricks 的性能和技术优势带给所有业务用户(而不是仅带给数据科学家和数据工程师)。When you use Azure Databricks as a data source with Power BI, you can bring the advantages of Azure Databricks performance and technology beyond data scientists and data engineers to all business users.

可以使用内置 Azure Databricks 连接器将 Power BI Desktop 连接到 Azure Databricks 群集。You can connect Power BI Desktop to your Azure Databricks clusters using the built-in Azure Databricks connector.

要求Requirements

Power BI Desktop 2.85.681.0 或更高版本。Power BI Desktop 2.85.681.0 or above. 下载最新版本Download the latest version.

连接到 Azure DataBricksConnect to Azure Databricks

  1. 在 Azure Databricks 中,获取群集的服务器主机名和 HTTP 路径:In Azure Databricks, get your cluster’s server hostname and HTTP path:

    单击左侧导航栏中的“群集”图标,然后从群集列表中选择你的群集。Click the Clusters icon in the left navigation, then select your cluster from the clusters list. 在群集配置页面上,单击“高级选项”切换开关和“JDBC/ODBC”选项卡 。复制“服务器主机名”和“HTTP 路径”。On the cluster configuration page, click the Advanced Options toggle and the JDBC/ODBC tab. Copy the Server Hostname and HTTP Path.

    JDBC-ODBC 选项卡JDBC-ODBC tab

    有关详细信息,请参阅服务器主机名、端口、HTTP 路径和 JDBC URLFor more information, see Server hostname, port, HTTP path, and JDBC URL.

  2. 在 PowerBI Desktop 中,转到“获取数据 > Azure”,并选择“Azure Databricks”连接器。In PowerBI Desktop, go to Get Data > Azure and select the Azure Databricks connector.

    “获取数据”列表中的 Databricks 连接器Databricks connector in Get Data list

  3. 单击“连接”。Click Connect.

  4. 粘贴从 Azure Databricks 群集配置页复制的“服务器主机名”和“HTTP 路径”。Paste the Server Hostname and HTTP Path that you copied from the Azure Databricks cluster configuration page.

    Databricks JDBC/ODBC 配置Databricks JDBC/ODBC configuration

  5. 选择你的数据连接模式。Select your Data Connectivity mode.

    有关导入和 DirectQuery 之间的差异的信息,请参阅在 Power BI Desktop 中使用 DirectQueryFor information about the difference between import and DirectQuery, see Use DirectQuery in Power BI Desktop.

  6. 单击“确定”。Click OK.

  7. 在身份验证提示下,选择要用于登录到 Azure Databricks 的方式:At the authentication prompt, select the way you want to log in to Azure Databricks:

    Azure Active Directory:使用 Azure 帐户凭据。Azure Active Directory: Use your Azure account credentials. 单击“登录”按钮。Click the Sign in button. 在登录对话框中,输入 Azure 帐户用户名(电子邮件、电话号码或 Skype)。In the sign-in dialog, enter your Azure account username (email, phone, or Skype).

    个人访问令牌:使用 Azure Databricks 生成的个人访问令牌。Personal Access Token: Use your Azure Databricks-generated personal access token. 若要获取一个这样的令牌,请参阅使用 Azure Databricks 个人访问令牌进行身份验证To get one, follow the instructions in Authentication using Azure Databricks personal access tokens.

    备注

    对 Azure Databricks 的访问未启用用户名/密码身份验证。Username / Password authentication is not enabled for access to Azure Databricks. 建议使用 Azure Active Directory 身份验证。It is recommended that you use Azure Active Directory authentication.

  8. 单击“连接”。Click Connect.

  9. 从 Power BI 导航器中选择要查询的 Azure Databricks 数据Select the Azure Databricks data you want to query from the Power BI Navigator

    Power BI NavigatorPower BI Navigator