Note: The information in this article applies to SAS Visual Analytics, all versions.
If you create data queries for reports and explorations and you want them to reflect the most current data, you can set your data queries to run periodically so that they pick up the most recent data that was imported. This allows you to skip running the data query manually when the data changes. There are many different options to do this in terms of frequency.
To set up a data query schedule, you need to create a series of triggers. Each trigger is associated with a date and time. You can create a trigger that will run just once, multiple times, or at a regular interval.
To get started:
After you finish creating your data query, save by clicking the save icon.
Click the scheduler icon to set the schedule for the query.
In the Schedule window, select Select one or more triggers for this query.
Click New Time Event to create the triggers for your schedule.
Running the query on specific dates and times
Let’s say you want to run a data query one time at a specific date and time in the future. This case is useful if you want the data query to run on specific dates or times that don’t fall into a regular interval. You can create as many ‘one time only’ triggers as you want. In this case, you will just need to set them up one at a time.
To run a query on specific dates and times:
Select One time only.
Set the date and time, and then click OK.
You will see the event show up in the trigger list. Repeat the steps for any additional triggers that you want to set up. After you are finished making your schedule changes, make sure you click save icon in the workspace to save again.
Running the query at a regular interval
You can also set the query to run at a regular interval:
Select More than once.
Select the frequency in which you want the query to run. For example, every day from Monday, 7/20/15, through Friday, 7/27/15, at 4:26pm.
You will see the event show up in the trigger list. Repeat the steps for any additional triggers that you want to set up. After you are finished making your schedule changes, make sure you click the save icon in the workspace to save again.
If you modify a scheduled data query, you will need to resave the triggers. Otherwise, the schedule will no longer run. You do not need to set the triggers up again, however. Here’s the steps to get the schedule to run:
After you make your changes to the data query, click the save icon to save your changes.
Click the scheduler icon to open the Schedule window. The triggers that you previously set up will appear in the list.
Click OK to exit from the Schedule window.
Deleting the schedule for a data query
To permanently delete the schedule for a data query, you must use SAS Management Console. However, from SAS Visual Analytics, you can stop the data query from running:
Open the data query.
Click the scheduler icon to open the Schedule window. You may have to click the save icon to save beforehand.
Highlight the trigger for the schedule that you want to delete, and then click Delete.
Click OK, and then click the save icon to save.
Note: If you delete the last trigger in the list, and then you attempt to click OK to exit from the Schedule window, you will receive the following error message: "Cannot update the scheduled query. One or more events must be available." To bypass this, you must run the query one more time in order to exit from the window. Select Run now before clicking OK.
Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.
If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website.