Once a data warehouse begins its operation, you need to regularly feed new data from the source to your data warehouse, as discussed in Chapter 8, “Regular Population.” To ensure a steady stream of data, you schedule regular population using the job scheduler available on your platform. This chapter, the last in Part II, shows you how to set up a regular population as a scheduled task in Windows. The scheduler will call a batch file that in turn invokes the script discussed in Chapter 8.
Chapter 8 discussed the dw_regular.sql script to load new data. This script needs to be run daily. Listing 9.1 presents a batch file that should be invoked to run the dw_regular.sql script.
Listing 9.1: DW regular population batch
mysql.exe -udwid uuserid -ppw -D dw < c:\mysql\scripts\dw_regular.sql
You must call the mysql.exe command with the correct user id and password and specify the database name and the full path to the dw_regular.sql script.