跳转至

Clean string(清理字符串(Clean string))

Supported in: Batch, Faster, Streaming

Applies the set of clean actions on the expression.

Expression categories: Data preparation, String

Declared arguments

  • Clean actions: Set of actions to be applied.
    Set\>
  • Expression: String to be cleaned.
    Expression\

Output type: String

Examples

Example 1: Base case

Argument values:

  • Clean actions: {normalize}
  • Expression: hello world

Output: hello world


Example 2: Base case

Argument values:

  • Clean actions: {nullify_empty}
  • Expression: empty string

Output: null


Example 3: Base case

Argument values:

  • Clean actions: {trim}
  • Expression: hello world

Output: hello world


Example 4: Null case

Argument values:

  • Clean actions: {trim}
  • Expression: null

Output: null



中文翻译


清理字符串(Clean string)

支持模式:批处理(Batch)、快速处理(Faster)、流处理(Streaming)

对表达式应用指定的清理操作。

表达式类别: 数据准备(Data preparation)、字符串(String)

声明的参数

  • 清理操作(Clean actions): 需要执行的操作集合。
    Set\<Enum\<标准化空白(Normalize whitespace)、空值化(Nullify empty)、修剪(Trim)>>
  • 表达式(Expression): 需要清理的字符串。
    Expression\

输出类型: String

示例

示例1:基础情况

参数值:

  • 清理操作: {normalize}
  • 表达式: hello world

输出: hello world


示例2:基础情况

参数值:

  • 清理操作: {nullify_empty}
  • 表达式: 空字符串

输出: null


示例3:基础情况

参数值:

  • 清理操作: {trim}
  • 表达式: hello world

输出: hello world


示例4:空值情况

参数值:

  • 清理操作: {trim}
  • 表达式: null

输出: null