Databases Reference
In-Depth Information
We might use such a job if, for example, we wanted to report on-sales data from our
database every hour. In reality, the job would not write to a tLogRow component,
but might write to a file or, perhaps send an e-mail, but for convenience, we'll use
the console display component.
Click on the tLoop component to view its configuration:
In this case, we have configured it to use a For type of loop, specifically, loop from 1
to 12 with an increment step of one each time. As you can see, we can also configure
a While loop.
The tMySQLInput component has a simple query that extracts the sum of the
invoice values from the invoices table.
Our final component, the tSleep component, configures the pause (in seconds)
between each execution of the loop. To run the query every hour, this should be set
to 3600 , but set the Pause (in seconds) value to 10 and run the job. You will see the
first execution take place and write the output of the query to the console screen. The
job will then wait for 10 seconds before executing again, and it continues this pattern
until 12 executions have taken place. Note that in our example the query output is
the same each time as the invoices table is not being updated between executions,
but our example scenario in a live system would show different values every hour.
 
Search WWH ::




Custom Search