<?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 Using JAVA Code for Default Context in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374494#M137085</link>
    <description>Hi,
&lt;BR /&gt;I use a parameter for my Job(it's OK) , but for the default value, I would like to have a today date (which is JAVA code) , and so the user doesn't enter every time. How can I do to indicate (syntaxe) for the Default value that is the JAVA code.
&lt;BR /&gt;Thanks in advance for your help.
&lt;BR /&gt;tle</description>
    <pubDate>Sat, 16 Nov 2024 14:33:54 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T14:33:54Z</dc:date>
    <item>
      <title>Using JAVA Code for Default Context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374494#M137085</link>
      <description>Hi,
&lt;BR /&gt;I use a parameter for my Job(it's OK) , but for the default value, I would like to have a today date (which is JAVA code) , and so the user doesn't enter every time. How can I do to indicate (syntaxe) for the Default value that is the JAVA code.
&lt;BR /&gt;Thanks in advance for your help.
&lt;BR /&gt;tle</description>
      <pubDate>Sat, 16 Nov 2024 14:33:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374494#M137085</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: Using JAVA Code for Default Context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374495#M137086</link>
      <description>This isn't exactly what you're asking for but if you're working with databases you can always ask the database for the current time. Adda DBInput component and you're ready. At least that's the way I do that so far.</description>
      <pubDate>Tue, 21 Aug 2007 19:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374495#M137086</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-08-21T19:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Using JAVA Code for Default Context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374496#M137087</link>
      <description>You can also avoid using a db query : 
&lt;BR /&gt;try with a single line tJava component at the beginning of your job, such as :
&lt;BR /&gt;context.setProperty("yourDateContextParameter", routines.TalendDate.getDate("yyyyMMdd"));
&lt;BR /&gt;Hope this helps</description>
      <pubDate>Wed, 22 Aug 2007 05:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374496#M137087</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-08-22T05:22:12Z</dc:date>
    </item>
    <item>
      <title>Re: Using JAVA Code for Default Context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374497#M137088</link>
      <description>Hi,
&lt;BR /&gt;Thanks a lot for all help, but using db query is not exactly that I want. I have try with context.setProperty.
&lt;BR /&gt;I can use both contexts of the Job and tJava component.
&lt;BR /&gt;It's OK, but the context.setProperty don't accept integer value and I have set string value for my date .Do you know another way to have integer value ? . It's my screenshot.
&lt;BR /&gt;tle</description>
      <pubDate>Wed, 22 Aug 2007 09:16:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374497#M137088</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-08-22T09:16:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using JAVA Code for Default Context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374498#M137089</link>
      <description>Using java and context values, I admit you only can use String values, since 'contextValue' is a 'Properties' type variable
&lt;BR /&gt;So why not set your "datecontrol" context parameter as an int ?
&lt;BR /&gt;Then you can read it with : Integer.parseInt(((String)context.getProperty("datecontrol"))).intValue()
&lt;BR /&gt;And you still can write it as a String.</description>
      <pubDate>Wed, 22 Aug 2007 22:57:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-JAVA-Code-for-Default-Context/m-p/2374498#M137089</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-08-22T22:57:56Z</dc:date>
    </item>
  </channel>
</rss>

