Custom parameters are classified into built-in parameters, custom parameters ${...}, custom parameters $[...], and constants. Values are assigned to each type of parameter in the specified 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=202111010000 |
$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=$bizdate |
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 |
For 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. | The value is accurate to seconds.
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 obtain the required time data by using the
${...} 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 |
|