<?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 assign value from tMAP column to global variable ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303543#M75413</link>
    <description>Hi,&lt;BR /&gt;welcome in the forum!&lt;BR /&gt;First: Are you sure your job is working? I think using a function code in context definition wouldn't work. But I may be wrong...&lt;BR /&gt;So you need a file as output with a name you will get as input from the data you got from your input file?&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
    <pubDate>Wed, 01 Apr 2009 20:02:17 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2009-04-01T20:02:17Z</dc:date>
    <item>
      <title>How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303525#M75395</link>
      <description>Hi,&lt;BR /&gt;I am trying to assign the parsed string from tMAP as file name but getting null as output, How can I fix this issue ?&lt;BR /&gt;&lt;BR /&gt;File_Name = "C:/users/Milind/ACARS/"+(String)globalMap.get("fltnum")+TalendDate.formatDate("yyyyMMddHHmmss", new Date()) + ".xls" &lt;BR /&gt;where fltnum is defined as VAR in the tMAP ! &lt;BR /&gt;Thanks,&lt;BR /&gt;Milind</description>
      <pubDate>Sat, 16 Nov 2024 14:02:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303525#M75395</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303526#M75396</link>
      <description>Hi Milind,
&lt;BR /&gt;if you define fltnum as variable in the tMap, use Var.fltnum instead of globalMap.
&lt;BR /&gt;If this will not work for you a screen shot and some more information about your data would be good.
&lt;BR /&gt;Bye
&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 16 Mar 2009 21:18:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303526#M75396</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-16T21:18:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303527#M75397</link>
      <description>Thanks Volker,&lt;BR /&gt;I tried to use &lt;BR /&gt;"C:/users/Milind/ACARS/output/"+Var.fltnum+TalendDate.formatDate("yyyyMMddHHmmss", new Date()) + ".dt2"  instead of &lt;BR /&gt;"C:/users/Milind/ACARS/output/"+(String)globalMap.get("SP7.fltnum")+TalendDate.formatDate("yyyyMMddHHmmss", new Date()) + ".dt2" &lt;BR /&gt;and I am getting the error&lt;BR /&gt;Var cannot be resolved !&lt;BR /&gt;Additing prntscrns here (not sure how it works .. but I am using image upload and after submit its not showing up)&lt;BR /&gt;Thanks,&lt;BR /&gt;Milind</description>
      <pubDate>Tue, 17 Mar 2009 19:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303527#M75397</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-17T19:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303528#M75398</link>
      <description>Hi Milind,
&lt;BR /&gt;a screen shot would be very valuable. You should care about size (pixel and memory). You could see the server defined limits in the "Post reply" -form.
&lt;BR /&gt;Bye
&lt;BR /&gt;Volker</description>
      <pubDate>Tue, 17 Mar 2009 21:50:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303528#M75398</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-17T21:50:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303529#M75399</link>
      <description>Thanks for the Tip, Added the screenshots !&lt;BR /&gt;Milind</description>
      <pubDate>Wed, 18 Mar 2009 18:57:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303529#M75399</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-18T18:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303530#M75400</link>
      <description>Hi Milind,
&lt;BR /&gt;now I got it. If you define a variable inside a tMap it is only visible to this tMap. If you need to store a value for later use, You should use a context variable for this. So define a context variable, add before your tMap where you defined the actual var a tJavaRow. In tJavaRow press the button "generate code" to generate the mapping from in to out for all of your metadada and add the following code as additional line:
&lt;BR /&gt;
&lt;PRE&gt;context.fltnum= input_row.fltnum_new;&lt;/PRE&gt;
&lt;BR /&gt;Now you could change the string for creating the file name to:
&lt;BR /&gt;
&lt;PRE&gt;"C:/users/Milind/ACARS/output/"+context.fltnum+TalendDate.formatDate("yyyyMMddHHmmss", new Date()) + ".dt2"&lt;/PRE&gt;
&lt;BR /&gt;Bye
&lt;BR /&gt;Volker</description>
      <pubDate>Thu, 19 Mar 2009 09:47:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303530#M75400</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-19T09:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303531#M75401</link>
      <description>Thanks Volker, This is what I did 
