Time for action – getting orders in a range of dates by using Kettle variables
In this tutorial, you will do the same as you did in the previous tutorial but another method will be explained.
Open the main transformation from the Time for action – getting data about shipped orders section, and save it under a new name.
Double-click on the Table input step.
Modify the
SELECT
statement as follows:SELECT ORDERNUMBER , ORDERDATE , REQUIREDDATE , SHIPPEDDATE FROM ORDERS WHERE STATUS = 'Shipped' AND ORDERDATE BETWEEN '${DATE_FROM}' AND '${DATE_TO}'
Check the Replace variables in script? checkbox.
Save the transformation.
With the Select values step selected, click on the Preview button.
Click on Configure.
Fill the Variables grid in the dialog setting window. To the right of DATE_FROM, write
2004-12-01,
and to the right of DATE_TO, write2004-12-10
.Click on OK. The following window appears:
What just happened?
You modified the transformation from the previous tutorial so the range of dates is taken...