Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: SQl generated in in the table output step?

  1. #1
    Join Date
    Mar 2007
    Posts
    158

    Default SQl generated in in the table output step?

    Here is the SQL script which gets generated when I take input from anothe rtable input and direct to the table output step!


    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN LEGACY_COMPANY_ID VARCHAR(10)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN LEGACY_USER_ID VARCHAR(8)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN LEGACY_SYSTEM VARCHAR(4)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN COMP_ID VARCHAR(20)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN COMP_NAME VARCHAR(50)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN COMP_STATUS VARCHAR(3)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN USER_LOGIN_ID VARCHAR(20)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN USER_FIRST_NAME VARCHAR(50)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN USER_LAST_NAME VARCHAR(50)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN USER_STATUS VARCHAR(3)
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN USER_CHANGE_DATE TIMESTAMP
    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN LEGACYCOMPID

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN LEGACYUSERID

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN LEGACYSYSID

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN PTY_ID

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN PTY_NM

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN STS_CD

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN USR_LOGN_ID

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN USR_FRST_NM

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN USR_LAST_NM

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN USR_STS_CD

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN STS_CHG_DT

    ;
    ALTER TABLE REPORTS.IRORPHANED DROP COLUMN GUID
    ;
    ALTER TABLE REPORTS.IRORPHANED ADD COLUMN GUID VARCHAR(40)
    ;



    The last few steps are about droping columns!
    what is this?
    Does it drop the columns in the target table?

    can anyone one explain this?

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

    Default

    It's designed to make the table look how PDI would expect it with the arguments you entered in the step.

    I only use it to play around with tables, never to make changes in production. It also has some akward behaviour that if your table does not 100% match what PDI thinks is ok, it will suggest to alter the table.

    It also does not do data migration ... so don't use it on anything else than your playground database.

    Regards,
    Sven

  3. #3
    Join Date
    Mar 2007
    Posts
    158

    Default

    You mean that I should not execute this qury!
    or u mean something else?
    any how we have to use this step in production.

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

    Default

    Don't execute the query. That part is not used duing the runtime of the transformation... it's to make it easy to make some "play tables".

    You execute the query while "playing", but don't ever run it while you have data in the table.

    Regards,
    Sven

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.