跳转至

Timestamp sequence(时间戳序列(Timestamp sequence))

Supported in: Batch, Faster

Creates an array with timestamps in range from start to end.

Expression categories: Datetime

Declared arguments

  • End time: The timestamp to end at (inclusive).
    Expression\
  • Start time: The timestamp to start from (inclusive).
    Expression\
  • Step unit: Unit of the step size.
    Enum\
  • optional Step size: The size of the steps between numbers. Defaults to 1.
    Expression\

Output type: Array\

Examples

Example 1: Base case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1.0
start_time end_time Output
2023-01-01T00:00:00Z 2023-01-03T00:00:00Z [ 2023-01-01T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-03T00:00:00Z ]
2023-01-01T01:50:00Z 2023-01-03T00:00:00Z [ 2023-01-01T01:50:00Z, 2023-01-02T01:50:00Z ]

Example 2: Base case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1
start_time end_time Output
2023-01-01 2023-01-03 [ 2023-01-01T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-03T00:00:00Z ]

Example 3: Base case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1.0
start_time end_time Output
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z [ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-01T00:00:00Z ]
2023-01-03T00:00:00Z 2023-01-01T01:50:00Z [ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z ]

Example 4: Null case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: 1.0
start_time end_time Output
null 2023-01-01T00:00:00Z null
null null null

Example 5: Null case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: null
start_time end_time Output
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z null
2023-01-01T01:50:00Z 2023-01-03T00:00:00Z null

Example 6: Null case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: step
start_time end_time step Output
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z 0.0 null

Example 7: Edge case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: null
start_time end_time Output
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z [ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-01T00:00:00Z ]
2023-01-01T01:50:00Z 2023-01-03T00:00:00Z [ 2023-01-01T01:50:00Z, 2023-01-02T01:50:00Z ]

Example 8: Edge case

Argument values:

  • End time: end_time
  • Start time: start_time
  • Step unit: DAYS
  • Step size: null
start_time end_time Output
2023-01-03T00:00:00Z 2023-01-03T00:00:00Z [ 2023-01-03T00:00:00Z ]


中文翻译

时间戳序列(Timestamp sequence)

支持:批处理(Batch)、快速处理(Faster)

创建一个包含从起始时间到结束时间范围内时间戳的数组。

表达式类别: 日期时间(Datetime)

声明的参数(Declared arguments)

  • 结束时间(End time): 结束的时间戳(包含)。
    表达式(Expression)\
  • 起始时间(Start time): 开始的时间戳(包含)。
    表达式(Expression)\
  • 步长单位(Step unit): 步长的单位。
    枚举(Enum)\
  • 可选 步长(Step size): 数值之间的步长大小。默认值为1。
    表达式(Expression)\

输出类型: 数组(Array)\

示例(Examples)

示例1:基本情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: 1.0
start_time end_time 输出(Output)
2023-01-01T00:00:00Z 2023-01-03T00:00:00Z [ 2023-01-01T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-03T00:00:00Z ]
2023-01-01T01:50:00Z 2023-01-03T00:00:00Z [ 2023-01-01T01:50:00Z, 2023-01-02T01:50:00Z ]

示例2:基本情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: 1
start_time end_time 输出(Output)
2023-01-01 2023-01-03 [ 2023-01-01T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-03T00:00:00Z ]

示例3:基本情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: 1.0
start_time end_time 输出(Output)
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z [ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-01T00:00:00Z ]
2023-01-03T00:00:00Z 2023-01-01T01:50:00Z [ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z ]

示例4:空值情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: 1.0
start_time end_time 输出(Output)
null 2023-01-01T00:00:00Z null
null null null

示例5:空值情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: null
start_time end_time 输出(Output)
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z null
2023-01-01T01:50:00Z 2023-01-03T00:00:00Z null

示例6:空值情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: step
start_time end_time step 输出(Output)
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z 0.0 null

示例7:边界情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: null
start_time end_time 输出(Output)
2023-01-03T00:00:00Z 2023-01-01T00:00:00Z [ 2023-01-03T00:00:00Z, 2023-01-02T00:00:00Z, 2023-01-01T00:00:00Z ]
2023-01-01T01:50:00Z 2023-01-03T00:00:00Z [ 2023-01-01T01:50:00Z, 2023-01-02T01:50:00Z ]

示例8:边界情况

参数值:

  • 结束时间: end_time
  • 起始时间: start_time
  • 步长单位: DAYS
  • 步长: null
start_time end_time 输出(Output)
2023-01-03T00:00:00Z 2023-01-03T00:00:00Z [ 2023-01-03T00:00:00Z ]