跳转至

Data model(数据模型)

Card input and output types

A Quiver analysis is constructed through a number of cards that can depend on each other, forming an analysis graph. Every card in Quiver can take zero or more inputs and produces an output of a specific type.

For example:

  • A numeric aggregation card takes an object set as input and produces a number as output.
  • A rolling aggregate plot takes a time series as input and produces a time series as output.
  • A number to date card takes a number as input and produces a time as output.

View the full list of input/output types.

A card can only be added as an input to another card if that card's output type is equal to the downstream card's input type. Sometimes, a conversion card must be added between two cards if their input/output types do not match.

For example, a filter object set cannot be directly passed as input to an object property because the filter object set produces an object set as output, and an object property takes a single object as input. To resolve this, an object selector must be placed in between the two cards, as the object selector takes an object set as input and produces a single object as output.

Understanding a card's output type, and which downstream cards it can be used in is a very important concept in Quiver. Fortunately, Quiver's next actions menu, which is shown when hovering over a card, helps simplify this problem. It only shows cards that are able to take your current card's output type as input. The type being used by the next action menu is shown in the top right of the menu.

The input type options for the next actions menu card.

Additionally, When configuring variable inputs for a Quiver card in the editor, only cards with compatible output types are shown for selection. For example, in the image below, when configuring the input number for a number to date card, we are able to select the numeric parameter as input ($I), but not the string parameter ($H).

The input type for card editor options.

List of input and output types

The full list of Quiver supported input and output types is provided below.

Type Description
Object set A set of objects backed by the Ontology. Useful for simple, responsive analysis at medium scale.
Single object A single object in the Ontology.
Categorical chart A chart consisting of (string, number) or (string, string, number) values.
Object selection A card that supports selecting objects through interaction.
Pivot table Tabular data resulting from a pivot table aggregation.
Ontology SQL A SQL query result from querying ontology object data. Can be converted to a transform table for further analysis.
Transform table A local table used for flexible, low scale analysis. Can be used to transform, edit, or convert between different data types.
Materialization A dataset-backed materialization of objects used for flexible, high scale analysis.
Time series A time series consisting of (value, timestamp) "ticks". Useful for high frequency, time-based analysis.
Time series chart An interactive, time-based chart that can visualize time series, time ranges, event sets, and points in time.
Time series group A group of time series that can be visualized or transformed together.
Bounded time series A region bounded by an upper time series and a lower time series.
Event set A set of events with start and end times.
Time scatter plot Data returned from a time series scatter plot.
String A single string value.
Number A single numeric value.
Time A single date/time value.
Boolean A single boolean value.
Duration unit A unit of time (millisecond, second, minute, hour, day, week).
String array An array of string values.
Number array An array of numeric values.
Time array An array of date/time values.
Boolean array An array of boolean values.
Numeric range A range consisting of a starting numeric value and an ending numeric value.
Time range A range consisting of a starting date/time value and an ending date/time value.
X/Y range A set of two ranges, used to create a "box" on a chart.
Flow start Indicator that a card does not take any inputs.
Flow end Indicator that a card does not produce an output type.

View input and output type information

The possible input types and the returned output type for each card are annotated as input_types to output_types next to each operation in the next actions menu.

The input and output type for each card in the next actions menu.

The same input_types to output_types annotation is also used in the cards search window:

The input and output type for each card in the cards search window.

The output type of each Quiver card is also shown in the card header.

The card output type in a card's header.


中文翻译

数据模型

卡片输入与输出类型

Quiver分析通过多个可相互依赖的卡片构建,形成分析图谱。Quiver中的每张卡片可接受零个或多个输入,并生成特定类型的输出。

例如:

查看输入/输出类型的完整列表。

只有当某张卡片的输出类型与下游卡片的输入类型匹配时,该卡片才能作为另一张卡片的输入。有时,若两张卡片的输入/输出类型不匹配,则需在它们之间添加转换卡片。

