Hitachi Vantara Pentaho Community Forums
Results 1 to 9 of 9

Thread: Disable Steps in Transformation

  1. #1
    Join Date
    Jan 2018
    Posts
    22

    Default Disable Steps in Transformation

    Hi everybody,
    I have a transformation where I read from some tables, and I write to some output tables like:

    Table A -> Destination Table A
    Table B -> Destination Table B
    Table C -> Destination Table C
    Table D -> Destination Table D

    The steps are connected as couples, so there's currently no connection between the A Steps and the B Steps.

    I'd like to test the transformation, however for some troubleshooting, I have the need to exclude the B steps and D steps from running when I run the transformation.

    Is there a way to disable, "comment out", skip, some steps in a single transformation?

    Many thanks in advance!

  2. #2
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    I would Cut & Paste the steps you don't want for now.

  3. #3
    Join Date
    Jan 2018
    Posts
    22

    Default

    Hi marabu,
    thanks for the advice, this means there's no other way to skip steps?

  4. #4
    Join Date
    Jun 2012
    Posts
    5,534

    Default

    I don't know. Let's wait for my mentor to shed some light on this.

  5. #5
    Join Date
    Apr 2008
    Posts
    4,696

    Default

    You could setup a set of parameters SkipA, SkipB, SkipC, SkipD with default to "False"
    Then in your table input do:
    SELECT * from TABLEA where ( ... ) and ${SkipA}='False'
    Your DB would respond back with no rows, sending nothing to the destination table.

  6. #6
    Join Date
    Jan 2018
    Posts
    22

    Default

    I see,
    indeed this looks better for my purpose, so that I can keep the Transformation intact.
    If I'll find some time I may write a plugin for this purpose.

    Many thanks to both of you!

  7. #7
    Join Date
    Aug 2016
    Posts
    290

    Default

    You would typically start with an input step (SELECT ... FROM A). Why not just disable the output hop from that step? The rest of the steps would receive no input rows.
    The only 'problem' with this approach is if you don't want the initial sql to be fired from the steps you disabled the output hops (maybe they do more than select or you don't want those sqls to be logged etc.).
    I guess this could cause problems if subsequent steps required some columns no longer passed from the input step. Alternatively you could just add "limit 0" to the sql of those input steps you don't want to run.
    Last edited by Sparkles; 01-18-2018 at 05:16 AM.

  8. #8
    Join Date
    May 2014
    Posts
    358

    Default

    Quote Originally Posted by marivol View Post
    Is there a way to disable, "comment out", skip, some steps in a single transformation?
    Click on the hop leading to the table output to disable it (will show as grey instead of black), then the table output will receive no rows to write to the database. Disable the "truncate" option in the table outputs so that they don't delete your data.

  9. #9
    Join Date
    Dec 2013
    Posts
    2

    Default

    Actually there is a way to do this. Go to the marketplace and install "Data sets and unit tests for PDI". It was made specifically for this reason.
    It will allow you to create a series of unit tests, which can redirect/disable steps.

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.