摘要#
¥Summarize
使用汇总节点以类似于 Excel 数据透视表的方式聚合项目。
¥Use the Summarize node to aggregate items together, in a manner similar to Excel pivot tables.
节点参数#
¥Node parameters
要汇总的字段#
¥Fields to Summarize
使用这些字段来定义你希望如何汇总输入数据。
¥Use these fields to define how you want to summarize your input data.
- 聚合:选择要对给定字段使用的聚合方法。选项包括:
¥Aggregation: Select the aggregation method to use on a given field. Options include:
-
附加:追加
¥Append: Append
- 如果你选择此选项,请决定是否包含空值。
¥If you select this option, decide whether you want to Include Empty Values or not.
-
平均值:计算输入数据的数值平均值。
¥Average: Calculate the numeric average of your input data.
-
连接:合并输入数据中的值。
¥Concatenate: Combine together values in your input data.
- 如果你选择此选项,请决定是否包含空值。
¥If you select this option, decide whether you want to Include Empty Values or not.
- 分隔符:选择要在连接值之间插入的分隔符。
¥Separator: Select the separator you want to insert between concatenated values.
-
计数:统计输入数据中值的总数。
¥Count: Count the total number of values in your input data.
-
计数唯一:统计输入数据中唯一值的数量。
¥Count Unique: Count the number of unique values in your input data.
-
最大值:找到输入数据中的最大数值。
¥Max: Find the highest numeric value in your input data.
-
最小值:找到输入数据中最小的数值。
¥Min: Find the lowest numeric value in your input data.
-
总和:将输入数据中的数值相加。
¥Sum: Add together the numeric values in your input data.
-
字段:输入要对其执行聚合操作的字段名称。
¥Field: Enter the name of the field you want to perform the aggregation on.
要拆分的字段#
¥Fields to Split By
输入要用于拆分汇总的输入字段名称(类似于 GROUP BY 语句)。此功能允许你根据其他字段的值获取单独的摘要。
¥Enter the name of the input fields that you want to split the summary by (similar to a group by statement). This allows you to get separate summaries based on values in other fields.
例如,如果我们的输入数据包含 Sales Rep 和 Deal Amount 列,并且我们要对 Deal Amount 字段进行求和,我们可以按 Sales Rep 进行拆分,从而获得每个销售代表的总和。
¥For example, if our input data contains columns for Sales Rep and Deal Amount and we're performing a Sum on the Deal Amount field, we could split by Sales Rep to get a Sum total for each Sales Rep.
要输入多个要拆分的字段,请输入以逗号分隔的列表。
¥To enter multiple fields to split by, enter a comma-separated list.
节点选项#
¥Node options
如果未找到字段则继续#
¥Continue if Field Not Found
默认情况下,如果要汇总的字段不在任何项中,则节点会抛出错误。启用此选项后,你可以选择继续并返回一个空项,或者保留默认的错误行为(禁用)。
¥By default, if a Field to Summarize isn't in any items, the node throws an error. Use this option to continue and return a single empty item (turned on) instead or keep the default error behavior (turned off).
禁用点号表示法#
¥Disable Dot Notation
默认情况下,n8n 启用点表示法,以 parent.child 格式引用子字段。使用此选项可禁用点号表示法(已启用)或继续使用点号表示法(已禁用)。
¥By default, n8n enables dot notation to reference child fields in the format parent.child. Use this option to disable dot notation (turned on) or to continue using dot (turned off).
输出格式#
¥Output Format
选择输出格式。如果你使用“拆分字段”,建议使用此选项。
¥Select the format for your output format. This option is recommended if you're using Fields to Split By
- 每个拆分项单独保存到一个项目中:使用此选项可为每个拆分出的字段生成单独的输出项。
¥Each Split in a Separate Item: Use this option to generate a separate output item for each split out field.
- 单个条目中的所有拆分:使用此选项可生成列出拆分出的字段的单个输出项。
¥All Splits in a Single Item: Use this option to generate a single item that lists the split out fields.
忽略没有有效分组字段的项#
¥Ignore items without valid fields to group by
设置是否忽略不包含“拆分依据”字段的输入项(已启用)或不忽略(已禁用)。
¥Set whether to ignore input items that don't contain the Fields to Split By (turned on) or not (turned off).
模板和示例#
¥Templates and examples
相关资源#
¥Related resources
Learn more about data structure and data flow in n8n workflows.