例如,过滤对象集(Filter Object Set)不能直接作为对象属性(Object Property)的输入,因为过滤对象集输出的是对象集,而对象属性需要单个对象作为输入。为解决此问题,必须在两者之间放置对象选择器(Object Selector),因为对象选择器以对象集为输入,输出单个对象。

理解卡片的输出类型及其可用于哪些下游卡片,是Quiver中非常重要的概念。幸运的是,Quiver的下一步操作菜单(Next Actions Menu)(悬停于卡片上时显示)可简化此问题。该菜单仅显示能够接受当前卡片输出类型作为输入的卡片。下一步操作菜单所使用的类型显示在菜单右上角。

下一步操作菜单卡片的输入类型选项。

此外,在编辑器中配置Quiver卡片的变量输入时,仅显示具有兼容输出类型的卡片供选择。例如,在下图中,配置数值转日期(Number to Date)卡片的输入数值时,我们可以选择数值参数作为输入($I),但不能选择字符串参数($H)。

卡片编辑器选项的输入类型。

输入与输出类型列表

以下是Quiver支持的输入与输出类型的完整列表。

类型 描述
对象集(Object Set) 由本体论(Ontology)支持的一组对象。适用于中等规模下简单、响应迅速的分析。
单个对象(Single Object) 本体论(Ontology)中的单个对象。
分类图表(Categorical Chart) 由(字符串, 数值)或(字符串, 字符串, 数值)值组成的图表。
对象选择(Object Selection) 支持通过交互选择对象的卡片。
数据透视表(Pivot Table) 数据透视表聚合生成的表格数据。
本体SQL(Ontology SQL) 查询本体对象数据得到的SQL查询结果。可转换为转换表(Transform Table)以进行进一步分析。
转换表(Transform Table) 用于灵活、小规模分析的本地表。可用于转换、编辑或在不同数据类型间转换。
物化(Materialization) 基于数据集的对象物化,用于灵活、大规模分析。
时间序列(Time Series) 由(数值, 时间戳)"刻度"组成的时间序列。适用于高频、基于时间的分析。
时间序列图表(Time Series Chart) 交互式、基于时间的图表,可可视化时间序列、时间范围、事件集和时间点。
时间序列组(Time Series Group) 可一起可视化或转换的一组时间序列。
有界时间序列(Bounded Time Series) 由上时间序列和下时间序列界定的区域。
事件集(Event Set) 具有开始和结束时间的事件集合。
时间散点图(Time Scatter Plot) 从时间序列散点图返回的数据。
字符串(String) 单个字符串值。
数值(Number) 单个数值。
时间(Time) 单个日期/时间值。
布尔值(Boolean) 单个布尔值。
持续时间单位(Duration Unit) 时间单位(毫秒、秒、分钟、小时、天、周)。
字符串数组(String Array) 字符串值的数组。
数值数组(Number Array) 数值的数组。
时间数组(Time Array) 日期/时间值的数组。
布尔数组(Boolean Array) 布尔值的数组。
数值范围(Numeric Range) 由起始数值和结束数值组成的范围。
时间范围(Time Range) 由起始日期/时间和结束日期/时间组成的范围。
X/Y范围(X/Y Range) 一组两个范围,用于在图表上创建"框"。
流程起点(Flow Start) 表示卡片不接受任何输入。
流程终点(Flow End) 表示卡片不产生输出类型。

查看输入与输出类型信息

每张卡片可能的输入类型和返回的输出类型在下一步操作菜单(Next Actions Menu)中标注为input_typesoutput_types,位于每个操作旁边。

下一步操作菜单中每张卡片的输入和输出类型。

同样的input_typesoutput_types标注也用于卡片搜索窗口(Cards Search Window)

卡片搜索窗口中每张卡片的输入和输出类型。

每张Quiver卡片的输出类型也显示在卡片标题中。

卡片标题中的卡片输出类型。