<?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 setup a Talend job to use command line parameters passed to the .bat file in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-setup-a-Talend-job-to-use-command-line-parameters-passed/m-p/2201878#M3795</link>
    <description>&lt;P&gt;You can use&amp;nbsp;&lt;SPAN&gt;--context_param on the command line. For example:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;--context_param startDate=whatYouWant --context_param endDate=whatYouWant&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;You can also have a extenal file to store some of your context variables.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;See &lt;A href="https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/4PQXoxpoVmwFN8IdtxaKBw" target="_self" rel="nofollow noopener noreferrer"&gt;tContextLoad&amp;nbsp;&lt;/A&gt;for details.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;You can also have all context variables loaded automatically when the job starts.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;See &lt;A href="https://community.qlik.com/s/feed/0D53p00007vCon2CAC" target="_self"&gt;this post&lt;/A&gt; where I give the solution.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Oct 2018 17:23:00 GMT</pubDate>
    <dc:creator>TRF</dc:creator>
    <dc:date>2018-10-25T17:23:00Z</dc:date>
    <item>
      <title>How to setup a Talend job to use command line parameters passed to the .bat file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-setup-a-Talend-job-to-use-command-line-parameters-passed/m-p/2201877#M3794</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I've created the&amp;nbsp;context variables below:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="ContextVariables.png" style="width: 999px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M0cn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/152596iC285675274F7B354/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M0cn.png" alt="0683p000009M0cn.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;In&amp;nbsp;my tDBInput1's Query field, I have:&lt;/P&gt; 
&lt;P&gt;"SELECT Instance__c, Instance_Usage_Log_Date__c, userid, teamid&lt;BR /&gt;FROM teamcalllogs tcl&lt;BR /&gt;INNER JOIN users u ON tcl.userid = u.userid&lt;BR /&gt;INNER JOIN teams t ON u.teamid = t.teamid&lt;BR /&gt;WHERE Instance_Usage_Log_Date__c &amp;gt; '" + TalendDate.formatDate("yyyy-MM-dd",&lt;STRONG&gt;context.startDate&lt;/STRONG&gt;) +&lt;BR /&gt;"' AND Instance_Usage_Log_Date__c &amp;lt; '" + TalendDate.formatDate("yyyy-MM-dd",&lt;STRONG&gt;context.endDate&lt;/STRONG&gt;) + "' AND Instance__c &amp;lt;&amp;gt; ''&lt;BR /&gt;GROUP BY Instance__c, Instance_Usage_Log_Date__c&lt;BR /&gt;ORDER BY Instance_Usage_Log_Date__c ASC;"&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;This all&amp;nbsp;seems to be working fine, as it returns the expected number of rows for the context variable default values.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Now what I'd like to do is have the possibility of passing the startDate and endDate as command line parameters to the bat file. How can I accomplish this?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Right now I'm testing this on a windows environment, but I'll be running it on as a cron job on a unix environment. Will the setup be significantly different?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Many thanks in advance,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;JP&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 15:54:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-setup-a-Talend-job-to-use-command-line-parameters-passed/m-p/2201877#M3794</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-10-25T15:54:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to setup a Talend job to use command line parameters passed to the .bat file</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-setup-a-Talend-job-to-use-command-line-parameters-passed/m-p/2201878#M3795</link>
      <description>&lt;P&gt;You can use&amp;nbsp;&lt;SPAN&gt;--context_param on the command line. For example:&lt;/SPAN&gt;&lt;/P&gt; 
&lt;PRE&gt;--context_param startDate=whatYouWant --context_param endDate=whatYouWant&lt;/PRE&gt; 
&lt;P&gt;&lt;SPAN&gt;You can also have a extenal file to store some of your context variables.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;See &lt;A href="https://help.talend.com/reader/mjoDghHoMPI0yuyZ83a13Q/4PQXoxpoVmwFN8IdtxaKBw" target="_self" rel="nofollow noopener noreferrer"&gt;tContextLoad&amp;nbsp;&lt;/A&gt;for details.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;You can also have all context variables loaded automatically when the job starts.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;See &lt;A href="https://community.qlik.com/s/feed/0D53p00007vCon2CAC" target="_self"&gt;this post&lt;/A&gt; where I give the solution.&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Oct 2018 17:23:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-setup-a-Talend-job-to-use-command-line-parameters-passed/m-p/2201878#M3795</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2018-10-25T17:23:00Z</dc:date>
    </item>
  </channel>
</rss>

