Updating Data Sources 

Each data source internally contains two data sets: The active data set and the edit data set.

The active set, is the data set currently being used by the text, image and audio layers in the project. This is the data set that is actively being displayed in the Graphics Viewer (Edit tab) or in the output channels (Live 1, Live 2 and so on). The edit set, on the other hand, is the data set currently shown in the data editor (in table, key-value or any other form, depending on the type of the data source) and being edited by the CW operator.

Pressing the Update Data Source Now button transfers the contents of the data source edit set into the active set. This effectively means that, any layer referencing this data source will be automatically and immediately updated in the Graphics Viewer and the output channels, unless the layer has a behaviour with the UpdateFromAllSources action (more on this below).

The reason for the existence of dual data sets in a data source (and the existence of the update button) is to give the CW operator a chance to edit the data manually before it begins to be actively used by the on-screen graphics. Typically, the data that is retrieved initially (as a result of an XML or ODBC query execution, Twitter search, etc.) may not be suitable for broadcast use right away, especially if it does not come from a trusted source. For example, the operator may need to cleanup links or fix typos in tweets, or it may be necessary to combine data from multiple searches. In this case, the operator may edit the data in the data editor, and when ready, press the update button to update the live graphics instantly. Until the update button is pressed, the current active set keeps being broadcast, which means the operator can work on editing the data source independently of the current graphics.

If it is known that it will not be necessary to edit the contents of the data source manually before live broadcast (e.g. if the data comes from a trusted source), the Auto-Update Data Source setting may be activated to ensure that the active set will be automatically updated each time new data is retrieved, so that it will not be necessary to press the update button each time. With the combination of the auto-update setting and file tracking or periodic query execution, a data source can update itself in real-time, continously without user intervention.

In short, enable Auto-Update Data Source setting, when the live graphics are required to update immediately whenever the query is executed and the contents of the Query Results table change. Disable this setting, when the CW operator needs to be able to review and edit the results table before updating the live graphics, by pressing the update button manually.

Pressing the Revert to Data Source Active Set button transfers the contents of the data source active set into the edit set.  This is effectively the reverse of what the Update Data Source Now button does.  

When the edit set is different from the active set (e.g. if the edit set has been modified by the user), the update button flashes red to indicate that there is something to update. The flashing stops when the update button (or the revert button) is clicked.

The data source update process can also be driven by behaviours. The UpdateAllSources action provides a way to automate data source updates when specified events take place (for example, the animation of a layer reaches a specific instant when data update is suitable). The execution of the action is equivalent to the operator pressing the update button, with one important difference. The Ready-to-Update button must be activated for the UpdateAllSources action to be effective. Otherwise, the UpdateAllSources action is not executed, which means that the data source will not be updated. 

The Ready-to-Update button is useful because it prevents the data source from being updated (i.e. live graphics being affected) while the operator is still working on the data source edit set. When the data source update is primarily controlled by behaviours, the operator has no direct control over exactly when the update will take place. So, once the operator is done modifying the edit set, he activates the Ready-to-Update button to ensure that the active set will be updated on the next UpdateAllSources execution (which is usually setup to take place when it is appropriate for the on-screen graphics to be updated with new data, depending on animations or other states of the graphics elements).

Instead of controlling data source updates via behaviours, it is possible to control how and when layers are updated when data sources are updated. If a layer has a behaviour with the UpdateFromAllSources action, it is not automatically updated on data source updates, instead, the layer will update itself only when the behaviour is executed. In this mode of operation, the Ready-to-Update button is generally not used. Instead, the operator just presses the update button and any layers referring to the data source update themselves from the data source whenever it is suitable and convenient; the timing is controlled by the events in the behaviour definitions and it can be when a motion is started, when an animation is at the beginning or the end of its loop, or during transitions, and so on. An important advantage of this method is that layer updates can be controlled independently (since data source updates would cause all connected layers to be updated, otherwise).

If the safety features described above are deemed unnecessary, then Safe Editing may be disabled. In this mode, every edit made to the data source table will be instantly reflected in the data source active set, this effectively removes the need to press the update button (or the Ready-to-Update button) after every editing operation.

See Also: Data Source.