Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Table input

  1. #1
    Join Date
    Feb 2011
    Posts
    240

    Default Table input

    Hi.

    This my transformation:

    Table input -> Table output

    The sql into Table input is:


    SELECT
    JDBINTERF_VERSION
    , JDBINTERF_LASTCNG
    , N_CARTELLA
    , DATA_APERTURA
    , DATA_CHIUSURA
    , COD_OPERATORE
    , COD_REG
    , COGNOME
    , NOME
    , COD_COM_NASC
    , DATA_NASC
    , SESSO
    , CITTADINANZA
    , COD_FISC
    , COD_USL
    , NMAX_CONTATTI
    , MOTIVO_CHIUSURA
    , BLOCCATO
    , NAZIONALITA
    , IDREGIONALE
    , UID_COL
    , ETA
    FROM SINSNT_TEST.CARTELLA, SINSNT_TEST.CARTELLA_ETA


    When I click on Preview there is an error:

    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : Errore inatteso :
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : org.pentaho.di.core.exception.KettleDatabaseException:
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : An error occurred executing SQL:
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : SELECT
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : JDBINTERF_VERSION
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , JDBINTERF_LASTCNG
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , N_CARTELLA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , DATA_APERTURA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , DATA_CHIUSURA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , COD_OPERATORE
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , COD_REG
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , COGNOME
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , NOME
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , COD_COM_NASC
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , DATA_NASC
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , SESSO
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , CITTADINANZA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , COD_FISC
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , COD_USL
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , NMAX_CONTATTI
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , MOTIVO_CHIUSURA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , BLOCCATO
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , NAZIONALITA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , IDREGIONALE
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , UID_COL
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : , ETA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : FROM SINSNT_TEST.CARTELLA, SINSNT_TEST.CARTELLA_ETA
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) :
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : ORA-00918: definizione della colonna ambigua

    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : org.pentaho.di.core.database.Database.openQuery(Database.java:1864)
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : org.pentaho.di.trans.steps.tableinput.TableInput.doQuery(TableInput.java:221)
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : org.pentaho.di.trans.steps.tableinput.TableInput.processRow(TableInput.java:130)
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : org.pentaho.di.trans.step.RunThread.run(RunThread.java:40)
    2011/10/06 17:10:59 - sins_anagra.0 - ERROR (version 4.1.0-stable, build 14410 from 2010-11-16 16.43.28 by buildguy) : java.lang.Thread.run(Thread.java:619)

    why?

    thanks

    Mariarita

  2. #2
    Join Date
    Sep 2011
    Posts
    190

    Default

    Here's why: ORA-00918: definizione della colonna ambigua

    You select from TWO tables:
    SINSNT_TEST.CARTELLA
    SINSNT_TEST.CARTELLA_ETA
    (without JOIN btw, which is always suspicious. Are you sure you want this?)

    Apparently, in your list of columns, there's a columnname that exists in BOTH tables.
    In that case Oracle (or any other RDBMS) doesn't know from which table you want to see the results.

    You should add an alias to the tables, and prefix the alias before the column in the select list.

  3. #3
    Join Date
    Feb 2011
    Posts
    240

    Default

    SELECT
    CARTELLA.JDBINTERF_VERSION as "JDBINTERF_VERSION_C"
    , CARTELLA.JDBINTERF_LASTCNG as "JDBINTERF_LASTCNG_C"
    , CARTELLA_ETA.JDBINTERF_VERSION as "JDBINTERF_VERSION_CE"
    , CARTELLA_ETA.JDBINTERF_LASTCNG as "JDBINTERF_LASTCNG_CE"
    , CARTELLA.N_CARTELLA as "N_CARTELLA_C"
    , CARTELLA_ETA.N_CARTELLA as "N_CARTELLA_CE"
    , DATA_APERTURA
    , DATA_CHIUSURA
    , COD_OPERATORE
    , COD_REG
    , COGNOME
    , NOME
    , COD_COM_NASC
    , DATA_NASC
    , SESSO
    , CITTADINANZA
    , COD_FISC
    , COD_USL
    , NMAX_CONTATTI
    , MOTIVO_CHIUSURA
    , BLOCCATO
    , NAZIONALITA
    , IDREGIONALE
    , UID_COL
    , ETA
    FROM SINSNT_TEST.CARTELLA, SINSNT_TEST.CARTELLA_ETA

    WHERE CARTELLA.N_CARTELLA = CARTELLA_ETA.N_CARTELLA

    And now?
    the error is the same.

  4. #4
    Join Date
    Feb 2011
    Posts
    240

    Default

    I solved, there was another column name that existed in BOTH tables

    thanks very much

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.