Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: how to get a partie of data through all the tables

  1. #1

    Default how to get a partie of data through all the tables

    Hi

    I wanna get 1m line of each table in my database to cvs files,
    first of all, i get all tables names and set them as variable, then pass it to another job
    in my job,
    a) when I use 'table input' , put variable in 'SELECT * from ${tablename} limit ...', the next step 'text output' doesn't know all the fields

    b) when I use a 'execute SQL script', put 'SELECT * FROM ${tablename} into outfile ...' , the exception 'ResultSet is from UPDATE. No Data' is throwed.

    anyone know some way to get this job done?

    Re
    Lin

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    You can still do it with a Text File Output.
    If you don't specify any fields there, it assumes you want to output all fields. As usual YMMV.

    Consider using "Reservoir Sampling" to get a random selection of 1M rows.
    The "process all tables" sample job almost gets you there.

    Matt

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.