Metrics User's Guide > Using QPR Metrics > Other Issues:
Schedule SQL Import
Schedule SQL Import
When performing an SQL import, you can schedule the task to occur on a certain day of a period or at intervals (on a specified date and time). This is helpful for automatically updating your model to contain the latest values of your company database. For example, you can schedule the import to run every night and thereby automatically update your model every night.
Defining Scheduled Imports from SQL Databases
To define a scheduled import from an SQL database, do the following:
Open the Element Properties window and click the Value tab.
In the Value tab, select a series and select SQL Import from the Input type for selected series: drop-down menu. Then click the Define... button. The SQL Import window is displayed. Select the Scheduling tab.
Select the Scheduled check box (to specify that the import will be a scheduled one). In the case you are editing multiple imports, the initial appearance of the checkbox indicates the current scheduling status of the selection in the following way:
Checkbox checked: All selected imports are scheduled
Checkbox not checked: None of the selected imports are scheduled
Checkbox checked, but grayed: Some of the selected imports are scheduled
Type the starting date of the import task in the Start Date field. You can also select the date from the calendar that opens when you click the arrow in the Start Date field.
Type the starting time of the import task in the Start Time field.
Note that the Start date and Start time define only the time when the scheduled import task is started, not the actual start time of the import itself.
If this import has previously been specified as scheduled, the Last Executed and Status information will be displayed in the corresponding fields.
In the Recurrence pattern section, select whether to base the import interval on the Hourly, Daily, Weekly, or Monthly recurrence, or On period change.
If you have selected Hourly recurrence, input a value to the Recur every field. This defines the hourly interval. The value at the Start at field defines the minute of the hour on which the import is executed. For example, the values can be entered so that the import will be executed on the 15th minute of every 12 hours.
If you have selected Daily recurrence, select whether you want to import to be executed every <value> days or every weekday and define the time of the day for the import.
If you have selected Weekly recurrence, define the import to be executed every <value> week, and select the days on the week and the time of the day for the import.
If you have selected Monthly recurrence, select the months on which the import will be executed and define the day and time of day for the import.
If you have selected On period change, select the Period level, and define the Offset and the Offset mapping.
In the Values in column and the Periods in column fields, specify the column title and its corresponding number, which is assigned by its order in the columns displayed in the Imported Values tab. Note that period information for the series is optional.
In the Scorecard field (available for mass imports only), you can define a scorecard identifier that will be used with the import. If the scorecard identifier is defined, the import target will be defined by the Scorecard + Element combination. However, mainly for backwards compatibility, the Scorecard column can be left undefined (i.e. the "Select column for scorecard identifier" option is chosen) and the import will be done based solely on the Element information.
The Element and Series which correspond to the current values are shown in these fields.
If all the above information is correct, click the Save button. The import is now set to be performed at the scheduled intervals.
If you want to cancel a scheduled import before it is executed, remove the selection from the Scheduled check box and click Save Settings. To see all the scheduled tasks, click the Integration View button on the View tab of the ribbon.
Note: Changing SQL Import settings (DB alias, password, user name, SQL script, value column or date column) requires that user disables the scheduling first. You can view the list of scheduled SQL imports from the Integration View.