使用增强的数据集元数据(预览)Using enhanced dataset metadata (preview)

Power BI Desktop 创建报表时,还会使用相应的 PBIX 和 PBIT 文件创建数据集元数据。When Power BI Desktop creates reports, it also creates dataset metadata in the corresponding PBIX and PBIT files. 以前,元数据以特定于 Power BI Desktop 的格式存储。Previously the metadata was stored in a format that was specific to Power BI Desktop. 它使用 Base-64 编码的 M 表达式和数据源,并对元数据的存储方式进行了假设。It used base-64 encoded M expressions and data sources, and assumptions were made about how that metadata was stored.

随着增强的数据集元数据功能的发布,许多这些限制都已消除。With the release of the enhanced dataset metadata feature, many of these limitations are removed. 启用增强的数据集元数据功能后,由 Power BI Desktop 创建的元数据根据表格对象模型Tabular Object Model使用与 Analysis Services 表格模型使用的格式相似的格式。With the enhanced dataset metadata feature enabled, metadata created by Power BI Desktop uses a format similar to what is used for Analysis Services tabular models, based on the Tabular Object Model.

增强的数据集元数据功能具有战略性和基础性,因为未来的 Power BI 功能将基于其元数据构建。The enhanced dataset metadata feature is strategic and foundational, because future Power BI functionality will be built upon its metadata. 始终都可从增强的数据集元数据中获益的一些其他功能包括用于管理 Power BI 数据集的 XMLA 读/写,以及将 Analysis Services 工作负载迁移到 Power BI 以受益于下一代功能。Some additional capabilities that stand to benefit from enhanced dataset metadata include XMLA read/write for management of Power BI datasets, and the migration of Analysis Services workloads to Power BI to benefit from next-generation features.

启用增强的数据集元数据Enable enhanced dataset metadata

增强的数据集元数据功能目前为预览版。The enhanced dataset metadata feature is currently in preview. 要启用增强的数据集元数据,请在 Power BI Desktop 中选择“文件”>“选项和设置”>“选项”>“预览功能”,然后选中“使用增强的元数据格式存储数据集”复选框,如下图所示 。To enable enhanced dataset metadata, in Power BI Desktop select File > Options and settings > options > preview features, and then select the Store datasets using enhanced metadata format checkbox, as shown in the following image.

启用预览功能

系统会提示你重启 Power BI Desktop。You'll be prompted to restart Power BI Desktop.

重启提示

启用预览功能后,Power BI Desktop 会尝试升级使用以前的元数据格式的 PBIX 和 PBIT 文件。Once the preview feature is enabled, Power BI Desktop attempts to upgrade PBIX and PBIT files that use the previous metadata format.

重要

启用“增强型数据集元数据”功能会导致不可逆地升级报表。Enabling the enhanced dataset metadata feature results in an irreversible upgrade to reports. 在启用“增强型数据集元数据”后,任何使用 Power BI Desktop 加载或创建的 Power BI 报表都会不可逆地转换为增强型数据集元数据格式。Any Power BI reports loaded or created with Power BI Desktop, once the enhanced dataset metadata enabled, are irreversibly converted to the enhanced dataset metadat format.

报表备份文件Report backup files

将报表更新为使用“增强的数据集元数据”功能是不可逆的。Updating a report to use the enhanced dataset metadata feature is irreversible. 但在更新过程中,会创建报表备份文件,以保存一个原始格式(更新前)的报表版本。During the update, however, a report backup file is create to save a version of the report in its original (pre-update) format. 备份文件将在 30 天后删除。The backup file is removed after 30 days.

若要查找备份报表文件,请执行以下操作:To locate the backup report file, do the following:

  1. 导航到以下位置:C:\Users\<user>\AppData\Local\Microsoft\Power BI Desktop\TempSaves\BackupNavigate to the following location: C:\Users\<user>\AppData\Local\Microsoft\Power BI Desktop\TempSaves\Backup. 如果使用 Power BI Desktop 的 Microsoft Store 版本,还可以使用以下位置:C:\Users\<user>\Microsoft\Power BI Desktop Store App\TempSaves\BackupsIf using the Microsoft Store version of Power BI Desktop, use the following location: C:\Users\<user>\Microsoft\Power BI Desktop Store App\TempSaves\Backups

  2. 使用原始文件的名称和时间戳查找报表的副本。Find a copy of the report there with the name and time stamp of the original file.

  3. 将该文件复制到想要保留的位置。Copy the file to a location you would prefer, in order to preserve it.

  4. 如果选择打开或使用原始文件,请确保在 Power BI Desktop 中禁用“增强的元数据格式”预览功能。Make sure the Enhanced metadata format preview feature is disabled in Power BI Desktop if you choose to open or use that original file.

