Variable value assignment in Oracle Data Integrator

huangapple go评论93阅读模式
英文:

Variable value assignment in Oracle Data Integrator

问题

Sure, here are the translated parts:

String mystr = "#MY_ODI_VAR";
out.print(mystr);
String mystr = "<% #MY_ODI_VAR %>";
out.print(mystr);
String mystr = "<% \"#MY_ODI_VAR\" %>";
out.print(mystr);
英文:
&lt;?
String mystr =  &quot;#MY_ODI_VAR&quot;;
out.print(mystr);
?&gt;

I want to assign value stored in an ODI variable (MY_ODI_VAR) to another variable (mystr) defined inside Java Code in a procedure.
How can this be done. The above mentioned code is producing #MY_ODI_VAR instead of the value assigned to this variable.
I have also tried following variations, but no luck.

Thanks

&lt;?
String mystr =  &quot;&lt;% #MY_ODI_VAR %&gt;&quot;;
out.print(mystr);
?&gt;

&lt;?
String mystr =  &lt;% &quot;#MY_ODI_VAR&quot; %&gt;;
out.print(mystr);
?&gt;

答案1

得分: 0

Sure, here is the translated content:

使用问号标记 &lt;? ?&gt; 会在替换 ODI 变量之前生成代码。

相反,使用美元标记 &lt;$ $&gt; 应该有效。它会在替换 ODI 变量之后生成代码。

&lt;$
String mystr = &quot;#MY_ODI_VAR&quot;;
out.print(mystr);
$&gt;

这里有一个关于4种不同替换标记的更详细解释。

英文:

With the question mark tags &lt;? ?&gt; the code is generated before ODI variables are substituted.

Using the dollar tags &lt;$ $&gt; instead should work. It generates the code after ODI variables are substitued.

&lt;$
String mystr =  &quot;#MY_ODI_VAR&quot;;
out.print(mystr);
$&gt;

Here is a longer explaination about the 4 different substitution tags.

huangapple
  • 本文由 发表于 2023年5月15日 15:48:40
  • 转载请务必保留本文链接:https://go.coder-hub.com/76251912.html
  • oracle-data-integrator
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定