Accessing data using public views
A data mart is a subset of the data warehouse that is usually oriented to a specific business line or team. Data marts can be used to prepare data for a custom view or report. For information about managing data marts, see SQL-based data marts.
Data marts rely on a basic set of views that hide the BMC Helix Capacity Optimization data model and expose a more report-oriented view over data, known as public views. The Advanced Reporting module produces a number of public views that can be accessed using the CPIT_REP account (the default database user account for generating reports).
These views let you access relevant BMC Helix Capacity Optimization data in a simple and straightforward manner. The following sections describe these views in detail.
To view example queries developed using these public views, see Query Examples.
Public views produced by the Advanced Reporting module
Public views produced by the Advanced Reporting module that can be accessed using the CPIT_REP account are divided into the following categories:
- System-related views
- Category-related views
- Business Driver related views
- Class ID views
- Chargeback related views
- Other
- Event-related views
- Domain-related views
- Optimizer alert views
- ETL-related views
- Forecast Model-related views
- Model-related views
- Object Map-related views
- Reservation-related views
- Indicator-related views
- Tag-related views
System-related views
PV_SYSTEM
Each System is created by a connector, and it remains in BMC Helix Capacity Optimization until either all of its data ages out, or the System and all of its data is explicitly dismissed and deleted by a user.
This view contains one row for each system, keyed by its unique entity ID (SYSID).
PV_SYS_METRIC
This view contains information on metric instances belonging to systems.
A metric instance contains time-varying data, either as a time series of numbers that can change on a frequent interval, or as a configuration string that changes only occasionally. For more information on metrics and metric instances, see Capacity-Agent-metric-groups-and-metrics.
A metric instance is created when data for a particular metric for a System is first loaded by a connector. It remains in BMC Helix Capacity Optimization until its owning system is either aged out or dismissed and deleted by a user.
This view does not contain the time series or configuration data itself. Time series data is in the PV_SYS_DATA_DETAIL and similar views. Configuration data is in PV_SYS_CONF_LAST and PV_SYS_CONF_VARIATION views.
This view contains one row per metric instance, keyed by SYSMETRICID.
PV_SYS_EVENT
This view contains information on system events.
PV_SYS_METRIC_EVENT
This view contains information on events owned by system metrics.
PV_SYS_CONF_VARIATION
This view describes historical changes in configuration metric instances (CONF). See how CONF metrics are recorded in BMC Helix Capacity Optimization, in the page Capacity-Agent-metric-groups-and-metrics.
This view shows every past value of each configuration metric instance. If you are trying to extract the current values of configuration metric instances, you probably want to use the view PV_SYS_CONF_LAST below. That view contains only the last value of the configuration parameters.
The key column in this view is SYSMETRICID, which is an internal BMC Helix Capacity Optimization-generated unique number assigned to each metric instance.
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
E.g. select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_NUM'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
Apart from the changes in system configuration metrics values, if you want to check the historical changes in workload configuration metrics you can use PV_BDRV_CONF_VARIATION view.
PV_SYS_CONF_LAST
This view reports only the last value of system configuration metric instances.
See how CONF metrics are recorded in BMC Helix Capacity Optimization, in the page Capacity-Agent-metric-groups-and-metrics.
If you are looking for past values, use the view PV_SYS_CONF_VARIATION above.
The key column is SYSMETRICID, which is an internal BMC Helix Capacity Optimization-generated unique number assigned to each metric instance.
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
E.g. select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_NUM'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
Apart from the last value of system configuration metric if you want to check the last value of workload configuration metrics you can use PV_BDRV_CONF_LAST view.
PV_SYS_DATA_DETAIL
This view contains system data in its original state. It does not have any default resolution.
The key column for this view is SYSMETRICID, which is an internal BMC Helix Capacity Optimization generated unique number assigned to each metric instance.
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
E.g. select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_MHZ'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
The recommended aggregation to preserve data semantics in this view is explained in the following code:
DECODE(SUM(duration),0,0,SUM(avgvalue*duration)/SUM(duration)) AS avgvalue,
MIN(minvalue) AS minvalue,
MAX(maxvalue) AS maxvalue,
SUM(sumvalue) AS sumvalue,
SUM(sumquadvalue) AS sumquadvalue,
SUM(countgood) AS countgood,
SUM(countwarn) AS countwarn,
SUM(countpoor) AS countpoor,
SUM(counterror) AS counterror,
SUM(countvalue) AS countvalue,
SUM(weight) AS weight,
DECODE(SUM(weight),0,0,SUM(wavgvalue*weight)/SUM(weight)) AS wavgvalue,
In order to compute the variance of data samples, you can apply the following statement to the result of a time aggregation query:
(sumquadvalue/(countvalue-1)-power(avgvalue,2)*countvalue/(countvalue-1))
PV_SYS_DATA_DH
This view contains system data at hourly resolution, So for given date there will be 24 rows for given sysmetricid. This view has the structure of, and uses the same aggregation recommended for and present in the PV_SYS_DATA_DETAIL view.
The key columns for this view are SYSMETRICID,TS,DCLASSID,PCLASSID.
Here SYSMETRICID is an internal BMC Helix Capacity Optimization generated unique number assigned to each metric instance.
TS is the timestamp of the of the value available for metric instance.
DCLASSID: This column is calculated by the DWH starting from the sample ts and using the calendar definition. This can be used for filtering purposes i.e. to consider/exclude set of day classes.
PCLASSID: A user can manually mark some point in an analysis as regular outlier or relation outlier.
when a point is marked as outlier its contribution is separated from non oultier samples (pclassid=0) like the MDCH case
So also at hour level (when the outlier is marked at detail level and the original resolution is less than 1h) you can have two samples for the same hour
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
E.g. select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_MHZ'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
PV_SYS_DATA_D
This view contains system data at daily resolution. This view has the same structure of, and uses the same aggregation as present in the PV_SYS_DATA_DETAIL view.
The key columns for this view are SYSMETRICID,TS,DCLASSID,PCLASSID.
Here SYSMETRICID is an internal BMC Helix Capacity Optimization generated unique number assigned to each metric instance.
TS is the timestamp of the of the value available for metric instance.
DCLASSID: This column is calculated by the DWH starting from the sample ts and using the calendar definition. This can be used for filtering purposes i.e. to consider/exclude set of day classes.
PCLASSID: A user can manually mark some point in an analysis as regular outlier or relation outlier.
when a point is marked as outlier its contribution is separated from non oultier samples (pclassid=0) like the MDCH case
So also at hour level (when the outlier is marked at detail level and the original resolution is less than 1h) you can have two samples for the same hour
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
E.g. select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_MHZ'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
PV_SYS_DATA_DAY
PV_SYS_DATA_MDCH
This contains system data at monthly resolution. This view has the structure of, and uses the same aggregation recommended for and present in the PV_SYS_DATA_DETAIL view.
The key columns for this view are SYSMETRICID,TS,DCLASSID,PCLASSID.
Here SYSMETRICID is an internal BMC Helix Capacity Optimization generated unique number assigned to each metric instance.
TS is the timestamp of the of the value available for metric instance.
DCLASSID: This column is calculated by the DWH starting from the sample ts and using the calendar definition. This can be used for filtering purposes i.e. to consider/exclude set of day classes.
PCLASSID: A user can manually mark some point in an analysis as regular outlier or relation outlier.
when a point is marked as outlier its contribution is separated from non outlier samples (pclassid=0) like the MDCH case
So also at hour level (when the outlier is marked at detail level and the original resolution is less than 1h) you can have two samples for the same hour
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
For example, select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_MHZ'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
PV_SYS_DATA_RAW
This view contains system data at its original resolution. No time aggregation is performed on this. This view has the structure of, and uses the same aggregation recommended for and present in the PV_SYS_DATA_DETAIL view.
The key columns for this view are SYSMETRICID and TS.
Here SYSMETRICID is an internal BMC Helix Capacity Optimization generated unique number assigned to each metric instance.
TS is the timestamp of the of the value available for metric instance.
To get the value of SYSMETRICID we need to use PV_SYS_METRIC view. We can run select query on PV_SYS_METRIC with inputs of sysid and metric.
E.g. select * from PV_SYS_METRIC where sysid=2070 and metric ='CPU_MHZ'
Here sysid can be retrieved from console by mouse over on the required system Or user can query on PV_SYSTEM view to get the sysid.
PV_SYS_DATA_CUST_STAT
PV_SYS_DATA_DETAIL_EXOU
PV_SYS_DATA_DH_EXOU
PV_SYS_DATA_D_EXOU
PV_SYS_DATA_MDCH_EXOU
PV_SYS_DATA_MONTH
PV_SYS_DATA_ROLL
Category-related views
PV_CAT_APPL_TYPE
PV_CAT_AUDIT_ACTION
PV_CAT_BDRV_TYPE
PV_CAT_EVENT_TYPE
PV_CAT_PARENTSHIP_TYPE
PV_CAT_RM_RECOMM_TYPE
Business Driver related views
PV_BUSINESS_DRIVER
This view contains information on business drivers.
PV_BDRV_METRIC
This view contains information on business driver metrics.
PV_BDRV_CONF_VARIATION
This view reports variations of business driver configuration parameters.
PV_BDRV_CONF_LAST
This view reports only the last value of business driver configuration parameters.
PV_BDRV_DATA_DETAIL
This view contains system data at its original resolution.
The recommended aggregation to preserve data semantics is:
DECODE(SUM(duration),0,0,SUM(avgvalue*duration)/SUM(duration)) AS avgvalue,
MIN(minvalue) AS minvalue,
MAX(maxvalue) AS maxvalue,
SUM(sumvalue) AS sumvalue,
SUM(sumquadvalue) AS sumquadvalue,
SUM(countgood) AS countgood,
SUM(countwarn) AS countwarn,
SUM(countpoor) AS countpoor,
SUM(counterror) AS counterror,
SUM(countvalue) AS countvalue,
SUM(weight) AS weight,
DECODE(SUM(weight),0,0,SUM(wavgvalue*weight)/SUM(weight)) AS wavgvalue,
In order to compute the variance of data samples, you can apply the following statement to the result of a time aggregation query:
PV_BDRV_DATA_DH
This view contains system data at hourly resolution. This view has the structure of, and uses the same aggregation recommended for and present in the PV_BDRV_DATA_DETAIL view.
PV_BDRV_DATA_D
This view contains system data at daily resolution. This view has the structure of, and uses the same aggregation recommended for and present in the PV_BDRV_DATA_DETAIL view.
PV_BDRV_DATA_MDCH
This view contains system data at monthly resolution. This view has the structure of, and uses the same aggregation recommended for and present in the PV_BDRV_DATA_DETAIL view.
PV_BDRV_DATA_MDCH_EXOU
PV_BDRV_DATA_CUST_STAT
PV_BDRV_DATA_DETAIL_EXOU
PV_BDRV_DATA_DH_EXOU
PV_BDRV_DATA_D_EXOU
PV_BDRV_DATA_MDCH_EXOU
PV_BDRV_DATA_RAW
PV_BDRV_DATA_ROLL
PV_BDRV_EVENT
Class ID views
PV_H_CLASS
This view provides names and descriptions for hour class IDs.
PV_D_CLASS
This view provides names and descriptions for day class IDs.
Chargeback related views
PV_CB_COST_OBJECT
This view contains information on a cost object.
PV_CB_COST_OBJECT_METADATA
PV_CB_COST_OBJECT_SUBKEY
This view contains information on subkeys of a basic cost object.
PV_CB_CO_ALLOC
This view contains information on an allocation between a composite cost object and a cost object.
PV_CB_TARGET
This view contains information on a target
PV_CB_MODEL
This view contains information on a chargeback model
PV_CB_MODEL_TARGET
PV_CB_TARGET_PARENTSHIP
This view contains information on a target hierarchy.
PV_CB_TARGET_METADATA
PV_CB_ALLOCATION
This view contains information on an allocation between a target and a cost object.
PV_CB_ALLOCATION_METADATA
PV_CB_TARGET_METRIC
This view contains information on target metrics.
PV_CB_TARGET_DATA_DAY
This view contains target data.
PV_CB_COST_RATE
This view contains information on a cost rate.
PV_CB_COST_RATE_METADATA
Other
PV_ENT_PARENTSHIP_CURRENT
This view contains information on relationship between systems, business drivers and domains (hierarchy).
PV_ENT_PARENTSHIP_HIST
This view contains historical information on relationship between systems, business drivers and domains (hierarchy).
PV_ENT_LOOKUP
PV_TASK
PV_TASK_RUN
PV_APPL_CONF_VARIATION
PV_APPL_CONF_LAST
PV_ANALYSIS_STAT_PROD
PV_AUDIT_MESSAGE
Event-related views
PV_EVENT
This view contains information on events.
PV_EVENT_OBJECT
This view contains information on the object related to an event.
Domain-related views
PV_APPLICATION
This view contains information on domains.
PV_APPL_BDRV
Use this view to join PV_APPLICATION and PV_BDRV_METRIC, in order to retrieve metrics of all the business drivers owned by a certain domain.
PV_APPL_EVENT
Use this view to join PV_APPLICATION and PV_EVENT, in order to retrieve events as per domains.
PV_APPL_SYS
Use this view to join PV_APPLICATION and PV_SYS_METRIC, in order to retrieve the metrics of all the systems owned by a certain domain.
PV_APPL_METRIC
Use this view to retrieve metric instances owned by a certain domain. This view contains one row per metric instance, keyed by APPMETRICID.
PV_APPL_WKLD
Optimizer alert views
PV_RM_ALERT_LOG
Use the view to join PV_RM and PV_ALERT_LOG, in order to retrieve the metrics of all the systems owned by a certain domain.
ETL-related views
PV_ETL
Forecast Model-related views
PV_FORECAST_MODEL_DETAILS
Model-related views
PV_MODEL_STAT_PROD
Object Map-related views
PV_OBJ_MAP_DATA_CUST_STAT
Reservation-related views
PV_RESERVATION
This view contains the list of reservations. Resource requirements are the sum of requested capacity of all "reservation components" for a certain reservation.
PV_CAPACITY_POOL
This view contains the list of capacity pools.
PV_CONTAINER_POOL_RSVCONTAINER
PV_RSV_CAPACITY_POOL
This view contains the list of capacity pools.
PV_RSV_CONTAINER
This view contains the list of capacity containers.
PV_RSV_ONBOARDING
Lists all On-boarding events. For each onboarding reports destination container, date of on-boarding, and total additional capacity provided.
PV_RSV_ONBOARDING_SYS
Associates, for each on-boarding event, all "templates" included into an onboarding
PV_RSV_RSVITEM
PV_RSV_RSVTEMPLATE
PV_RSV_SYS_TEMPLATE
PV_RSV_SERVICE_TEMPLATE
PV_RSV_COMPONENTS_CONTAINER
For each reservation, reports all "reservation components" with required resources, involved container (according to reservation status) and its alert status (if any). (join between RSV_SYS_CONTAINER and RSV_APP(SYS)_DATA and RSV_CONTAINER)
Indicator-related views
PV_SYS_INDICATOR
Tag-related views
PV_SYS_TAG
Describes tags that are placed on BMC Helix Capacity Optimization systems.
PV_BDRV_TAG
Describes tags that are placed on BMC Helix Capacity Optimization business driver
PV_APPL_TAG
Describes tags that are placed on BMC Helix Capacity Optimization domain.
PV_REP_TAG
Describes tags that are placed on BMC Helix Capacity Optimization report.
PV_REP_RUN
PV_REPORT
Public Function Package
You can extract dynamic thresholds defined for an entity within a custom SQL data mart. To do this, use the PFUNC package. PFUNC is a public function package that stores all functions that retrieve thresholds from a custom SQL data mart.
The following table lists all the functions available in PFUNC:
Name | Description | Mandatory fields |
---|---|---|
pf_threshold_get_by_object(p_structureid, p_metricid, p_appid, p_ts) | Allow to retrieve threshold values by metric. | p_structureid, p_metricid |
pf_threshold_get_by_entity(p_structureid, p_id, p_metric, p_appid, p_ts) | Allow to retrieve threshold values for a certain metric by entity | p_structureid, p_id, p_metric |
pf_threshold_get_by_enttype(p_structureid, p_enttypeid, p_metric, p_appid) | Allow to retrieve threshold values for a certain metric by entity type. | p_structureid, p_enttypeid, p_metric |
pf_threshold_get_by_resource(p_metric, p_appid) | Allow to retrieve threshold values by metric | p_metric |