备份文件是在升级报表时创建的,因此不包含升级之后所做的任何更改。The backup file is created when the report is upgraded, so any changes made after the upgrade are not included. 启用“增强的元数据格式”功能时创建的新报表没有备份文件。New reports created when the Enhanced metadata format feature is enabled do not have a backup file.

注意事项和限制Considerations and limitations

在预览版中,启用预览功能时存在以下限制。In the preview version, the following limitations apply when the preview feature is enabled.

不支持的功能和连接器Unsupported features and connectors

存在以下限制:The following limitations apply:

打开尚未升级的现有 PBIX 或 PBIT 文件时,如果数据集包含以下任何功能或连接器,则升级将失败。Upon opening an existing PBIX or PBIT file that hasn't been upgraded, the upgrade will fail if the dataset contains any of the following features or connectors. 如果发生此类失败,不会对用户体验产生直接影响,Power BI Desktop 继续使用以前的元数据格式。If such failure happens, there should be no immediate impact to the user experience, and Power BI Desktop continues to use the previous metadata format.

  • 所有自定义连接器(2020 年 5 月版本限制)All custom connectors (May 2020 release limitation)
  • Python 脚本Python scripts
  • Azure DevOps ServerAzure DevOps Server
  • BI 连接器BI Connector
  • DenodoDenodo
  • DremioDremio
  • ExasolExasol
  • IndeximaIndexima
  • IRISIRIS
  • Jethro ODBCJethro ODBC
  • Kyligence EnterpriseKyligence Enterprise
  • MarkLogic ODBCMark Logic ODBC
  • Qubole PrestoQubole Presto
  • Team DeskTeam Desk
  • M 表达式,其中包含某些字符组合,如列名称中的“\n”M expressions containing certain character combinations such as "\n" in column names
  • 使用启用了“增强的数据集元数据”功能的数据集时,无法在 Power BI 服务中设置单一登录 (SSO) 数据源When using datasets with the enhanced dataset metadata feature enabled, Single Sign On (SSO) data sources cannot be set up in the Power BI service

如果使用的是 2020 年 6 月版 Power BI Desktop(或更高版本),则 Power BI Desktop 和 Power BI 服务支持所有自定义连接器和所有内置连接器。If you are using the June 2020 release of Power BI Desktop (or later), all custom connectors and all built-in connectors are supported for Power BI Desktop and the Power BI service. 发布期间,如果使用的是 2020 年 6 月版或更高版本,则在网关遇到问题时,数据集将成功发布,但用户必须重新发布报表才能刷新数据。During the publish process when using the June 2020 release or later, if the gateway encounters issues then the dataset will successfully publish, but users must republish the report in order to refresh the data. “数据源设置”对话框是发布过程中出现问题的唯一指示器。The Data source settings dialog is the only indicator that issues occurred with the publishing process.

使用不支持的连接器或功能的报表不会升级为新格式。Reports that use unsupported connectors or features will not be upgraded to the new format. 对于已升级的报表或在启用此新功能之后创建的报表,将不支持添加所列出的不受支持的功能或连接器。Reports that have already been upgraded, or that were created subsequent to enabling this new feature, will not support adding the listed unsupported features or connectors.

不支持包含动态数据源的查询。Queries with dynamic datasources are not supported. 具有动态数据源的报表将不会升级为新格式,并且已升级的报表或在启用该功能的情况下新创建的报表将不支持添加动态数据源。Reports that have dynamic datasources will not be upgraded to the new format, and reports that have already been upgraded or were newly created with the feature enabled will not support adding dynamic datasources. 如果源随着参数、函数输入或可变函数而发生变化,则查询具有动态数据源。A query has a dynamic datasource if the source changes depending on a parameter, function input, or volatile function.

不支持在上游步骤或分支中出现错误的查询。Queries with errors in upstream steps or branches are not supported.

此外,已成功升级为使用“增强的数据集元数据”的 PBIX 和 PBIT 文件无法使用上述功能(或任何不受支持的连接器)。In addition, PBIX and PBIT files that have already been successfully upgraded to use enhanced dataset metadata cannot use the above features (or any unsupported connectors).

世系视图Lineage view

使用新元数据格式的数据集当前不会在 Power BI 服务的沿袭视图中显示指向数据流的链接。Datasets using the new metadata format currently don't show links to dataflows in the lineage view in the Power BI service.