使用导入到 Microsoft Excel 中的 Azure 数据资源管理器 Kusto 查询进行数据可视化Visualize data using an Azure Data Explorer Kusto query imported into Microsoft Excel
Azure 数据资源管理器提供两个可以在 Excel 中连接到数据的选项:使用本机连接器或从 Azure 数据资源管理器导入查询。Azure Data Explorer provides two options for connecting to data in Excel: use the native connector or import a query from Azure Data Explorer. 本文介绍如何将查询从 Azure 数据资源管理器导入 Excel 以实现数据可视化。This article shows you how to import a query from Azure Data Explorer to Excel to visualize data. 将 Kusto 查询添加为 Excel 数据源,以便对数据进行其他计算或可视化操作。Add Kusto query as an Excel data source to do additional calculations or visualizations on the data.
必备条件Prerequisites
- 如果没有 Azure 订阅,请在开始前创建一个试用订阅。If you don't have an Azure subscription, create a Trial Subscription before you begin.
- 一个属于 Azure Active Directory 的组织电子邮件帐户,以便连接到 Azure 数据资源管理器帮助群集
An organizational email account that is a member of Azure Active directory, so you can connect to the Azure Data Explorer help cluster
或or - 创建测试群集和数据库并登录到 Azure 数据资源管理器 Web UI 应用程序。Create a test cluster and database and sign in to the Azure Data Explorer Web UI application.
将 Kusto 查询定义为 Excel 数据源Define Kusto query as an Excel data source
在 Azure 数据资源管理器 Web UI 中,运行此查询并查看结果。In Azure Data Explorer Web UI, run the query and check the results.
选择“共享”选项卡,然后选择“向 Power BI 查询”。 Select the Share tab and select Query to Power BI.
此时会显示一个包含以下通知的窗口:A window appears with the following notification:
打开 Microsoft Excel。Open Microsoft Excel.
在“数据” 选项卡中,选择“获取数据” > “从其他源” > “空白查询”。In the Data tab, select Get Data > From Other Sources > Blank Query.
此时会打开“Power Query 编辑器”窗口。 The Power Query Editor window opens. 在窗口中,选择“高级编辑器”。 In the window, select Advanced Editor.
在“高级编辑器”窗口中,将导出的查询粘贴到剪贴板,然后选择“完成”。 In the Advanced Editor window, paste the query you exported to the clipboard and select Done.
若要进行身份验证,请选择“编辑凭据”。 To authenticate, select Edit Credentials.
选择“组织帐户”,然后选择“登录”。 Select Organizational account and Sign in. 完成登录过程,然后选择“连接” 。Complete the sign-in process and then select Connect.
重复上述步骤,添加更多查询。Repeat the previous steps to add more queries. 可以将查询重命名为更有意义的名称。You can rename the queries to more meaningful names.
选择“关闭并加载”按钮,将数据导入 Excel。 Select the Close & Load button to get your data into Excel.
现在,数据位于 Excel 中。Now your data is in Excel. 使用“刷新”按钮,刷新查询。 Select the Refresh button to refresh the query.
后续步骤Next steps
使用 Excel 的 Azure 数据资源管理器连接器进行数据可视化Visualize data using the Azure Data Explorer connector for Excel