<?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 get alias applied when gessing shema from a query? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351340#M118015</link>
    <description>This is not a problem caused by Talend. This is caused by the database driver and its usage of database metadata.
&lt;BR /&gt;I have a very similar problem with DB2.
&lt;BR /&gt;A way to forth the driver to use the alias is to fake a funktion:
&lt;BR /&gt;in case of a number field (s1.code+0) as source1_code
&lt;BR /&gt;in case of a character field (s1.code||'') as source1_code
&lt;BR /&gt;This way you will probably get the alias name instead of the original column name.</description>
    <pubDate>Fri, 02 Aug 2013 14:31:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2013-08-02T14:31:30Z</dc:date>
    <item>
      <title>How to get alias applied when gessing shema from a query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351339#M118014</link>
      <description>Hi,&lt;BR /&gt;I am new to this forum and quite new to Talend also. I am using it as an ETL to populate my datawarehouse and perform some audit stuff.&lt;BR /&gt;In order to retrieve data from a MySQL source, I wrote a query using some alias to get proper naming but Talend does not take them into account when gessing the schema.&lt;BR /&gt;Let take a basic example:&lt;BR /&gt;If I use the following query&lt;BR /&gt;"SELECT &lt;BR /&gt;     s1.code as source1_code,&lt;BR /&gt;     s2.code as source2_code&lt;BR /&gt;FROM&lt;BR /&gt;     Source1 s1 INNER JOIN Source2 s2 ON s1.source2_id=s2.id"&lt;BR /&gt;Talend gess code and code1 instead of source1_code and source2_code.&lt;BR /&gt;Could anyone help?&lt;BR /&gt;Thanks</description>
      <pubDate>Fri, 02 Aug 2013 07:01:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351339#M118014</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-02T07:01:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to get alias applied when gessing shema from a query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351340#M118015</link>
      <description>This is not a problem caused by Talend. This is caused by the database driver and its usage of database metadata.
&lt;BR /&gt;I have a very similar problem with DB2.
&lt;BR /&gt;A way to forth the driver to use the alias is to fake a funktion:
&lt;BR /&gt;in case of a number field (s1.code+0) as source1_code
&lt;BR /&gt;in case of a character field (s1.code||'') as source1_code
&lt;BR /&gt;This way you will probably get the alias name instead of the original column name.</description>
      <pubDate>Fri, 02 Aug 2013 14:31:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351340#M118015</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-02T14:31:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to get alias applied when gessing shema from a query?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351341#M118016</link>
      <description>Ok thanks
&lt;BR /&gt;I confirm the way you fake function works good to get the alias name.
&lt;BR /&gt;But I think I will prefer renaming the column names by myself before storing them into generic schemas. Maybe it is a more proper way.</description>
      <pubDate>Fri, 02 Aug 2013 17:12:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-get-alias-applied-when-gessing-shema-from-a-query/m-p/2351341#M118016</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2013-08-02T17:12:12Z</dc:date>
    </item>
  </channel>
</rss>

