跳转至

Apply multiple expressions(应用多个表达式(Apply multiple expressions))

Supported in: Batch, Faster, Streaming

Transforms input dataset either by selecting columns or applying functions to columns.

Transform categories: Popular

Declared arguments

  • Columns: List of column transformations to apply to the dataset.
    List\>
  • Dataset: Dataset to apply operations to.
    Table
  • Keep remaining columns: Keeps all columns not projected in the dataset.
    Literal\

Examples

Example 1: Base case

Argument values:

  • Columns: [
    alias(
     alias: airline,
     expression: airline,
    )]
  • Dataset: ri.foundry.main.dataset.a
  • Keep remaining columns: false

Input:

airline miles
foundry airways 2500
new air 3000

Output:

airline
foundry airways
new air

Example 2: Edge case

Argument values:

  • Columns: [
    alias(
     alias: media_column,
     expression: media_ref,
    )]
  • Dataset: ri.foundry.main.dataset.a
  • Keep remaining columns: false

Input:

pk
1

Output:

media_column
media_ref


中文翻译


应用多个表达式(Apply multiple expressions)

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

通过选择列或对列应用函数来转换输入数据集。

转换类别:常用

声明参数

  • 列(Columns): 要应用于数据集的列转换列表。
    List\>
  • 数据集(Dataset): 要执行操作的数据集。
    Table
  • 保留其余列(Keep remaining columns): 保留数据集中未投影的所有列。
    Literal\

示例

示例 1:基础情况

参数值:

  • 列: [
    alias(
     alias: airline,
     expression: airline,
    )]
  • 数据集: ri.foundry.main.dataset.a
  • 保留其余列: false

输入:

airline miles
foundry airways 2500
new air 3000

输出:

airline
foundry airways
new air

示例 2:边界情况

参数值:

  • 列: [
    alias(
     alias: media_column,
     expression: media_ref,
    )]
  • 数据集: ri.foundry.main.dataset.a
  • 保留其余列: false

输入:

pk
1

输出:

media_column
media_ref