&lt;BR /&gt;1. Defined a context variable fltnum
&lt;BR /&gt;2. In Map created another output set_fltnum and assigned it to tJavaRow
&lt;BR /&gt;3. In tJavaRow the code is context.fltnum = input_row.fltnum;
&lt;BR /&gt;4. In TFiledelimited used filename = 
&lt;BR /&gt;"C:/users/Milind/ACARS/output/"+context.fltnum+TalendDate.formatDate("yyyyMMddHHmmss", new Date()) + ".dt2" 
&lt;BR /&gt;its still outputting filename as null+timestamp".dt2
&lt;BR /&gt;I know I am doing something wrong but not sure what is it ?</description>
      <pubDate>Thu, 19 Mar 2009 16:49:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303531#M75401</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-19T16:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303532#M75402</link>
      <description>Set your output "set_fltnum" as first output into the tMap and it should work. 
&lt;BR /&gt;Instead of use context variable you could set a new variable into the globalMap:
&lt;BR /&gt;
&lt;PRE&gt;globalMap.put("fltnum", myValue)&lt;/PRE&gt;
&lt;BR /&gt;Then get it by:
&lt;BR /&gt;
&lt;PRE&gt;globalMap.get("fltnum")&lt;/PRE&gt;
&lt;BR /&gt;It's just more verbose, I hope we will improve the globalMap syntax soon.</description>
      <pubDate>Thu, 19 Mar 2009 17:11:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303532#M75402</guid>
      <dc:creator>amaumont</dc:creator>
      <dc:date>2009-03-19T17:11:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303533#M75403</link>
      <description>Thanks to clarify my solution.&lt;BR /&gt;Milind: sorry, my explanation was not clear. You should add the tJavaRow in your stream (not as additional output from tMap). If you use a additional output this should work if you ensure it is processed first. So this output must be upside from your main stream in tMap.&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Thu, 19 Mar 2009 20:57:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303533#M75403</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-19T20:57:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303534#M75404</link>
      <description>Thanks for the suggestion, Again not sure what am I doing wrong .. still same results</description>
      <pubDate>Thu, 19 Mar 2009 22:02:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303534#M75404</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-19T22:02:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303535#M75405</link>
      <description>Hi Milind,&lt;BR /&gt;try to use a tJavaRow. Add the component between SP7 and SP8 tMap.&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Fri, 20 Mar 2009 08:52:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303535#M75405</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-20T08:52:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303536#M75406</link>
      <description>Your screenshot 
&lt;A href="http://www.talendforge.org/forum/postgallery.php?pid=22837&amp;amp;filename=scr_13.JPG" rel="nofollow noopener noreferrer"&gt;http://www.talendforge.org/forum/postgallery.php?pid=22837&amp;amp;filename=scr_13.JPG&lt;/A&gt; seems to be good except you have to set your "set_fltnum" table as first table.
&lt;BR /&gt;Or do the proposition of Volker.</description>
      <pubDate>Fri, 20 Mar 2009 12:58:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303536#M75406</guid>
      <dc:creator>amaumont</dc:creator>
      <dc:date>2009-03-20T12:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303537#M75407</link>
      <description>Thanks a lot for all the help I tried both the things suggested by you .. still there are some issues still producting the same output filename that starts with null.</description>
      <pubDate>Fri, 20 Mar 2009 15:45:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303537#M75407</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-20T15:45:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303538#M75408</link>
      <description>Hi Milind, 
