tencent cloud

Tencent Cloud DataBuddy

System Built-in Parameters

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-10-09 16:13:15
Traduzido por IA
Built-in Parameters are automatically maintained by DataBuddy and can be referenced in workflow parameters, task parameters, and scheduling parameters. They are commonly used to dynamically filter data by runtime, record run IDs, and trace upstream and downstream execution. This document serves as the Built-in Parameters Reference.

Reference Syntax

{{<scope>.<field>[.<sub_field>]}}
For example:
Blockquote
Description
{{workflow.id}}
Workflow ID.
{{workflow.start_time.iso_date}}
ISO 8601 date format of workflow instance data time
{{tasks.upstream_sql.output.first_row.col_a}}
Value of the col_a column in the first row of the upstream SQL task output

Workflow Parameters

Label

Parameter
Description
{{workflow.id}}
Workflow ID.
{{workflow.name}}
Workflow name
{{workflow.run_id}}
Workflow run ID (unique for each run)
{{workflow.repair_count}}
Rerun count

Workflow Start Time (start_time)

The start time is the start time of the workflow run, in UTC+0.
Parameter
Description
{{workflow.start_time.year}}
Year (for example, 2026)
{{workflow.start_time.month}}
Month (for example, 06)
{{workflow.start_time.day}}
Day (for example, 15)
{{workflow.start_time.hour}}
Hour
{{workflow.start_time.minute}}
Minute
{{workflow.start_time.second}}
Second
{{workflow.start_time.is_weekday}}
Workday or not (true / false)
{{workflow.start_time.iso_date}}
ISO date YYYY-MM-DD
{{workflow.start_time.iso_datetime}}
ISO datetime YYYY-MM-DDTHH:mm:ss
{{workflow.start_time.iso_weekday}}
ISO day of week (1–7, 1 indicates Monday)
{{workflow.start_time.timestamp_ms}}
Timestamp in milliseconds

Workflow Scheduled Trigger Time (trigger.time)

The scheduled time is the next execution time configured in the schedule, in UTC+0.
Parameter
Description
{{workflow.trigger.time.year}}
Year
{{workflow.trigger.time.month}}
Month
{{workflow.trigger.time.day}}
Day
{{workflow.trigger.time.hour}}
Hour
{{workflow.trigger.time.minute}}
Minute
{{workflow.trigger.time.second}}
Second
{{workflow.trigger.time.is_weekday}}
Workday or Not
{{workflow.trigger.time.iso_date}}
ISO date
{{workflow.trigger.time.iso_datetime}}
ISO datetime
{{workflow.trigger.time.iso_weekday}}
ISO day of week
{{workflow.trigger.time.timestamp_ms}}
Timestamp in milliseconds

Workspace Parameters

Parameter
Description
{{workspace.id}}
Workspace ID
{{workspace.url}}
Workspace URL

Task Parameters

Current Task

Parameter
Description
{{task.name}}
Task Name
{{task.run_id}}
Task run ID
{{task.execution_count}}
Number of times the current task has run (including retries and reruns)
{{task.path}}
File path referenced by the current Notebook / Python File task

Upstream Task (Specified by task_name)

Note:
The upstream task must be a direct or indirect upstream of the current task and must have a dependency relationship configured.
Tip
When multiple levels of workflows are nested, parameters passed by the outermost upstream can be used in the innermost layer.
Parameter
Description
{{tasks.<task_name>.run_id}}
Upstream task run ID
{{tasks.<task_name>.result_state}}
Run status: success / failed / excluded / canceled / evicted / timeout / upstream_canceled / upstream_evicted / upstream_failed
{{tasks.<task_name>.error_code}}
Task error code (empty string on success)
{{tasks.<task_name>.execution_count}}
Number of upstream task runs
{{tasks.<task_name>.path}}
File path of the upstream Notebook task
{{tasks.<task_name>.values.<value_name>}}
Value set by the upstream Notebook through dlcutils.jobs.taskValues.set
{{tasks.<task_name>.output.rows}}
All output rows of the upstream SQL task (JSON array)
{{tasks.<task_name>.output.first_row}}
First row of the upstream SQL task output
{{tasks.<task_name>.output.first_row.<column_alias>}}
Specified column in the first row of the upstream SQL output
{{tasks.<task_name>.output.alert_state}}
Status of the upstream SQL alarm task: UNKNOWN / OK / TRIGGERED

For Each Loop Parameters (Only Used in Internal Nodes of For Each)

Parameter
Description
{{loopDataArray}}
Entire loop parameter array
{{loopDataCurrent}}
Element of the current loop
{{loopDataCurrent.<key>}}
Value of the specified key in the current loop element
{{loopTimes}}
Current number of loops, starting from 1
For details, see For Each Loop Task.

Time Format Description

The meanings of all time fields based on UTC+0:
Field
Value Range
year
4-digit number (for example, 2026)
month
1–12
day
1–31
hour
0–23
minute
0–59
second
0–59
is_weekday
true / false
iso_date
YYYY-MM-DD
iso_datetime
YYYY-MM-DDTHH:mm:ss
iso_weekday
1–7 (1 indicates Monday, 7 indicates Sunday)
timestamp_ms
13-digit timestamp in milliseconds

Citation Recommendations

1. Define in Workflow Parameters and Reference in SQL/Notebook

Recommended practice: Encapsulate system built-in parameters as business parameters in workflow parameters, and reference only the business parameters in your code. This facilitates future adjustments and improves log readability.
# Workflow Parameters
dp_data_dt = {{workflow.start_time.iso_date}}

# Referencing in SQL
WHERE dt = '${dp_data_dt}'

# Referencing in Notebook
dt = dlcutils.widgets.get('dp_data_dt')

2. Passing Between SQL output and Downstream Tasks

# Downstream Task Parameters
task_param = {{tasks.upstream_sql.output.first_row.dt}}

# In Downstream SQL
WHERE dt = '${task_param}'

Time Zone Description

The start_time / trigger.time series fields are based on UTC+0.
If you need other time zones, explicitly concatenate them through workflow parameters. We recommend using ISO fields and time zone offsets.
The "Completion Time" alarm is calculated based on the scheduling time zone. For details, see Workflow and Task Alarms.

References

Scheduling and Triggers

Ajuda e Suporte

Esta página foi útil?

comentários