<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to use context variable in another context variable in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307797#M79196</link>
    <description>you have to pre-define your context variables. 
&lt;BR /&gt;If you're just looking for arbitrary global storage, then I'd recommend using globalMap. 
&lt;BR /&gt;I only use context for when I want to externalise values or pass parameters. 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;globalMap.put("proj_persist", context.proj_home + "/persist");&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;System.out.println(((String) globalMap.get("proj_perist")));&lt;/FONT&gt;&lt;/FONT&gt;</description>
    <pubDate>Mon, 18 Jul 2016 15:12:24 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2016-07-18T15:12:24Z</dc:date>
    <item>
      <title>How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307794#M79193</link>
      <description>Hi, Can anyone let me know how to define/use (Is it possible?) context variable in another context variable like nested?&lt;BR /&gt;Let say there are 2 context variables as listed below. if you see the second variable "proj_persist" has the prefix path same as proj_home but I am not able to use like proj_persist=context.proj_home +"/persist". Is there any way to do or similar approach?&lt;BR /&gt;"Proj_home=/mapr/datavolume/project_name"&lt;BR /&gt;"proj_persist=/mapr/datavolume/project_name/persist"</description>
      <pubDate>Mon, 18 Jul 2016 14:37:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307794#M79193</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T14:37:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307795#M79194</link>
      <description>you can say: -&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;context.proj_persist = context.proj_home + "/persist";&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 18 Jul 2016 14:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307795#M79194</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T14:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307796#M79195</link>
      <description>Can that be possible while declaring the context variables?</description>
      <pubDate>Mon, 18 Jul 2016 14:59:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307796#M79195</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T14:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307797#M79196</link>
      <description>you have to pre-define your context variables. 
&lt;BR /&gt;If you're just looking for arbitrary global storage, then I'd recommend using globalMap. 
&lt;BR /&gt;I only use context for when I want to externalise values or pass parameters. 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;globalMap.put("proj_persist", context.proj_home + "/persist");&lt;/FONT&gt;&lt;/FONT&gt; 
&lt;BR /&gt; 
&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;System.out.println(((String) globalMap.get("proj_perist")));&lt;/FONT&gt;&lt;/FONT&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:12:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307797#M79196</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T15:12:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307798#M79197</link>
      <description>I tried &lt;FONT size="1"&gt;context.proj_persist = context.proj_home + "/persist" this while defining context variable using wizard. It is not recognizing context variable if I use&amp;nbsp;within the value. I need these to be defined in global context it self so that all the talend big data jobs can use them. Do you have any other way to do so without writing code?&lt;/FONT&gt;</description>
      <pubDate>Mon, 18 Jul 2016 15:57:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307798#M79197</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T15:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307799#M79198</link>
      <description>You need to better explain what your end game is as it is not clear what you want. 
&lt;BR /&gt;Create a Context Group with all the variables you need. 
&lt;BR /&gt;Add it to each Job. 
&lt;BR /&gt;Set "Transmit whole Context" in each of your tRunJob if you have any. 
&lt;BR /&gt;Now, everything is global.</description>
      <pubDate>Mon, 18 Jul 2016 17:46:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307799#M79198</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T17:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307800#M79199</link>
      <description>Currently my project directory locations are defined like this in context variables.
&lt;BR /&gt;proj_home=/mapr/datavolume/project_name/
&lt;BR /&gt;proj_data=/mapr/datavolume/project_name/data/
&lt;BR /&gt;proj_persist=/mapr/datavolume/project_name/data/persist/
&lt;BR /&gt;proj_transient=/mapr/datavolume/project_name/transient/
&lt;BR /&gt;But I want to know is there a way to re-use "context.proj_home" to define other variables in context itself.
&lt;BR /&gt;proj_home=/mapr/datavolume/project_name/
&lt;BR /&gt;proj_data=context.proj_home + "data/"
&lt;BR /&gt;proj_persist=context.proj_data + "persist/"
&lt;BR /&gt;proj_transientcontext.proj_data + "transient/"
&lt;BR /&gt;If you look into unix scripts, we can write something like below (similar to above). I want to know whether that can be possible in defining context variables in Talend.
&lt;BR /&gt;in&amp;nbsp;UNIX
&lt;BR /&gt;PROJ_HOME==/mapr/datavolume/project_name/
&lt;BR /&gt;PROJ_DATA=${PROJ_HOME}/data
&lt;BR /&gt;PROJ_PERSIST=${PROJ_DATA}/persist</description>
      <pubDate>Mon, 18 Jul 2016 18:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307800#M79199</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T18:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to use context variable in another context variable</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307801#M79200</link>
      <description>this is still the correct answer.&lt;BR /&gt;&lt;FONT size="1"&gt;&lt;FONT face="Verdana, Helvetica, Arial, sans-serif"&gt;context.proj_persist = context.proj_home + "/persist;"&lt;/FONT&gt;&lt;/FONT&gt;&lt;BR /&gt;Create a Context Group called FileSystem.&lt;BR /&gt;Add all of your variables.&lt;BR /&gt;Add it to your Jobs.&lt;BR /&gt;In a tJava, set all of your variables you want, except for proj_home.&lt;BR /&gt;I would not, personally, do it this way; but this is the answer to your question.</description>
      <pubDate>Mon, 18 Jul 2016 18:16:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-use-context-variable-in-another-context-variable/m-p/2307801#M79200</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-07-18T18:16:42Z</dc:date>
    </item>
  </channel>
</rss>

