forked from docs/doc-exports
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com> Co-authored-by: chenxiaoxiong <chenxiaoxiong@huawei.com> Co-committed-by: chenxiaoxiong <chenxiaoxiong@huawei.com>
31 lines
5.3 KiB
HTML
31 lines
5.3 KiB
HTML
<a name="dataartsstudio_03_0136"></a><a name="dataartsstudio_03_0136"></a>
|
|
|
|
<h1 class="topictitle1">What Are the Differences and Relationships Between Environment Variables, Job Parameters, and Script Parameters?</h1>
|
|
<div id="body0000001174715211"><div class="section" id="dataartsstudio_03_0136__section043813265811"><h4 class="sectiontitle">Symptom</h4><p id="dataartsstudio_03_0136__p16687173518584">Differences and relationships between environment variables, job parameters, and script parameters</p>
|
|
</div>
|
|
<div class="section" id="dataartsstudio_03_0136__section11622913155919"><h4 class="sectiontitle">Solution</h4><p id="dataartsstudio_03_0136__p185823196593">The application scopes of workspace environment variables, job parameters, and script parameters are different. If a workspace environment variable, a job parameter, and a script parameter have the same name, their priorities are as follows: <strong id="dataartsstudio_03_0136__b950092962412">job parameter > workspace environment variable > script parameter</strong>.</p>
|
|
<div class="p" id="dataartsstudio_03_0136__p33621450105911">Introduction and usage of environment variables, job parameters, and script parameters are as follows:<ul id="dataartsstudio_03_0136__ul1436215506595"><li id="dataartsstudio_03_0136__li736285035910">Variables and constants can be defined in environment variables. Environment variables take effect in current workspace.<ul id="dataartsstudio_03_0136__ul5362650145918"><li id="dataartsstudio_03_0136__li1036219502590">The value of a variable (such as <strong id="dataartsstudio_03_0136__b86281283219">workspace name</strong>) varies depending on the workspace. When exporting a variable from a workspace and import it to another workspace, you must reconfigure its value.</li><li id="dataartsstudio_03_0136__li12363195011598">The value of a constant in different workspaces is the same. When importing a constant to another workspace, you do not need to reconfigure its value.</li></ul>
|
|
<div class="fignone" id="dataartsstudio_03_0136__fig173631550145910"><span class="figcap"><b>Figure 1 </b>Environment variable</span><br><span><img id="dataartsstudio_03_0136__image1436385025911" src="en-us_image_0000002234076288.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
<p id="dataartsstudio_03_0136__p1536318503597"></p>
|
|
</li><li id="dataartsstudio_03_0136__li1436314505598">Parameters and constants can be defined in job parameters. Job parameters take effect in current job.<ul id="dataartsstudio_03_0136__ul1336375016590"><li id="dataartsstudio_03_0136__li8363175055918">The value of a parameter varies depending on jobs. When exporting a parameter from a workspace and import it to another workspace, you must reconfigure its value.</li><li id="dataartsstudio_03_0136__li18363350115912">The value of a constant in different jobs is the same. When importing a constant to another job, you do not need to reconfigure its value.</li></ul>
|
|
<div class="fignone" id="dataartsstudio_03_0136__fig736313509592"><span class="figcap"><b>Figure 2 </b>Job parameter.</span><br><span><img id="dataartsstudio_03_0136__image11363450105912" src="en-us_image_0000002269195581.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</li><li id="dataartsstudio_03_0136__li1036310507595">Script parameters take effect in current script and it can be used in the following ways.<ul id="dataartsstudio_03_0136__ul1736365017598"><li id="dataartsstudio_03_0136__li936315013594">Enter SQL script parameters in the script editor (Flink SQL is not supported). If the script is executed independently, you can configure the parameters in the lower part of the editor, as shown in <a href="#dataartsstudio_03_0136__fig136485075917">Figure 3</a>. If the script is executed by job scheduling, you can assign values to the parameters based on node attributes, as shown in <a href="#dataartsstudio_03_0136__fig1236415017593">Figure 4</a>.</li><li id="dataartsstudio_03_0136__li20364185019598">For Shell scripts, you can enter a parameter and an interactive parameter to transfer the parameters.</li><li id="dataartsstudio_03_0136__li14364195045920">For Python scripts, you can enter a parameter and an interactive parameter to transfer the parameters.</li></ul>
|
|
<div class="fignone" id="dataartsstudio_03_0136__fig136485075917"><a name="dataartsstudio_03_0136__fig136485075917"></a><a name="fig136485075917"></a><span class="figcap"><b>Figure 3 </b>Configuring script parameters when the script is executed independently</span><br><span><img id="dataartsstudio_03_0136__image14364165065920" src="en-us_image_0000002269195577.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
<div class="fignone" id="dataartsstudio_03_0136__fig1236415017593"><a name="dataartsstudio_03_0136__fig1236415017593"></a><a name="fig1236415017593"></a><span class="figcap"><b>Figure 4 </b>Configuring script parameters when the script is executed by job scheduling</span><br><span><img id="dataartsstudio_03_0136__image936410503592" src="en-us_image_0000002269115493.png" title="Click to enlarge" class="imgResize"></span></div>
|
|
</li></ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dataartsstudio_03_0035.html">DataArts Factory</a></div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<script language="JavaScript">
|
|
<!--
|
|
initImageViewer('.imgResize');
|
|
var msg_imageMax = "view original image";
|
|
var msg_imageClose = "close";
|
|
//--></script> |