Docsity

Regular Population Scheduling-Data Warehouse-Lab Mannual, Lecture notes of Data Warehousing

Toggle sidebar
bg1
Chapter 9: Regular Population Scheduling
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.
Preparing the Batch File
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.
Scheduling the Batch Job
Now that you have a batch file that calls the regular_dw.sql script, you can proceed with
scheduling it with Windows Scheduled Task. The following provides step-by-step instructions
on how to do it.
1. Open your Control Panel and select Scheduled Tasks.
2. Click Select Add Scheduled Task. The first screen of the Scheduled Task Wizard will
appear, as shown in Figure 9.1.
docsity.com
pf3
pf4
pf5

Partial preview of the text

Download Regular Population Scheduling-Data Warehouse-Lab Mannual and more Lecture notes Data Warehousing in PDF only on Docsity!

Chapter 9: Regular Population Scheduling

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.

Preparing the Batch File

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.

Scheduling the Batch Job

Now that you have a batch file that calls the regular_dw.sql script, you can proceed with scheduling it with Windows Scheduled Task. The following provides step-by-step instructions on how to do it.

  1. Open your Control Panel and select Scheduled Tasks.
  2. Click Select Add Scheduled Task. The first screen of the Scheduled Task Wizard will appear, as shown in Figure 9.1.
  1. Click Next. You will see the second window of the Scheduled Task Wizard. Locate Command Prompt from the Application list. Figure 9.2 shows the window after you select the application to be scheduled.
  2. Click Next again, you will see the third window of the Scheduled Task Wizard, as shown in Figure 9.3. Type in “DW Regular Load” as the name of the scheduled task and select Daily from the “Perform this task:” option list.
  3. Click Next again and you will see the next screen that prompts you to select a time for invoking the scheduled task, as shown in Figure 9.4.
  1. Enable the Open advanced properties for this task when I click Finish check box and click Finish.
  2. The Advanced Properties window will appear, as shown in Figure 9.7. 9.. Click the Browse button and browse the file system and select the dw_regular_load.bat file.

10.. Click the Set password button and you will see the Set Account Information box similar to Figure 9.8. Type in your user name and password and click OK.

The daily scheduled task of your data warehouse regular load is now set up. It will start to run at the date and time you specified. You can see a new icon in the Scheduled Tasks window, as shown in Figure 9.9.

Summary

In this chapter you learned to set up a regular population job as a Windows scheduled task. Having done the ETL process and the various types of population, including the regular population scheduling, you are now ready to get your starter data warehouse up and running.