Audience Snapshots tab
Overview
An audience snapshot allows you to improve query performance by persisting the results of the execution of a commonly-run audience in a data warehouse table. You can then build attributes from this table, which you can leverage to build highly performant selection rules (which can, in turn, be used in other audiences).
For example, suppose you have a complex audience, execution of the logic in which takes several hours. Suppose also that the data queried by the audience is refreshed once a week. You can build an audience snapshot that executes the rules in the audience and writes the results to a data warehouse table. It then becomes a simple exercise to build attributes based on the snapshot table and use them to identify the persons targeted by the original audience (and, if required, the segments within which they qualify). These can then be used in selection rules, and, in turn, in an audience that executes much more quickly than the original.
Management of the execution of audience snapshots is carried out in the Audience Snapshots tab within the Operations interface.
A separate Audience Snapshots configuration interface is found in the Configuration Workbench; this is used to define audience snapshots. It is recommended that you save any changes to audience snapshots’ operational configuration, and close the Operations interface, before administering audience snapshots in the Configuration Workbench.
The Audience Snapshots tab contains the following:
Toolbar
The toolbar exposes the following options:
Last updated: this reflects the time of the most recent refresh of the audience snapshots list.
Save Changes: this button is available when changes exist within one or more audience snapshots. Invocation persists any outstanding audience snapshot changes. Execution of a recurring snapshot commences in accordance with its defined schedule.
Refresh: selecting this button reloads audience snapshot details. You can also select it to abandon any changes made within the interface.
Audience Snapshots list
All audience snapshots defined within the Audience Snapshots configuration interface are displayed in the list.
If an audience snapshot is deleted in the configuration interface, it is no longer listed in the Operations tab. An advisory message is displayed if no audience snapshots have been configured.
For each audience snapshot, the following are displayed:
Icon: a halo represents the status of the most recent instance of the audience snapshot that executed, and is shown in a tooltip on hover. Status may be one of the following:
Never run (the initial state)
Not started
Play Requested
Playing
Completed
Waiting for next trigger
Failed
[Name] updates [data warehouse table]
Recurrence summary: displayed only for recurring audience snapshots. A verbal description of the snapshot’s recurrence settings is provided, e.g.: “Recurring trigger, starting at [date/time], running every week on [day] at [time]”.
When outstanding changes exist within an audience snapshot, the recurrence summary (if shown) is replaced by a message stating “Save Changes to complete the update to this Audience Snapshot”.
On Demand/Recurring: this toggle button is set to On Demand by default. It defines whether the audience snapshot is to be executed manually, or in accordance with a defined recurrence schedule. Having converted an audience snapshot to Recurring, when you save changes to the snapshot, execution commences in accordance with its recurrence schedule. Having converted an audience snapshot to On Demand, when you save changes, what happens next depends on the snapshot's current status:
If Waiting for next trigger, its status set to Completed. No more audience instances will be created automatically and you must execute the snapshot manually.
If Play Requested or Playing, the current instance completes, and the status' snapshot is then set to Completed.
Actions menu: exposing the following:
Open Previous Instance: this button gives access to an audience snapshot’s previous audience instances. If no instances exist, an advisory message is shown on invocation. If one or more audience instances exist, a list is displayed on invocation. Selection of an instance displays it in the Audience Instance Viewer.
Run Snapshot Now: this button is not available when outstanding changes exist within the audience snapshot, when its status is Play Requested or Playing, or when a recurring snapshot has Completed. Invocation is protected by an “Are You Sure?” dialog, and an informational message advises that the audience snapshot has been scheduled to run. The snapshot’s status, in turn, is set to Play Requested, Playing then Completed. Please see below for details of the data warehouse ramifications of the execution of audience snapshot.
Edit Recurrence Schedule: this button is only shown if the snapshot is Recurring. Invocation displays the Edit Audience Snapshot Schedule dialog. The dialog allows you to define the frequency at which the snapshot will be refreshed, and the number of instances that will be created. You can control:
The date and time at which the execution of the audience snapshot, and creation of audience instances, will begin.
Whether creation of audience instances will never end, will end when a given number of instances have been created, or will end by a given date and time.
Whether the audience snapshot will execute on a daily basis, and if so, once every [n] days at a given time, or every [n] minute(s) or hour(s) throughout the day for a given duration.
Whether the audience snapshot will execute on a weekly basis, and, if so, every [n] weeks at a given time on selected day(s) of the week.
Whether the audience snapshot will execute on a monthly basis, and, if so, on day [x] of every [y] months at a given time, or on the [nth] [day of the week] of every [x] months, also at a given time.
An orange message is displayed at the top of the list when unsaved changes exist within one or more audience snapshots therein that states “Audience Snapshot updates are currently suspended and will be resumed after the changes have been saved”.
If you attempt to close the Operations interface when unsaved changes are present, an “Are You Sure?” dialog is displayed (note that, in this case, the interface is not closed if you elect to save changes).
Audience Snapshot execution
An audience snapshot is executed manually if On Demand (using the Run Snapshot Now button detailed above), or automatically in accordance with its recurrence schedule if Recurring.
During audience snapshot execution a new audience instance based on the rules recorded in the snapshot’s related audience is created and run to completion.
If it is the first time that a snapshot has run, a table is created in the data warehouse in accordance with the Snapshot table name defined in the Audience Snapshots configuration interface. The table contains the following:
The key column: from the resolution level associated with the audience definition upon which the audience snapshot’s audience is based. The column’s data type is set accordingly. The column is used to hold key values for all persons targeted by the audience.
OutputName: nvarchar(100); the audience segment to which a given target belongs.
If the data warehouse table already exists, the data therein is dropped and refreshed at manual audience snapshot execution.
Joins to the snapshot table are not created automatically and must be managed manually.
An index, based on the snapshot table's resolution key, is created at the table’s creation when the snapshot is run for the first time.
You can also invoke the execution of an audience snapshot externally by inserting a value matching an existing audience snapshot’s external key into the KeyName
column in data warehouse table RPI_DataflowSnapshotRequests
. The system task Audience snapshot requests monitors for the insertion of data into this table and, if the value inserted matches the external key of an existing snapshot, the snapshot in question is executed and an audience instance created.