Exploring, predicting and reporting with SAS Visual Analytics and SAS Visual Statistics

How to schedule data queries in SAS Visual Analytics

Reply
SAS Employee
Posts: 35

How to schedule data queries in SAS Visual Analytics

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:

  1. After you finish creating your data query, save by clicking the save icon.
  2. Click the scheduler icon to set the schedule for the query.
  3. In the Schedule window, select Select one or more triggers for this query.
  4. Click New Time Event to create the triggers for your schedule.

Schedule setup

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:

  1. Select One time only.
  2. 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:

  1. Select More than once.
  2. 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.

Here’s some more information about creating the schedule for a data query.

Modifying a scheduled data query

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:

  1. After you make your changes to the data query, click the save icon to save your changes.
  2. Click the scheduler icon to open the Schedule window. The triggers that you previously set up will appear in the list.
  3. 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:

  1. Open the data query.
  2. Click the scheduler icon to open the Schedule window. You may have to click the save icon to save beforehand.
  3. Highlight the trigger for the schedule that you want to delete, and then click Delete.
  4. 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.

Here's some more information about scheduling data queries.

Ask a Question
Discussion stats
  • 0 replies
  • 1139 views
  • 0 likes
  • 1 in conversation