启用实时连接问答Enable Q&A for live connections

什么是本地数据网关?What is on-premises data gateway? 什么是实时连接?What is a live connection?

可以将 Power BI 中的数据集导入到 Power BI,也可以创建与它们的实时连接。Datasets in Power BI can be imported into Power BI or you can create a live connection to them. 实时连接数据集通常被称为“本地”。Live connection datasets are often referred to as "on-premises". 使用网关管理实时连接并使用实时查询来回发送数据和查询。The live connections are managed using a gateway and data and inquiries are sent back and forth using live queries.

关于本地数据网关数据集的问答Q&A for on-premises data gateway datasets

如果你想要使用通过网关访问的数据集中的问答,首先你需要启用它们。If you'd like to use Q&A with datasets you access through a gateway, you'll need to enable them first.

启用后,Power BI 将创建数据源的索引,并将该数据的子集上传到 Power BI 以启用提问功能。Once enabled, Power BI creates an index of your data source and uploads a subset of that data to Power BI to enable asking questions. 创建初始索引可能会需要几分钟时间,当数据更改时,Power BI 会自动维护并更新索引。It may take several minutes to create the initial index and Power BI maintains and updates the index automatically as your data changes. 使用这些数据集的问答与使用发布到 Power BI 的数据方式是一样的。Using Q&A with these datasets behaves the same as with data published to Power BI. 这两种情况都支持问答体验的全套功能,包括同时使用数据源和 Cortana。The full set of features available in the Q&A experience is supported in both cases, including using the data source with Cortana.

在 Power BI 中提问后,问答通过使用你的数据集索引确定要构建的最佳视觉对象和用于回答问题的报表工作表。As you ask questions in Power BI, Q&A determines the best visual to construct or report sheet to use to answer your question using an index of your dataset. 确定最佳可能答案之后,问答将使用 DirectQuery 通过网关填充图表和图形获取数据源中的实时数据。After determining the best potential answer, Q&A uses DirectQuery to fetch live data from the data source via the gateway to populate charts and graphs. 这可确保 Power BI 问答的结果始终显示直接来自于基础数据源的最新数据。This ensures Power BI Q&A results always show the most up-to-date data directly from the underlying data source.

由于 Power BI 问答使用你数据源中的文本和架构值来确定如何查询答案的基础模型,因此搜索特定的新的或已删除文本值(如询问与新添加的文本记录相关的客户名称)取决于用最新的值及时更新索引。Since Power BI Q&A uses the text and schema values from your data source to determine how to query the underlying model for answers, searches for specific new or deleted text values (such as asking for a customer name related to a newly added text record) rely on the index being up-to-date with the latest values. Power BI 在 60 分钟窗口切换时间内自动使文本和架构索引保持最新。Power BI automatically keeps the text and schema index up to date within a 60 minute window of changes.

有关详细信息,请参阅:For more information, see:

启用问答Enable Q&A

设置数据网关后,请从 Power BI 连接数据。Once you have the data gateway set up, connect to your data from Power BI. 使用本地数据创建仪表板,或使用本地数据上传 .pbix 文件。Either create a dashboard using your on-premises data, or upload a .pbix file that uses on-premises data. 可能已与你共享的仪表板、报表和数据集中已存在本地数据。You may also already have on-premises data in dashboards, reports, and datasets that have been shared with you.

  1. 在 Power BI 的右上角,选择齿轮图标 ,然后选择设置In the upper-right corner of Power BI, select the cog icon and choose Settings.

  2. 选择数据集,然后选择要为其启用问答的数据集。Select datasets and choose the dataset to enable for Q&A.

  3. 展开问答和 Cortana,选择启用此数据集的问答复选框,然后选择应用Expand Q&A and Cortana, select the checkbox for Turn on Q&A for this dataset and choose Apply.

缓存哪些数据以及如何保护隐私?What data is cached and how is privacy protected?

当启用本地数据的问答时,数据的其中一个子集将缓存到服务中。When you enable Q&A for your on-premises data, a subset of your data is cached in the service. 这是用来保证问答具有良好的性能。This is done to ensure that Q&A works with a reasonable performance. Power BI 可以从缓存中排除长于 24 个字符的值。Power BI excludes values longer than 24 characters from caching. 当你通过取消选中启用此数据集的问答,或当你删除你的数据集时,缓存将在几小时内删除。The cache is deleted within a few hours when you disable Q&A by unchecking Turn on Q&A for this dataset, or when you delete your dataset.

注意事项和疑难解答Considerations and troubleshooting

在此功能的预览版阶段,存在以下限制:During the Preview phase of this feature, there are several limitations:

  • 最初此功能只可用于 SQL Server 2016 Analysis Services 表格数据源。Initially the feature is only available for SQL Server 2016 Analysis Services Tabular data sources. 此功能非常适合用于处理表格格式数据。The feature is optimized to work with tabular data. 某些功能可用于多维数据源,但多维数据源尚不支持完整的问答体验。Some functionality is available for multi-dimensional data sources, but the full Q&A experience is not yet supported for multi-dimensional. 今后将逐渐推出本地数据网关支持的其他数据源。Additional data sources supported by the on-premises data gateway will be rolled out over time.
  • 在最初的公共预览版中,并不完全支持 SQL Server Analysis Services 中定义的行级别安全性。Full support for row level security defined in SQL Server Analysis Services is not available initially in the public preview. 在问答中提问时,输入时“自动完成”的问题可以显示用户不能访问的字符串值。While asking questions in Q&A, the “auto-complete” of questions while typing can show string values a user does not have access to. 但是,由于考虑对在模型中定义的 RLS 使用报表和图表视觉对象,因此不能公开任何基础数值数据。However, RLS defined in the model is respected for report and chart visuals so no underlying numerical data can be exposed. 将在接下来的更新中发布选项以控制此行为。Options to control this behavior will be released in coming updates.
  • 仅在使用本地数据网关时支持实时连接。Live connections are only supported with the on-premises data gateway. 因此,这不能与个人网关一起使用。As a result, this cannot be used with the personal gateway.

后续步骤Next steps

本地数据网关On-premises data gateway
管理数据源 - Analysis ServicesManage your data source - Analysis Services
Power BI - 基本概念Power BI - Basic Concepts
Power BI 问答概述Power BI Q&A Overview

更多问题?More questions? 尝试咨询 Power BI 社区Try asking the Power BI Community