通过 Power BI Desktop 连接到 OData 数据源Connect to OData feeds in Power BI Desktop

在 Power BI Desktop 中,你可以连接到“OData 数据源”并在 Power BI Desktop 中同使用其他所有数据源一样使用基础数据。In Power BI Desktop, you can connect to an OData feed and use the underlying data just like any other data source in Power BI Desktop.

若要连接到 OData 数据源,请在 Power BI Desktop 的“开始”功能区中,选择“获取数据”>“OData 数据源”。To connect to an OData feed, select Get Data > OData Feed from the Home ribbon in Power BI Desktop.

在出现的“OData 数据源”窗口中,将你的 OData 数据源 URL 键入或粘贴到框中,然后选择“确定”。In the OData Feed window that appears, type or paste your OData feed URL into the box, and select OK.

Power BI Desktop 将连接到 OData 数据源,并显示可用的表和“导航器”窗口中的其他数据元素。Power BI Desktop connects to the OData feed, and displays the available tables and other data elements in the Navigator window. 选择一个元素后,“导航器”窗口的右窗格中将显示该数据的预览。When you select an element, the right pane of the Navigator window displays a preview of the data. 你可以选择导入任意数量的表。You can select as many tables as you want to import. “导航器”窗口将显示当前所选表的预览。The Navigator window shows a preview of the currently selected table.

你可以选择“编辑”按钮,启动“编辑查询器”,在其中你可以在将 OData 数据源中的数据导入 Power BI Desktop 前调整和转换该数据。You can choose the Edit button, which launches Query Editor, where you can shape and transform the data from the OData feed before importing it into Power BI Desktop. 或者也可以选择“加载”按钮,然后导入左窗格中所有选定的数据元素。Or you can select the Load button, and import all of the data elements you selected in the left pane.

当我们选择“加载”时,Power BI Desktop 将导入所选项目,并显示导入进度的“加载”窗口。When we select Load, Power BI Desktop imports the selected items, and displays a Load window of the import progress.

完成操作后,Power BI Desktop 会使所选表和其他数据元素在 Power BI Desktop 中报表视图右侧的“字段”窗格中可用。Once complete, Power BI Desktop makes the selected tables and other data elements available in the Fields pane, found on the right side of the Reports view in Power BI Desktop.

这样就大功告成了!And that’s it!

你现在已准备好在 Power BI Desktop 中使用从 OData 数据源导入的数据来创建视觉对象、报表或与你可能想要连接和导入的其他数据(如 Excel 工作簿、数据库或任何其他数据源)进行交互。You’re now ready to use the imported data from the OData feed in Power BI Desktop to create visuals, reports, or interact with any other data you might want to connect with and import, such as other Excel workbooks, databases, or any other data source.

后续步骤Next steps

你可以使用 Power BI Desktop 连接到各种数据。There are all sorts of data you can connect to using Power BI Desktop. 有关数据源的详细信息,请参阅下列资源:For more information on data sources, check out the following resources: