Split transform(拆分转换(Split transform))¶
The Split transform is used to partition input data into two distinct outputs based on a specified condition. This transform evaluates each row of the input data against the defined condition and directs the rows to one of the two outputs accordingly.

To use the Split transform, select any dataset node in your graph and select Split.

Condition¶
The Split transform allows you to define a condition that determines how the input data is divided. This condition is a logical expression that evaluates to either True or False.
Outputs¶
The True output will contain rows for which the condition evaluates to true. These rows are directed to the first output.
The False output will contain rows for which the condition evaluates to false. These rows are directed to the second output.
To preview the outputs, you can use the dropdown in the top left of the bottom panel. Select True to see the True output or False to see the False output.

To use the outputs in downstream transforms, select the transform, and then select either the True or False output to use as your next input.

Example¶
Consider a dataset of customer orders. You want to separate orders into two categories: high-value and low-value orders, based on a threshold value.
In this case, the Condition will be order_value > 1000.
The True output will contain orders where order_value exceeds 1000, and the
False output will contain orders where order_value does not exceed 1000.

中文翻译¶
拆分转换(Split transform)¶
拆分转换(Split transform)用于根据指定条件将输入数据划分为两个不同的输出。此转换会针对定义的条件评估输入数据的每一行,并相应地将行定向到两个输出之一。

要使用拆分转换(Split transform),请在图中的任意数据集节点上选择该节点,然后选择拆分(Split)。

条件(Condition)¶
拆分转换(Split transform)允许您定义一个条件,该条件决定了输入数据的划分方式。此条件是一个逻辑表达式,其评估结果为真(True)或假(False)。
输出(Outputs)¶
真(True)输出将包含条件评估为真的行。这些行被定向到第一个输出。
假(False)输出将包含条件评估为假的行。这些行被定向到第二个输出。
要预览输出,您可以使用底部面板左上角的下拉菜单。选择真(True)查看真输出,或选择假(False)查看假输出。

要在下游转换中使用输出,请选择该转换,然后选择真(True)或假(False)输出作为下一个输入。

示例(Example)¶
假设有一个客户订单数据集。您希望根据阈值将订单分为两类:高价值订单和低价值订单。
在此示例中,条件(Condition)为 order_value > 1000。
真(True)输出将包含 order_value 超过 1000 的订单,而假(False)输出将包含 order_value 不超过 1000 的订单。
