Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Create loops in a job

  1. #1
    Join Date
    Dec 2014
    Posts
    7

    Default Create loops in a job

    Hi all,

    I am completely new to using Penthaho (Kettle), I am very impressed how powerful and friendly tool it is. However I am sure I am not using it to its full capacity. I have heard somewhere that I can create 'loops' for repetitive tasks.

    I have a process --> get a file (Adobe server) from FTP --> create a table --> Bulk load --> Format Data --> Insert into AGG Table --> Drop the table (for bulkload). This process needs to be repeated for 4 channels. So the question is, do I have to repeat the process and change the table names or can I make it easier (clever).

    I have search for loops in a search box but got no results. Any hint would be appreciated. I have also attached the file.

    Thanks,

    Jakub
    Attached Files Attached Files

  2. #2
    Join Date
    Aug 2014
    Posts
    1

    Default

    Hi all,

    Even I have to run a transformation in loop, to insert into DB the values,Is it possible to loop a transformation. Thanks in advance.

  3. #3

    Default

    Some hints;
    Create a job that performs your basic action for one channel. Use parameters (job/transformation properties) for everything that should be dynamic. Pass down those parameters (done by default) to each transformation inside this job. Access those parameters like a variable (${...}).

    Now, create a new parent job that executes this channel-job. And, set something before this job that submits the variable information for each channel. One channel=one row. This can be a transformation with a data grid and opy rows to result step, or job entry "evaluate rows number in a table" with "Add rows to result" option. Just tick then on your basic channel job "execute for each row" and map the stream values to your parameters.

    This is just a classic concept for a loop. There are way more posibilities to get it.

    And hey - you should change your ftp passwords now...
    Last edited by MichaelBieri; 02-19-2015 at 04:49 PM.

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

    Default

    No need to loop over result rows now that we have the transformation and job executor steps available.

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.