Defining Data Extraction Templates
Description
The Data Extraction Template defines how a SQL-CrossSection or DBF-CrossSection series is created by extracting data from the columns in a record.
Discussion
The data extraction template enables you to create a data series from multiple columns in a result set. Each field in a result set is referenced using curly brace syntax. For example, the example below would create a data series that groups three fields from the result set into a single series:
{field1} {field2} {field3}
Values that are not enclosed in curly braces are treated as static values.
Multiple sub-series can be defined by separating each value with a pipe "|". The label for each sub-series is specified in the first row of the template. The sub-series label row is required if multiple sub-series are defined.
subseriesLabel1|subseriesLabel2|subseriesLabel3 staticValue1|{field1}|{field2} staticValue2|{field3}|{field4}
If a data series only contains one sub-series, the sub-series label can be omitted.
Data Extraction Template Examples
This template creates a series of values with data from the following fields in a result set: 'Sales_01', 'Sales_02', 'Sales_03'. This series does not define any sub-series, therefore the sub-series labels are not necessary.
{Sales_01} {Sales_02} {Sales_03}
This template creates a series with two sub-series. The first sub-series is a list of static values. The second sub-series is data from the following fields in a result set: 'Sales_01', 'Sales_02', 'Sales_03'.
This series specifies two sub-series; therefore the first line of the template must define the sub-series labels.
Month|Sales Jan|{Sales_01} Feb|{Sales_02} Mar|{Sales_03}
This template demonstrates creating three sub-series. The first sub-series is a list of static values. The second sub-series is data from the following fields in the result set: 'Sales_01', 'Sales_02', 'Sales_03'. The third sub-series is data from the following fields in the result set: 'PrevSales_01', 'PrevSales_02', 'PrevSales_03'
Because this series has multiple sub-series, the sub-series labels must be specified on the first row of the template.
Month|SalesCurrentYear|SalesPreviousYear Jan|{Sales_01}|{PrevSales_01} Feb|{Sales_02}|{PrevSales_02} Mar|{Sales_03}|{PrevSales_03}
See Also