跳转至

Parameters(参数(Parameters))

Parameters are global values that can be used in multiple transforms in a pipeline. Updating a parameter value can modify many transforms at once.

Create and edit parameters

Create, edit, and delete parameters in the Parameters view, accessible from the parameters button at the top of the graph. Creating a new parameter requires setting a parameter name and parameter type and defining a value. Exsiting parameter can also be edited or deleted in the Parameters view.

Editing a parameter allows users to modify many transforms at once if a parameter is used in multiple transforms; editing parameter logic will result in a logic change across all transforms in which the parameter is used.

It is possible to create a parameter without a value to use as a placeholder while working on a pipeline; when used in a transform, such parameters will resulte in errors to the transform, and the pipeline cannot be deployed until a value is added.

Parameter types

  • Constant values: Constant value parameters require a column type and a value. These parameters can be used as input values in any transform that allows for the value’s set column type.
  • Regex: Regex parameters require a regex expression and can be used as input in transforms for which regex expressions are enabled.
  • Struct locator: Struct locator parameters are strings and can be used to point to an element in a struct.
  • Column: Column parameters are column placeholders that can be used as an input in the column selector of transforms. Column parameters can point to an existing column by its name, but the existence which will first be verified in each transform in which the parameter is used.
  • Expression: Expression type parameters are blank Pipeline Builder expressions and can be used as expression placeholders.

中文翻译

参数(Parameters)

参数是全局值,可在管道(Pipeline)中的多个转换(Transforms)中使用。更新参数值可以同时修改多个转换。

创建和编辑参数

参数视图中创建、编辑和删除参数,该视图可通过图顶部的参数按钮访问。创建新参数需要设置参数名称和参数类型,并定义一个值。现有的参数也可以在参数视图中进行编辑或删除。

如果一个参数被用于多个转换中,编辑该参数允许用户一次性修改多个转换;编辑参数逻辑将导致所有使用该参数的转换发生逻辑变更。

在处理管道时,可以创建一个不带值的参数作为占位符;当在转换中使用此类参数时,会导致转换出错,并且在添加值之前无法部署该管道。

参数类型

  • 常量值(Constant values): 常量值参数需要指定列类型和值。这些参数可用作任何允许该值所设列类型的转换的输入值。
  • 正则表达式(Regex): 正则表达式参数需要一个正则表达式,可用作启用了正则表达式的转换的输入。
  • 结构定位器(Struct locator): 结构定位器参数是字符串,可用于指向结构体(Struct)中的某个元素。
  • 列(Column): 列参数是列占位符,可用作转换的列选择器中的输入。列参数可以通过名称指向现有列,但在每个使用该参数的转换中,系统会首先验证该列是否存在。
  • 表达式(Expression): 表达式类型参数是空白的 Pipeline Builder 表达式,可用作表达式占位符。