Files
doc-exports/docs/dataartsstudio/umn/dataartsstudio_01_0556.html
chenxiaoxiong c3942cbc2c DataArts UMN 20241028 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
2025-07-09 13:09:06 +00:00

140 lines
17 KiB
HTML

<a name="dataartsstudio_01_0556"></a><a name="dataartsstudio_01_0556"></a>
<h1 class="topictitle1">Simple Variable Set</h1>
<div id="body0000001473629713"><p id="dataartsstudio_01_0556__p8060118">The simple variable set provides a series of customized variables. Customized parameters are automatically replaced with specific values based on the service date, plan time, and parameter value format of task scheduling. In this way, parameters can be dynamically replaced during task scheduling.</p>
<p id="dataartsstudio_01_0556__p2098135911496">Currently, the system supports the customization of three types of parameters: service date, plan time, and service ID.</p>
<ul id="dataartsstudio_01_0556__ul1193210962810"><li id="dataartsstudio_01_0556__li1793289112813">The business date refers to the day before the expected scheduling running time of a task within the scheduling time, that is, yesterday. The business date is accurate to day. You can obtain the service date from ${yyyymmdd}. Generally, the service date is the date when the plan time is located minus 1.</li><li id="dataartsstudio_01_0556__li133409125289">The plan time refers to the time point (that is, the current day) when a task is expected to be scheduled within the scheduling time. The plan time is accurate to seconds. The planned time can be obtained through $[yyyymmddhh24miss].</li><li id="dataartsstudio_01_0556__li5295766577">The service ID parameter includes the job ID and the instance ID generated by the job, which can be obtained through $job_id and $instance_id.<div class="notice" id="dataartsstudio_01_0556__note132231508575"><span class="noticetitle"><img src="public_sys-resources/notice_3.0-en-us.png"> </span><div class="noticebody"><p id="dataartsstudio_01_0556__p3223350105715">To use simple variable sets, you must enable this function by referring to <a href="dataartsstudio_01_04501.html#dataartsstudio_01_04501__section12475339019">Configuring a Default Item &gt; Use Simple Variable Set</a>.</p>
</div></div>
</li></ul>
<div class="section" id="dataartsstudio_01_0556__section13383163212011"><h4 class="sectiontitle">Service Date Parameter</h4><p id="dataartsstudio_01_0556__p816914185206">The service date refers to the day before the expected scheduling running time of a task within the scheduling time, that is, yesterday. For example, if the scheduling date is January 1, 2023, the service date is December 31, 2022. This parameter is a time parameter generated based on the combination of yyyy, yy, mm, and dd. The format of this parameter can be customized. for example, ${yyyy}, ${yyyymm}, ${yyyymmdd}, and ${yyyy-mm-dd}.</p>
<ul id="dataartsstudio_01_0556__ul47814535317"><li id="dataartsstudio_01_0556__li1992617371649">yyyy: indicates a 4-digit year. The value is the year of the service date.</li><li id="dataartsstudio_01_0556__li5133154612418">yy: indicates a 2-digit year. The value is the last two digits of the year of the service date.</li><li id="dataartsstudio_01_0556__li1335210571245">mm: indicates the month. The value is the month of the service date.</li><li id="dataartsstudio_01_0556__li167918595316">dd: indicates the day. The value is the day of the service date.</li></ul>
<p id="dataartsstudio_01_0556__p1525324913365">For details about how to obtain the time data N years ago, N months ago, and N days ago, see <a href="#dataartsstudio_01_0556__table1773110112114">Table 1</a>. The parameter can only be accurate to year, month, and day. The hour, minute, and second formats are not supported.</p>
<div class="tablenoborder"><a name="dataartsstudio_01_0556__table1773110112114"></a><a name="table1773110112114"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0556__table1773110112114" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameters for obtaining the service date</caption><thead align="left"><tr id="dataartsstudio_01_0556__row1973118132111"><th align="left" class="cellrowborder" valign="top" width="46.52%" id="mcps1.3.4.5.2.3.1.1"><p id="dataartsstudio_01_0556__p1629011521148">Business Date Scenario</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.480000000000004%" id="mcps1.3.4.5.2.3.1.2"><p id="dataartsstudio_01_0556__p7731191192110">Method</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0556__row6731216212"><td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p69249329155">Previous/Next N Years</p>
</td>
<td class="cellrowborder" valign="top" width="53.480000000000004%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p1732217217">${yyyy&plusmn;N}</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row1173220152110"><td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p592410325158">Previous/Next N Months</p>
</td>
<td class="cellrowborder" valign="top" width="53.480000000000004%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p07322132117">${yyyymm&plusmn;N}</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row073291202110"><td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p20924123219156">N weeks before/after</p>
</td>
<td class="cellrowborder" valign="top" width="53.480000000000004%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p1973241132119">${yyyymmdd&plusmn;7*N}</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row1273219118214"><td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p12924732101517">N days before/after</p>
</td>
<td class="cellrowborder" valign="top" width="53.480000000000004%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p187321010211">${yyyymmdd&plusmn;N}</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row10249159714"><td class="cellrowborder" valign="top" width="46.52%" headers="mcps1.3.4.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p159252032201510">N years before/after (yy format)</p>
</td>
<td class="cellrowborder" valign="top" width="53.480000000000004%" headers="mcps1.3.4.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p13250125912116">${yy&plusmn;N}</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="dataartsstudio_01_0556__section014171605515"><h4 class="sectiontitle">Plan Time Parameters</h4><p id="dataartsstudio_01_0556__p336459124310">The planned time refers to the time when a task is expected to be scheduled and run within the scheduling time (that is, the current day). This parameter is a time parameter generated based on the combination of yyyy, yy, mm, dd, hh24, mi, and ss. The format of this parameter can be customized. For example, $[yyyymmdd], $[yyyy-mm-dd], $[hh24miss], $[hh24:mi:ss], and $[yyyymmddhh24miss].</p>
<ul id="dataartsstudio_01_0556__ul24471539151917"><li id="dataartsstudio_01_0556__li28912387717">yyyy: indicates a 4-digit year. The value is the year of the plan time.</li><li id="dataartsstudio_01_0556__li03001341672">yy: indicates a two-digit year. The value is the last two digits of the year of the plan time.</li><li id="dataartsstudio_01_0556__li2900254972">mm: indicates the month. The value is the month of the plan time.</li><li id="dataartsstudio_01_0556__li2435751782">dd: indicates the day. The value is the day of the plan time.</li><li id="dataartsstudio_01_0556__li6448123914218">hh: indicates the 12-hour format. The value is the hour of the plan time.</li><li id="dataartsstudio_01_0556__li20544201819817">hh24: indicates the 24-hour format. The value is the hour of the plan time.</li><li id="dataartsstudio_01_0556__li13717754182">mi: indicates the minute. The value is the minute of the plan time.</li><li id="dataartsstudio_01_0556__li164476393195">ss: indicates the second. The value is the second of the plan time.</li></ul>
<p id="dataartsstudio_01_0556__p115121832165618">For details about how to obtain data N hours and minutes ago, see <a href="#dataartsstudio_01_0556__table19101820185517">Table 2</a>. This parameter cannot be used to obtain data N years and months ago using $[yyyy-N] or $[mm-N].</p>
<div class="tablenoborder"><a name="dataartsstudio_01_0556__table19101820185517"></a><a name="table19101820185517"></a><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0556__table19101820185517" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters for obtaining the plan time</caption><thead align="left"><tr id="dataartsstudio_01_0556__row1510112065510"><th align="left" class="cellrowborder" valign="top" width="43%" id="mcps1.3.5.5.2.3.1.1"><p id="dataartsstudio_01_0556__p13768184110161">Planned Time Scenario</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.99999999999999%" id="mcps1.3.5.5.2.3.1.2"><p id="dataartsstudio_01_0556__p4101202550">Method</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0556__row810120205519"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p7101120115514">Next N Years</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p1109207552">$[add_months(yyyymmdd,12*N)]</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row20101120115514"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p19116209556">First N Years</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p61019206557">$[add_months(yyyymmdd,-12*N)]</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row311112018557"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p11182055512">Last N Months</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p1611122014552">$[add_months(yyyymmdd,N)]</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row21172085512"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p12116200559">Last N Months</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p16112020185519">$[add_months(yyyymmdd,-N)]</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row5853418710"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p88624478">N weeks before/after</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p1286541875">$[yyyymmdd&plusmn;7*N]</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row17861641174"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p138613415712">N days before/after</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p18862416710">$[yyyymmdd&plusmn;N]</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row19861341673"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p168614370">Before/After N Hours</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p16813114121216">You can obtain the time data in either of the following ways:</p>
<ul id="dataartsstudio_01_0556__ul39516231474"><li id="dataartsstudio_01_0556__li12951723134718">$[hh24miss&plusmn;N/24]</li><li id="dataartsstudio_01_0556__li395172354714">$[User-defined time format &plusmn;N/24].<p id="dataartsstudio_01_0556__p91281508226"><a name="dataartsstudio_01_0556__li395172354714"></a><a name="li395172354714"></a>For example, to obtain the time format of the previous hour, run the following command:</p>
<ul id="dataartsstudio_01_0556__ul111285506221"><li id="dataartsstudio_01_0556__li17128205013226">Month: $[mm-1/24].</li><li id="dataartsstudio_01_0556__li71281650202219">Year: $[yyyy-1/24].</li><li id="dataartsstudio_01_0556__li412865082215">Year and month: $[yyyymm-1/24].</li><li id="dataartsstudio_01_0556__li1612895032216">Obtain the year, month, and day: $[yyyymmdd-1/24].</li><li id="dataartsstudio_01_0556__li2128155032210">$[yyyymmdd-1-1/24]: indicates that the time of the previous day and the previous hour is used.</li></ul>
</li></ul>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row16861441579"><td class="cellrowborder" valign="top" width="43%" headers="mcps1.3.5.5.2.3.1.1 "><p id="dataartsstudio_01_0556__p11868413714">Before/After N minutes</p>
</td>
<td class="cellrowborder" valign="top" width="56.99999999999999%" headers="mcps1.3.5.5.2.3.1.2 "><p id="dataartsstudio_01_0556__p17272161321219">You can obtain the time data in any of the following ways:</p>
<ul id="dataartsstudio_01_0556__ul10824115084714"><li id="dataartsstudio_01_0556__li78241850114710">$[hh24miss&plusmn;N/24/60]</li><li id="dataartsstudio_01_0556__li282445074717">$[yyyymmddhh24miss&plusmn;N/24/60]</li><li id="dataartsstudio_01_0556__li1452613344270">$[mi&plusmn;N/24/60]</li><li id="dataartsstudio_01_0556__li1617634162715">$[User-defined time format &plusmn;N/24/60]<p id="dataartsstudio_01_0556__p113361058152716"><a name="dataartsstudio_01_0556__li1617634162715"></a><a name="li1617634162715"></a>For example, to obtain the time format 15 minutes before the planned time, run the following command:</p>
<ul id="dataartsstudio_01_0556__ul39151833142810"><li id="dataartsstudio_01_0556__li10817204517287">Year: $[yyyy-15/24/60]</li><li id="dataartsstudio_01_0556__li1476112320291">Year and month: $[yyyymm-15/24/60]</li><li id="dataartsstudio_01_0556__li1783721142920">Date: $[yyyymmdd-15/24/60]</li><li id="dataartsstudio_01_0556__li9390204011291">Hour: $[hh24-15/24/60]</li><li id="dataartsstudio_01_0556__li22875203304">Minute: $[mi-15/24/60]</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="note" id="dataartsstudio_01_0556__note17751111174"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><ul id="dataartsstudio_01_0556__ul1688514558519"><li id="dataartsstudio_01_0556__li178851155115116">The replacement value of the scheduling parameter is determined when the instance is generated. Therefore, the replacement value of the scheduling parameter does not change with the actual running time of the instance.</li><li id="dataartsstudio_01_0556__li158851455105117">When the scheduling parameter is set to hour or minute, the parameter replacement value is determined by the planned scheduling time of the instance, that is, the planned scheduling time configured for the node scheduling. For example:<ul id="dataartsstudio_01_0556__ul536813441196"><li id="dataartsstudio_01_0556__li215912423912">If the current node is a daily scheduling node and the planned scheduling time is 01:00, the value of Hour is 01.</li><li id="dataartsstudio_01_0556__li1417917421919">If the current node is an hourly scheduling node, the planned scheduling time is set to 00:00-23:59, and the scheduling is performed every hour, the planned time of the first hourly instance is 00:00, and the value of the hour parameter is 00. The planned time of the second hourly instance is 01, and so on.</li></ul>
</li></ul>
</div></div>
</div>
<div class="section" id="dataartsstudio_01_0556__section1442372413551"><h4 class="sectiontitle">Service Parameters</h4><p id="dataartsstudio_01_0556__p6423152411557">The service ID is replaced with the actual ID of the current service, including the job ID and the instance ID generated by the job.</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dataartsstudio_01_0556__table114231248554" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameters for obtaining the service ID</caption><thead align="left"><tr id="dataartsstudio_01_0556__row942412465519"><th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.2.3.1.1"><p id="dataartsstudio_01_0556__p7424324135516">Methods</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.6.3.2.3.1.2"><p id="dataartsstudio_01_0556__p5424162495510">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dataartsstudio_01_0556__row0425162413556"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.3.1.1 "><p id="dataartsstudio_01_0556__p1742512445519">$job_id</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.3.1.2 "><p id="dataartsstudio_01_0556__p8425172465513">Data Development Job ID For details about how to obtain the ID, see "Viewing Job Details" in <em id="dataartsstudio_01_0556__i14413731173819">API Reference</em>.</p>
</td>
</tr>
<tr id="dataartsstudio_01_0556__row194251424185516"><td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.3.1.1 "><p id="dataartsstudio_01_0556__p44251524175514">$instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.6.3.2.3.1.2 "><p id="dataartsstudio_01_0556__p154251824205514">Job instance ID. (The instance ID is not generated during the test running of a single-node job and is not supported.) For details about how to obtain the ID, see "Viewing a Job Instance List" in <em id="dataartsstudio_01_0556__i171932142375">API Reference</em>. </p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_01_0400.html">DataArts Factory</a></div>
</div>
</div>