&lt;BR /&gt;sorry. You are right your job cant work. Now, after looking at all screens again and again, I see that I missed the primary point: 
&lt;BR /&gt;The value in the context variable is correct. But you cant use it inside the filename. The file is opened before your data is processed and at this time the variable is null. 
&lt;BR /&gt;So the question is: Do you have different values (and would like to create a file for each line / a group of lines) or do you have only one value. 
&lt;BR /&gt;Only one value: You must process your input two times. In the first step just extract the context variable. In the second process your data. 
&lt;BR /&gt;One file per row: Use tFlowToIterate 
&lt;BR /&gt;One file per group. A little bit more complex... 
&lt;BR /&gt;Sorry again that I missed this point. 
&lt;BR /&gt;Bye 
&lt;BR /&gt;Volker</description>
      <pubDate>Sun, 22 Mar 2009 21:49:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303538#M75408</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-22T21:49:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303539#M75409</link>
      <description>Hi Milind, 
&lt;BR /&gt;for every row one file? 
&lt;BR /&gt;Do the following: 
&lt;BR /&gt;Add before your file output component the following block: 
&lt;BR /&gt;tMap_8 --&amp;gt; tFlowToIterate --&amp;gt; tIterateToFlow --&amp;gt; tFileOutputDelimited 
&lt;BR /&gt;In tFlowToIterate use default settings. 
&lt;BR /&gt;In tIterateToFlow you have to set all your columns of you metadat from tMap_8 again. So for each column use the following code: (Type)globalMap.get("EXCL_OP1.columnName). Replace Type and columnName with the correct values. 
&lt;BR /&gt;Use the same notation for your filename. 
&lt;BR /&gt;Bye 
&lt;BR /&gt;Volker</description>
      <pubDate>Mon, 23 Mar 2009 22:51:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303539#M75409</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T22:51:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303540#M75410</link>
      <description>At last .. was able to succefullu generate the filename as required .. introduced tflowtoiterated between tMAp8 and Outputflie as per your suggestions and shown here 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCoVhCAK" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-How-to-use-Flowtoiterate/td-p/95069&lt;/A&gt; 
&lt;BR /&gt;Thanks a lot Volker, Shong and amaumont ! 
&lt;BR /&gt;Milind</description>
      <pubDate>Mon, 23 Mar 2009 22:52:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303540#M75410</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-23T22:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303541#M75411</link>
      <description>Hi Milind,&lt;BR /&gt;you are welcome.&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Tue, 24 Mar 2009 20:31:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303541#M75411</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-03-24T20:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303542#M75412</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;Hi Milind,&lt;BR /&gt;The value in the context variable is correct. But you cant use it inside the filename. The file is opened before your data is processed and at this time the variable is null. &lt;BR /&gt;So the question is: Do you have different values (and would like to create a file for each line / a group of lines) or do you have only one value. &lt;BR /&gt;Only one value: You must process your input two times. In the first step just extract the context variable. In the second process your data.&lt;BR /&gt;Volker&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Hi Volker, as you can see this is my first post (newbie status) 
&lt;BR /&gt;I have a similar task as this thread and it works well sort off.... i need only 1 csv file to be created using the Year_Month field from row1. I used your tip (*thanks) for creating a loop on the input file so that the second time it runs i dnt have the "null" but the actual value of row1.year_month. 
&lt;BR /&gt;i added a twaitforfile so that i can get the correct filename to upload using FTP and then i move this file to a done folder. 
&lt;BR /&gt;is there any way i can improve on this design?</description>
      <pubDate>Wed, 01 Apr 2009 09:31:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303542#M75412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-01T09:31:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303543#M75413</link>
      <description>Hi,&lt;BR /&gt;welcome in the forum!&lt;BR /&gt;First: Are you sure your job is working? I think using a function code in context definition wouldn't work. But I may be wrong...&lt;BR /&gt;So you need a file as output with a name you will get as input from the data you got from your input file?&lt;BR /&gt;Bye&lt;BR /&gt;Volker</description>
      <pubDate>Wed, 01 Apr 2009 20:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303543#M75413</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-01T20:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign value from tMAP column to global variable ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303544#M75414</link>
      <description>yup thats correct.</description>
      <pubDate>Wed, 01 Apr 2009 20:18:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-assign-value-from-tMAP-column-to-global-variable/m-p/2303544#M75414</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2009-04-01T20:18:34Z</dc:date>
    </item>
  </channel>
</rss>

