Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Columns in two tables with same name

  1. #1
    Join Date
    Apr 2007
    Posts
    1

    Default Columns in two tables with same name

    Here is an example of situation I am facing

    I joined two tables t1 and t2 using the Join step and output goes to another table. Both the tables contain a column called "description". In the output table I need to put these two different descriptions in different columns. Say the columns in target are called t1_description and t2_description. When I go to generate a mapping, the list of source fields shows only one field called "description". It appears that it is suppressing the other column (which is also named as "decsription"). It is unable to distinguish between two columns from two different tables which have same name.
    The only way I could get this working was to rename the column in one of the sources by using a column alias in the select statement. But this will mean manually editing SQl statements in all input tables. This is time consuming.
    Is there a better way to do this?

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    A select values step, but that would be even more work. So no.

    About the suppressions... a row is more or less like a row in a table, it can't have multiple columns with the same name. A side effect of the implementation is that the first column is used.

    Regards,
    Sven
    Last edited by sboden; 04-03-2007 at 09:42 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.