Custom parameters are classified into built-in parameters, ${...} parameters, $[...] parameters, and constants. The values of custom parameters of each type are in specific formats. This topic compares the value formats of different types of custom parameters.
How different custom parameters are used
November 1, 2021
, and a node is scheduled to run at 00:00
every day. The following table describes how different customer parameters are assigned
values.
pt=${datetime}
format in the code.
Parameter | Description | Assignment | Replacement result |
---|---|---|---|
${yyyymmdd} |
Obtains the data timestamp of the node. | datetime=${yyyymmdd} |
datetime=20211031 |
$[yyyymmddhh24miss] |
Obtains the time when the node is scheduled to run, which is accurate to seconds. | datetime=$[yyyymmddhh24miss] |
datetime=20211101000000 |
$bizdate |
Obtains the data timestamp of the node. | datetime=$bizdate |
datetime=20211031 |
$cyctime |
Obtains the time when the node is scheduled to run, which is accurate to seconds. | datetime=$cyctime |
datetime=20211101000000 |
$gmtdate |
Obtains the current date, which is accurate to days. | datetime=$gmtdate
|
datetime=20211101 |
$bizmonth |
Obtains the month indicated by the data timestamp of the node. | datetime=$bizmonth |
In this example, the current date is
November 1, 2021 .
|
Differences between ${...} and $[...] parameters
Item | ${...} parameter | $[...] parameter |
---|---|---|
Benchmark | The value of the $bizdate parameter is used as a benchmark to run nodes.
The |
The value of the $cyctime parameter is used as a benchmark to run nodes.
The |
Data backfill | The parameter is replaced with the selected data timestamp. | During data backfill, the parameter is replaced with the date that is one day after the date indicated by the selected data timestamp .
For example, |
Time granularity | The value is accurate to days.
If you want to specify a time that is N years or months ago, we recommend that you use a ${...} parameter. |
The value is accurate to seconds.
If you want to specify a time that is N hours or minutes ago, we recommend that you
use a $[...] parameter. For example, Note
${yyyy-mm-dd-1/24} is not supported. We recommend that you use $[yyyy-mm-dd-1-1/24] .
|
- For more information about how to use ${...} and $[...] parameters, see Overview of scheduling parameters.
- For more information about how to configure and use custom parameters, see Configure and use scheduling parameters.
10:30:00 on July 20, 2021
. The following table describes how to use ${...} and $[...] parameters.
Time to obtain | ${...} parameter | $[...] parameter |
---|---|---|
Year: 2021 |
|
|
Year: 21 |
|
|
Year: 2020 |
|
Not supported |
Month: 07 |
|
|
Day: 20 |
|
|
Date: 2021-06-20 |
|
|
Date: 2021-07-19 |
|
|
Date: 2020-07-20 |
|
|
Time: 10:30:00 | Not supported |
|
Time: 2021-07-20 10:30:00 | Not supported |
|
Time: 2021-07-20 10:29:00 | Not supported |
|
Time: 2021-07-20 09:30:00 | Not supported |
|
Time:
2021071910:30:00 |
Not supported |
|
Time:
20210719 10:30:00 |
Not supported |
Important Spaces are not supported in one assignment expression. You can use two scheduling
parameters and separate the assignment expressions of the two parameters with a space.
|