<?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: Using Context variable in tMap output Column in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288564#M62039</link>
    <description>You can only do it by manually creating the column headings in your output file using tFixedFlowInput.  Then just append your actual rows to the same file.</description>
    <pubDate>Sun, 25 Aug 2013 03:39:40 GMT</pubDate>
    <dc:creator>alevy</dc:creator>
    <dc:date>2013-08-25T03:39:40Z</dc:date>
    <item>
      <title>Using Context variable in tMap output Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288560#M62035</link>
      <description>Hi, I have created a Job to read CSV file, remove the double quotes and all and save to another CSV file.
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;tFileInputDelimited -----&amp;gt; tMap ----&amp;gt; tFileOutputDelimited&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;I am using two context variables.
&lt;BR /&gt;1.File_Name
&lt;BR /&gt;2. Name
&lt;BR /&gt;In the tFileInputDelimited, I am setting the file name to context.File_Name.
&lt;BR /&gt;I am mapping the source file to output file. And mapping all the columns in source to output. And it is working. 
&lt;BR /&gt;Column mapping are 
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;&lt;B&gt;row1 output&lt;/B&gt;&lt;BR /&gt;id --------------------------------------------------------------------- id&lt;BR /&gt;name --------------------------------------------------------------- name&lt;BR /&gt;city ------------------------------------------------------------------ city&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;Now I want to add a new column in the output file. The column header should be the context.Name value. That is if I give context.Name value to "country" , the output file should have following columns
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;id||name||city||country&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;I tried adding context.Name in the tMap. But it was showing red mark when i typed '.', means error.
&lt;BR /&gt;So how can I achieve that?</description>
      <pubDate>Sat, 16 Nov 2024 11:55:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288560#M62035</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T11:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context variable in tMap output Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288561#M62036</link>
      <description>Hi, 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;I tried adding context.Name in the tMap. But it was showing red mark when i typed '.', means error.&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;BR /&gt;Is there a right output in your job. Could you paste your trouble screenshot into forum so that I can address your current situation precisely. 
&lt;BR /&gt;I have made a testing, everything is OK. 
&lt;BR /&gt;See my screenshots 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAmE.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154571i5EF6D899F85B6F31/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAmE.png" alt="0683p000009MAmE.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAg5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/139204iA788F4640CD1B4ED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAg5.png" alt="0683p000009MAg5.png" /&gt;&lt;/span&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MAyI.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138174i3058E6A6626FCDA9/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MAyI.png" alt="0683p000009MAyI.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Fri, 23 Aug 2013 08:48:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288561#M62036</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-23T08:48:49Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context variable in tMap output Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288562#M62037</link>
      <description>Oh. Not there. I know this is possible. I am asking about the column name, not the column values.
&lt;BR /&gt;In that, you have created a column 'country'. But I want that as 
&lt;B&gt;context.Name&lt;/B&gt;
&lt;BR /&gt;So whatever value I give, the column header should be that value.
&lt;BR /&gt;In the following image as you can see, I want to add a new column to output. Instead of newColumn, I was trying to type "context.Name" But I was not able to do.
&lt;BR /&gt;Simply if i give "country" as value. columns should be
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;id||name||city||country&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;if i give "state" as value. columns should be
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;id||name||city||state&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;How can I achieve it?
&lt;BR /&gt;
&lt;A href="http://postimg.org/image/hnwz1zc2t/full/" target="_blank" rel="nofollow noopener noreferrer"&gt;&lt;IMG src="https://community.qlik.com/" /&gt;&lt;/A&gt;</description>
      <pubDate>Fri, 23 Aug 2013 09:45:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288562#M62037</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-23T09:45:55Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context variable in tMap output Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288563#M62038</link>
      <description>Hi, 
&lt;BR /&gt;Talend don't allow to set context in schema setting or define the schema programmatically using tJava component. 
&lt;BR /&gt;Talend Enterprise Subscription Version provide "Dynamic Schema" feature which allows you to design schema with an unknown column structure (unknown name and number of columns). 
&lt;BR /&gt; 
&lt;A href="https://help.talend.com/pages/viewpage.action?pageId=5671283" target="_blank" rel="nofollow noopener noreferrer"&gt;TalendHelpCenter:How to process changing data structure?&lt;/A&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 23 Aug 2013 10:06:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288563#M62038</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-23T10:06:51Z</dc:date>
    </item>
    <item>
      <title>Re: Using Context variable in tMap output Column</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288564#M62039</link>
      <description>You can only do it by manually creating the column headings in your output file using tFixedFlowInput.  Then just append your actual rows to the same file.</description>
      <pubDate>Sun, 25 Aug 2013 03:39:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Using-Context-variable-in-tMap-output-Column/m-p/2288564#M62039</guid>
      <dc:creator>alevy</dc:creator>
      <dc:date>2013-08-25T03:39:40Z</dc:date>
    </item>
  </channel>
</rss>

