<?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 how to give column names through context in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325121#M94749</link>
    <description>hi,
&lt;BR /&gt;I have one tfileinputdelimit---&amp;gt;tjavaflex
&lt;BR /&gt;tfileinputdelimit has columns id,name,age,amt.
&lt;BR /&gt;i have to add "amt" column data to a list in a generalized way. that means by entering column name through context, we should get a resultant list contains the values of column "amt"( which is specified through context variable).
&lt;BR /&gt;now i am doing like this,
&lt;BR /&gt;inside of tjavaflex
&lt;BR /&gt;---------------------
&lt;BR /&gt;list1.add(row1.amt);
&lt;BR /&gt;but, instead of this column name "amt" should be given through context parameter, such that resultant list contains "amt" column data.
&lt;BR /&gt;can any one suggest me how to achieve it?</description>
    <pubDate>Sat, 16 Nov 2024 12:43:39 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T12:43:39Z</dc:date>
    <item>
      <title>how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325121#M94749</link>
      <description>hi,
&lt;BR /&gt;I have one tfileinputdelimit---&amp;gt;tjavaflex
&lt;BR /&gt;tfileinputdelimit has columns id,name,age,amt.
&lt;BR /&gt;i have to add "amt" column data to a list in a generalized way. that means by entering column name through context, we should get a resultant list contains the values of column "amt"( which is specified through context variable).
&lt;BR /&gt;now i am doing like this,
&lt;BR /&gt;inside of tjavaflex
&lt;BR /&gt;---------------------
&lt;BR /&gt;list1.add(row1.amt);
&lt;BR /&gt;but, instead of this column name "amt" should be given through context parameter, such that resultant list contains "amt" column data.
&lt;BR /&gt;can any one suggest me how to achieve it?</description>
      <pubDate>Sat, 16 Nov 2024 12:43:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325121#M94749</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T12:43:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325122#M94750</link>
      <description>Hi 
&lt;BR /&gt;What's the data type of context parameter now? String? Let's assume it is a string type, 
&lt;BR /&gt;define a context variable called name, set its default value as "" 
&lt;BR /&gt;context.name=context.name+","+row1.arm 
&lt;BR /&gt;For use later, we can normalize the context.name. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Mon, 22 Aug 2011 13:35:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325122#M94750</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-22T13:35:53Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325123#M94751</link>
      <description>hi,
&lt;BR /&gt;thanks for quick reply.
&lt;BR /&gt;But my requirement is, user has to give column name through context parameter, he don't want to hard code column name like "row1.amt" in job.
&lt;BR /&gt;by giving column name like "amt" in context parameter, amt column data has to be added to a list.
&lt;BR /&gt;please suggest a way to do it?</description>
      <pubDate>Mon, 22 Aug 2011 14:41:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325123#M94751</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-22T14:41:27Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325124#M94752</link>
      <description>hi, 
&lt;BR /&gt;can any one please lookinto this, as it is urgent.
&lt;BR /&gt;how to compare two diiferent columns from two different files in a generalized way without hard coding the column names in job like row1.amt.
&lt;BR /&gt;on just giving the column names through context, the comparision has to be happen.</description>
      <pubDate>Tue, 23 Aug 2011 11:49:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325124#M94752</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-23T11:49:49Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325125#M94753</link>
      <description>hi,&lt;BR /&gt;can any one please look into the issue.&lt;BR /&gt;it is urgent.</description>
      <pubDate>Wed, 24 Aug 2011 11:51:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325125#M94753</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-24T11:51:16Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325126#M94754</link>
      <description>You probably have to play with the Java Reflections class for this...&lt;BR /&gt;&lt;A href="http://tutorials.jenkov.com/java-reflection/fields.html" rel="nofollow noopener noreferrer"&gt;http://tutorials.jenkov.com/java-reflection/fields.html&lt;/A&gt;</description>
      <pubDate>Wed, 24 Aug 2011 18:45:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325126#M94754</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-24T18:45:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325127#M94755</link>
      <description>Hi 
&lt;BR /&gt;Please have a look at this topic, I showed how to get the column name through Java reflections class. 
&lt;BR /&gt; 
&lt;A href="https://community.qlik.com/s/feed/0D53p00007vCp3ICAS" rel="nofollow noopener noreferrer"&gt;https://community.talend.com/t5/Design-and-Development/resolved-how-to-get-the-column-names-in-a-data-flow/td-p/99172&lt;/A&gt; 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Thu, 25 Aug 2011 04:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325127#M94755</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-08-25T04:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325128#M94756</link>
      <description>hi,
&lt;BR /&gt;thanks for reply.
&lt;BR /&gt;but my question is I am having one tfileinputdelimited----&amp;gt;tjavaflex
&lt;BR /&gt;inside tjavaflex
&lt;BR /&gt;java.util.list list1=new java.util.ArrayList();
&lt;BR /&gt;list1.add(row1.amt)
&lt;BR /&gt;this coding will add the "amt" column values to a list called list1.
&lt;BR /&gt;But how we can make it in generalize way with out hard coding the line "row1.amt"?
&lt;BR /&gt;Is it possible to give this "row1.amt" through context?
&lt;BR /&gt;As per your suggestion above, we will get column names but how to pass the column names to "row1.amt"?
&lt;BR /&gt;please provide a sample job which will does it.
&lt;BR /&gt;thanks,</description>
      <pubDate>Thu, 08 Sep 2011 12:06:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325128#M94756</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-08T12:06:12Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325129#M94757</link>
      <description>Hi 
&lt;BR /&gt;Because you only want to add the column name into the list, there should be at least and only one row. 
&lt;BR /&gt; 
&lt;PRE&gt;String columnName=null;&lt;BR /&gt;java.lang.reflect.Field field[]= row1.getClass().getDeclaredFields();&lt;BR /&gt;for(int i=2;i&amp;lt;field.length;i++){&lt;BR /&gt;      columnName=field&lt;I&gt;.getName().toLowerCase();&lt;BR /&gt;       System.out.println(columnName);&lt;BR /&gt;       list.add(columnName);&lt;BR /&gt;     }&lt;/I&gt;&lt;/PRE&gt; 
&lt;BR /&gt;For more information, please see my screenshot. 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Shong</description>
      <pubDate>Fri, 09 Sep 2011 05:22:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325129#M94757</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-09T05:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325130#M94758</link>
      <description>hi,&lt;BR /&gt;thanks for sending jobs.&lt;BR /&gt;but, here my requirement is not to add column name to a list.&lt;BR /&gt;adding column values( column data) to the list.&lt;BR /&gt;In sample job, you are adding column name to a list.But I want to add column content to a list.&lt;BR /&gt;Is there any way to do it?</description>
      <pubDate>Mon, 12 Sep 2011 10:56:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325130#M94758</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-09-12T10:56:14Z</dc:date>
    </item>
    <item>
      <title>Re: how to give column names through context</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325131#M94759</link>
      <description>&lt;P&gt;Have you got any solution to resolve this issue.If so please share me aslo.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Jun 2020 12:04:57 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-give-column-names-through-context/m-p/2325131#M94759</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-06-18T12:04:57Z</dc:date>
    </item>
  </channel>
</rss>

