Developing Apama Applications > Building Dashboards > Attaching Dashboards to Correlator Data > Dashboard data tables > Scenario instance table
Scenario instance table
A scenario instance data table contains the current values of all variables for all instances of a single scenario definition. A separate instance table exists for each scenario. Within a scenario instance data table, a row exists for each instance of the scenario. The columns of the table correspond to the input and output variables of the scenario.
The following diagram illustrates the contents of a scenario instance table.
Instrument
Price
Velocity
Shares
Position
APMA
28.5
0.0125
10000
285000
ORCL
12.3
-0.0173
12500
153750
MSFT
26.4
0.0
8000
211200
Here there are three instances of the scenario; each row corresponds to one instance. The scenario has five variables; each column corresponds to one scenario variable.
Apama adds several additional columns to each scenario instance table that contain information not available as scenario variables. These additional columns include the following:
*apama.instanceId: The value is an id string which can be used to uniquely identify the scenario instances. This id string is used when performing drilldowns or operations on a scenario instance
*apama.instanceStatus: The value is a string which identifies the status of the scenario instance. Possible values are:
*RUNNING: The instance is running
*ENDED: The instance terminated normally
*FAILED: The instance terminated abnormally
*apama.owner: The value is the owner of the scenario instance, typically the ID of the user that created it.
*apama.substitutions — Do not use this column. It will be removed in a future release.
*apama.timestamp: The value is a UTC timestamp which indicates the time the last Update event was received for the scenario instance.
The actual scenario instance table would be as follows.
Instrument
Price
Velocity
Shares
Position
apama. instanceId
apama. instanceStatus
apama. timestamp
APMA
28.5
0.0125
10000
285000
ID
RUNNING
Timestamp
ORCL
12.3
-0.0173
12500
153750
ID
ENDED
Timestamp
MSFT
26.4
0.0
8000
211200
ID
RUNNING
Timestamp
Scenario instance tables will likely be used by any dashboard you create. They are the only data table which contains the values of the scenario input variables.
Copyright © Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or its Subsidiaries and or/its Affiliates and/or their licensors.
Use, reproduction, transfer, publication or disclosure is prohibited except as specifically provided for in your License Agreement with Software AG.