Power Bi 简明教程

Power BI - Supported Data Sources

Power BI 支持广泛的数据源。您可以单击“获取数据”,它将显示所有可用的数据连接。它允许您连接到不同的平面文件、SQL 数据库和 Azure 云甚至 Web 平台,例如 Facebook、Google Analytics 和 Salesforce 对象。它还包括 ODBC 连接,用于连接到其他未列出的 ODBC 数据源。

Power BI supports large range of data sources. You can click Get data and it shows you all the available data connections. It allows you to connect to different flat files, SQL database, and Azure cloud or even web platforms such as Facebook, Google Analytics, and Salesforce objects. It also includes ODBC connection to connect to other ODBC data sources, which are not listed.

以下是 Power BI 中可用的数据源−

Following are the available data sources in Power BI −

  1. Flat Files

  2. SQL Database

  3. OData Feed

  4. Blank Query

  5. Azure Cloud platform

  6. Online Services

  7. Blank Query

  8. Other data sources such as Hadoop, Exchange, or Active Directory

要在 Power BI 桌面版中获取数据,您需要单击主屏幕中的“获取数据”选项。它首先向您显示最常见的数据源。然后,单击“更多”选项以查看可用数据源的完整列表。

To get data in Power BI desktop, you need to click the Get data option in the main screen. It shows you the most common data sources first. Then, click the More option to see a full list of available data sources.

available data sources

当您点击“更多..”选项卡(如上图所示)时,您会看到一个新的导航窗口,其中左侧显示了所有可用数据源的类别。您还可以选择在顶部执行搜索。

When you click “More..” tab as shown in the above screenshot, you can see a new navigation window, where on the left side it shows a category of all available data sources. You also have an option to perform a search at the top.

more

以下是列出的各种 data sources

Following are the various data sources listed −

All

在此类别下,您可以看到 Power BI 桌面版下所有可用的数据源。

Under this category, you can see all the available data sources under Power BI desktop.

File

当您单击“文件”时,它将向您显示 Power BI 桌面版中支持的所有平面文件类型。要连接到任何文件类型,请从列表中选择文件类型,然后单击“连接”。您必须提供文件的位置。

When you click File, it shows you all flat file types supported in Power BI desktop. To connect to any file type, select the file type from the list and click Connect. You have to provide the location of the file.

file

Database

当您单击“数据库”选项时,它将显示您可以连接到的所有数据库连接的列表。

When you click the Database option, it shows a list of all the database connections that you can connect to.

database

要连接到任何数据库,请从列表中选择一个“数据库”类型,如上图所示。单击“连接”。

To connect to any database, select a Database type from the list as shown in the above screenshot. Click Connect.

您必须传递服务器名称/用户名和密码才能连接。您还可以使用“高级”选项通过直接 SQL 查询进行连接。您还可以选择连接模式——导入或 DirectQuery。

You have to pass Server name/ User name and password to connect. You can also connect via a direct SQL query using Advance options. You can also select Connectivity mode- Import or DirectQuery.

Note − 您不能在单个报表中组合导入和 DirectQuery 模式。

Note − You can’t combine import and DirectQuery mode in a single report.

Import vs DirectQuery

DirectQuery 选项限制了数据操作选项,并且数据保留在 SQL 数据库中。DirectQuery 是实时的,无需像在“导入”方法中那样计划刷新。

DirectQuery option limits the option of data manipulation and the data stays in SQL database. DirectQuery is live and there is no need to schedule refresh as in the Import method.

Import 方法允许执行数据转换和操作。当您将数据发布到 PBI 服务时,限制为 1GB。它会消耗数据并将其推送到 Power BI Azure 后端,并且可以在一天内刷新最多 8 次数据,并且可以为数据刷新设置计划。

Import method allows to perform data transformation and manipulation. When you publish the data to PBI service, limit is 1GB. It consumes and pushes data into Power BI Azure backend and data can be refreshed up to 8 times a day and a schedule can be set up for data refresh.

import method

Advantages of Using DirectQuery

  1. Using DirectQuery, you can build data visualizations on large datasets, which is not feasible to import in Power BI desktop.

  2. DirectQuery doesn’t apply any 1GB data set limit.

  3. With the use of DirectQuery, the report always shows current data.

Limitations of Using DirectQuery

  1. There is a limitation of 1 million row for returning data while using DirectQuery. You can perform aggregation of more number of rows, however, the result rows should be less than 1 million to return the dataset.

  2. In DirectQuery, all tables should come from a single database.

  3. When a complex query is used in the Query editor, it throws an error. To run a query, you need to remove the error from the query.

  4. In DirectQuery, you can use Relationship filtering only in one direction.

  5. It doesn’t support special treatment for time-related data in tables.

Azure

使用 Azure 选项,您可以在 Azure 云中连接到数据库。以下屏幕截图显示了 Azure 类别下可用的各种选项。

Using the Azure option, you can connect to the database in Azure cloud. Following screenshot shows the various options available under Azure category.

azure

Online Services

Power BI 还允许您连接到 Exchange、Salesforce、Google Analytics 和 Facebook 等各种在线服务。

Power BI also allows you to connect to different online services such as Exchange, Salesforce, Google Analytics, and Facebook.

以下屏幕截图显示了在线服务下可用的各种选项。

Following screenshots shown the various options available under Online Services.

connect online services
online services

Other

以下屏幕截图显示了其他类别中可用的各种选项。

Following screenshot shows the various options available under other category.

other category