使用 Azure 门户为 Azure 时序见解 Gen1 环境创建引用数据集Create a reference data set for your Azure Time Series Insights Gen1 environment using the Azure portal

本文介绍了如何向 Azure 时序见解环境添加引用数据集。This article describes how to add a reference data set to your Azure Time Series Insights environment. 引用数据可用于联接到源数据以增强值。Reference data is useful to join to your source data to augment the values.

参考数据集是各种项的集合,这些项对事件源中的事件进行了增强。A Reference Data Set is a collection of items that augment the events from your event source. Azure 时序见解入口引擎将事件源中的每个事件与参考数据集中的相应数据行联接到一起。Azure Time Series Insights ingress engine joins each event from your event source with the corresponding data row in your reference data set. 然后即可使用此增强的事件进行查询。This augmented event is then available for query. 该联接基于在参考数据集中定义的主键列。This join is based on the Primary Key column(s) defined in your reference data set.

参考数据不以追溯方式进行联接。Reference data is not joined retroactively. 因此,在配置并上传数据后,只会将当前和将来的流入数据匹配并联接到参考数据集。Thus, only current and future ingress data is matched and joined to the reference date set, once it has been configured and uploaded.

添加引用数据集Add a reference data set

  1. 登录到 Azure 门户Sign in to the Azure portal.

  2. 查找现有的 Azure 时序见解环境。Locate your existing Azure Time Series Insights environment. 在 Azure 门户左侧的菜单中,选择“所有资源”。Select All resources in the menu on the left side of the Azure portal. 选择 Azure 时序见解环境。Select your Azure Time Series Insights environment.

  3. 选择“概述”页面。Select the Overview page. 展开页面顶部附近的“概要”部分,找到“时序见解资源管理器 URL”并打开链接 。Expand the Essentials section near the top of the page to locate the Time Series Insights Explorer URL and open the link.

    展开“概要”部分Expand Essentials section

    查看 Azure 时序见解环境的资源管理器。View the Explorer for your Azure Time Series Insights environment.

  4. 在 Azure 时序见解资源管理器中展开环境选择器。Expand the environment selector in the Azure Time Series Insights Explorer. 选择活动的环境。Choose the active environment. 选择资源管理器页面右上角的参考数据图标。Select the reference data icon on the upper right in the Explorer page.

    添加参考数据Add reference data

  5. 选择“+ 添加数据集”按钮以开始添加新数据集。Select the + Add a data set button to begin adding a new data set.

    添加数据集Add data set

  6. 在“新建参考数据集”页面上,选择数据格式:On the New reference data set page, choose the format of the data:

    • 选择“CSV”表示以逗号分隔的数据。Choose CSV for comma-delimited data. 第一行被视为标题行。The first row is treated as a header row.
    • 对于 JavaScript 对象表示法 (JSON) 格式的数据,请选择“JSON 数组”。Choose JSON Array for JavaScript object notation (JSON) formatted data.

    选择数据格式。Choose data format.

  7. 使用下列两种方法之一提供数据:Provide the data, using one of the two methods:

    • 将数据粘贴到文本编辑器中。Paste the data into the text editor. 然后,选择“分析参考数据”按钮。Then, select Parse reference data button.
    • 选择“选择文件”按钮来从本地文本文件添加数据。Select Choose File button to add data from a local text file.

    例如,粘贴 CSV 数据:粘贴的 CSV 数据For example, paste CSV data: Pasted CSV data

    例如,粘贴 JSON 数组数据:粘贴 JSON 数据For example, paste JSON array data: Paste JSON data

    如果分析数据值时发生错误,则错误将以红色显示在页面底部,例如 CSV parsing error, no rows extractedIf there is an error parsing the data values, the error appears in red at the bottom of the page, such as CSV parsing error, no rows extracted.

  8. 在成功分析数据后,会显示一个数据网格,其中显示了表示数据的行和列。Once the data is successfully parsed, a data grid is shown displaying the columns and rows representing the data. 查看数据网格以确保正确性。Review the data grid to ensure correctness.

    查看参考数据Review reference data

  9. 查看每个列以了解所采用的数据类型,并根据需要更改数据类型。Review each column to understand the data type assumed, and change the data type if needed. 在列标题中选择数据类型符号: # 表示双精度(数字数据)、T|F 表示布尔值,Abc 表示字符串。Select the data type symbol in the column heading: # for double (numerical data), T|F for boolean, or Abc for string.

    在列标题上选择数据类型。Choose data types on the column headings.

  10. 如果需要,重命名列标题。Rename the column headers if needed. 键列名称是联接到事件源中的对应属性所必需的。The key column name is necessary to join to the corresponding property in your event source.


    请确保参考数据键列名称与传入数据中的事件名称完全匹配,包括区分大小写。Ensure that the reference data key column names match exactly to the event name to your incoming data, including case-sensitivity. 非键列名称用来使用对应的参考数据值增强传入数据。The non-key column names are used to augment the incoming data with the corresponding reference data values.

  11. 根据需要在“筛选行...”字段中键入一个值来查看特定行。Type a value in the Filter the rows... field to review specific rows as needed. 筛选器适合用来查看数据,但在上传数据时不会应用。The filter is useful for reviewing data, but is not applied when uploading the data.

  12. 通过填写数据网格上方的“数据集名称”字段为数据集命名。Name the data set, by filling in the Data set name field above the data grid.

    为数据集命名。Name the data set.

  13. 通过选择数据网格上方的下拉列表,提供数据集中的主键列。Provide the Primary Key column in the data set, by selecting the drop-down above the data grid.

    选择键列。Select the key column(s).

    (可选)选择 + 按钮,将一个辅键列添加为复合主键 。(Optional) Select the + button to add a secondary key column, as a composite primary key. 如果需要撤消选择,请从下拉列表中选择空值来删除辅键。If you need to undo the selection, choose the empty value from the drop-down to remove the secondary key.

  14. 若要上传数据,请选择“上传行”按钮。To upload the data, select the Upload rows button.

    上传行并确认数据。Upload rows and confirm data.

    页面会确认完成的上传并显示消息“已成功上传数据集”。The page confirms the completed upload and display the message Successfully uploaded dataset.


    参考数据集之间共享的列或属性将显示上传错误“属性名重复”。Columns or properties shared between reference data sets will display a Duplicate property name upload error. 此错误不会阻止参考数据集的成功上传。The error will not prevent the successful upload of the reference data sets. 合并共享重复的属性名的行即可删除该错误。It can be removed by combining rows sharing the duplicated property name.

  15. 选择“添加行”、“批量导入行”或“添加列”,根据需要添加更多的参考数据值。Select Add a row, Bulk import rows, or Add a column to add more reference data values, as needed.

    添加行,批量导入行或添加列。Add a row, Bulk import rows, or Add a column.


    任何与另一行共享唯一键的行,其列都将由最后添加的共享该唯一键的行替代。Any row that shares a unique key with another row will have its columns overridden by the last row added that shares that unique key.


    添加的行不必为矩形 - 与参考数据集中的其他项相比,它们的列可以更少、更大或不同。Added rows do not need to be rectangular - they may have fewer, greater, or varying columns from the other entries in the reference data set.

后续步骤Next steps