<?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: context.propertyName and context.setProperty(&amp;quot;propertyName&amp;quot;, .... ) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307757#M79165</link>
    <description>Hi, 
&lt;BR /&gt;&amp;gt;&amp;gt; 
&lt;BR /&gt;context.contextVariableName 
&lt;BR /&gt;Above is not a part of your routine. This is called from context, where default value assigned is null, so it won't return anything. 
&lt;BR /&gt;I am not sure why and how you are combining context variable with the routine. Getter setter routines are usually designed to set the value and get the values. 
&lt;BR /&gt;Context variables are also a type of variable which can be used to set the value and get the value. 
&lt;BR /&gt;globalMap.set("yourvariable","value") is a routine to set the value 
&lt;BR /&gt;globalMap.get("yourvariable") is a routine to get the value assigned by above variable 
&lt;BR /&gt;context.yourvariable is defined in your job level context 
&lt;BR /&gt;value is assigned to it say context.yourvariable =="value" 
&lt;BR /&gt;This can simple called by assigning its value to your output. 
&lt;BR /&gt;What is actual scenario? 
&lt;BR /&gt;Vaibhav</description>
    <pubDate>Tue, 06 May 2014 13:11:41 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-05-06T13:11:41Z</dc:date>
    <item>
      <title>context.propertyName and context.setProperty("propertyName", .... )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307754#M79162</link>
      <description>Shortly, I am trying to get the context variable name as string input and setting the context variable with a new value. 
&lt;BR /&gt;My problem is basicly; 
&lt;BR /&gt;context.setProperty("contextVariableName", "some value"); 
&lt;BR /&gt;System.out.println( 
&lt;B&gt;context.getProperty("contextVariableName")&lt;/B&gt;); 
&lt;BR /&gt;Works. 
&lt;BR /&gt; 
&lt;BR /&gt;context.setProperty("contextVariableName", "some value"); 
&lt;BR /&gt;System.out.println( 
&lt;B&gt;context.contextVariableName&lt;/B&gt;); 
&lt;BR /&gt;I expect to get "some value". But nothing returns.</description>
      <pubDate>Tue, 06 May 2014 11:28:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307754#M79162</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-06T11:28:29Z</dc:date>
    </item>
    <item>
      <title>Re: context.propertyName and context.setProperty("propertyName", .... )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307755#M79163</link>
      <description>What is the default value set for context.contextVariableName?
&lt;BR /&gt;Usually it is null when you create a context variable.
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Tue, 06 May 2014 12:43:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307755#M79163</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-06T12:43:56Z</dc:date>
    </item>
    <item>
      <title>Re: context.propertyName and context.setProperty("propertyName", .... )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307756#M79164</link>
      <description>When i execute this line;
&lt;BR /&gt;context.setProperty("contextVariableName", "some value");
&lt;BR /&gt;I am expecting that context.contextVariableName will be set as "some value".
&lt;BR /&gt;Is this wrong ?</description>
      <pubDate>Tue, 06 May 2014 13:00:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307756#M79164</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-06T13:00:30Z</dc:date>
    </item>
    <item>
      <title>Re: context.propertyName and context.setProperty("propertyName", .... )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307757#M79165</link>
      <description>Hi, 
&lt;BR /&gt;&amp;gt;&amp;gt; 
&lt;BR /&gt;context.contextVariableName 
&lt;BR /&gt;Above is not a part of your routine. This is called from context, where default value assigned is null, so it won't return anything. 
&lt;BR /&gt;I am not sure why and how you are combining context variable with the routine. Getter setter routines are usually designed to set the value and get the values. 
&lt;BR /&gt;Context variables are also a type of variable which can be used to set the value and get the value. 
&lt;BR /&gt;globalMap.set("yourvariable","value") is a routine to set the value 
&lt;BR /&gt;globalMap.get("yourvariable") is a routine to get the value assigned by above variable 
&lt;BR /&gt;context.yourvariable is defined in your job level context 
&lt;BR /&gt;value is assigned to it say context.yourvariable =="value" 
&lt;BR /&gt;This can simple called by assigning its value to your output. 
&lt;BR /&gt;What is actual scenario? 
&lt;BR /&gt;Vaibhav</description>
      <pubDate>Tue, 06 May 2014 13:11:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307757#M79165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-06T13:11:41Z</dc:date>
    </item>
    <item>
      <title>Re: context.propertyName and context.setProperty("propertyName", .... )</title>
      <link>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307758#M79166</link>
      <description>We have some talend jobs to simply transfer a data from one db to another.
&lt;BR /&gt;We also need to hide password as plain text.
&lt;BR /&gt;I created a user component. It has one input, the context variable name.
&lt;BR /&gt;User of component is supposed to set the context variable value with encrypted text initial.
&lt;BR /&gt;In java code, I can successfully get the context variable value with the given string "context variable name" as input.
&lt;BR /&gt;And i can decrypt it. 
&lt;BR /&gt;After that i am trying to set the same context variable value with decrypted password, so it will be used on connection credentials.
&lt;BR /&gt;
&lt;BR /&gt;Suppose that the input of component is "DbPassword". I am also creating a context variable named "DbPassword" and can access that variable' value as context.DbPassword.
&lt;BR /&gt;The weird thing is when i use:
&lt;BR /&gt;//contextParamName is set with component parameter getters. 
&lt;BR /&gt;String cipherText = (String)context.getProperty(contextParamName);
&lt;BR /&gt;I am getting the exact value of context.DbPassword which is something like "bK9MAg6CbQsfat2f56jQQA=="
&lt;BR /&gt;But when i use:
&lt;BR /&gt;//plainText has the value of is encrypted password.
&lt;BR /&gt;context.setProperty(contextParamName, plainText); 
&lt;BR /&gt;I see context.DbPassword is still "bK9MAg6CbQsfat2f56jQQA==".
&lt;BR /&gt;And how can i reach context.DbPassword with context.getProperty("DbPassword ");
&lt;BR /&gt; but i can't set the same variable with context.setProperty("DbPassword ", plainText);
&lt;BR /&gt;Edit: I forgot to say I am very new to Talend.</description>
      <pubDate>Tue, 06 May 2014 13:34:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/context-propertyName-and-context-setProperty-quot-propertyName/m-p/2307758#M79166</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-05-06T13:34:06Z</dc:date>
    </item>
  </channel>
</rss>

