Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: How to truncate tables decided dynamically

  1. #1
    Join Date
    Oct 2014
    Posts
    26

    Default How to truncate tables decided dynamically

    I am trying to truncate a list of tables dynamically.
    I created a job that calls a transformation. This transformation reads from the dabadase (table input) which are the tables to be truncated:
    select name from tb_control_transformation where ind_truncate is true

    Theses rows are copied to a 'Copy rows to result' step.

    The rows from this step are then passed to a 'Truncate Tables' step (the option 'Previous results to args?' is marked).

    When I run the job I get an error:
    2015/10/21 16:00:08 - Truncate tables 2 - ERROR (version 6.0.0.0-353, build 1 from 2015-10-07 13.27.43 by buildguy) : An error occurred executing this job entry: null

    Did anyone use the option 'Previous results to args?' of the step 'Truncate Tables' succesfully?

    Could someone provide me a working example?

    Br,
    Orair.

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

    Default

    Quote Originally Posted by orair View Post
    select name from tb_control_transformation where ind_truncate is true

    Theses rows are copied to a 'Copy rows to result' step.
    Two fields per result row are expected by Truncate-Tables, the second one being a schema identifier which may be null.
    Try something like SELECT NAME, NULL AS schema FROM ... and see what happens.
    So long, and thanks for all the fish.

Tags for this Thread

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.