Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Simple script results output using pl/sql

  1. #1
    Join Date
    May 2015
    Posts
    4

    Question Simple script results output using pl/sql

    <pre>
    Hello - just trying to get results (v_test) from the pl/sql block into a text file.

    Execute SQL script:

    DECLARE
    x NUMBER := 100;
    v_test number;
    BEGIN
    FOR i IN 1..10 LOOP
    x := x + 100;
    END LOOP;
    COMMIT;
    v_test:=x;
    END;

    transformation steps( not sure if this is the correct algorithm)
    generate_rows > execute SQL script > test file output

    So, can we use pl/sql in the execute SQL script step and view the results in the next step?

    </pre>

  2. #2
    Join Date
    Sep 2014
    Posts
    175

    Default

    I would use Table Input instead.

    You're trying to grab something from a table (applying SQL transformations in the process) --- and then take that to an output (text file, whatever).



    Well, that's if you want each row result (100, 200, 300) passed on to the text file. The 'execute sql script' step can pass along basic info (number of rows updated, inserted, read, or deleted) to an output.
    Last edited by cool_runnings; 05-04-2015 at 05:17 PM.

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.