title: looping in a Kettle transformation
body: <p>I want to repetitively execute an SQL query looking like this:</p>
  
  <pre><code>SELECT '${date.i}' AS d, 
    COUNT(DISTINCT xid) AS n
  FROM table 
  WHERE date 
    BETWEEN DATE_SUB('${date.i}', INTERVAL 6 DAY) 
      AND '${date.i}'
  ;
  </code></pre>
  
  <p>It is basically a grouping by time spans, just that those are intersecting, which prevents usage of GROUP BY.</p>
  
  <p>That is why I want to execute the query repetitively for every day in a certain time span. But I am not sure how I should implement the loop. What solution would you suggest?</p>
  
  <p>The Kettle variable date.i is initialized from a global variable. The transformation is just one of several in the same transformation bundle. The "stop trafo" would be implemented maybe implicitely by just not reentering the loop.</p>
  
  <p>Here's the flow chart:</p>
  
  <p><img src="https://i.stack.imgur.com/ShuoQ.png" alt="enter image description here"></p>