Available in Classic and VPC
It is required when creating and editing a schema.
Syntax
The syntax is as follows:
private String name;
private DataType dataType;
private Boolean metric = false;
private String metricType;
private Boolean dimension = false;
private Boolean counter = false;
private Boolean isIdDimension = false;
private Map<Interval, Set<Calculation>> aggregations;
private String desc;
Field
The following describes the fields:
Field | Type | Required | Description |
---|---|---|---|
name |
String | Required | Name of product schema |
dataType |
DataType | Required | Specify the data type of a metric or dimension.
|
metric |
Boolean | Optional | Specify that the field is a metric.
|
metricType |
String | - | Metric type
|
dimension |
Boolean | Optional | Specify that the field is a dimension.
|
counter |
Boolean | Optional |
|
isIdDimension |
Boolean | Optional | It can only be set when the field is a dimension and is distinguished by that dimension when creating an event rule for a user-defined product.
|
aggregations |
Map<Interval, Set<Calculation>> | Optional | It can only be set when the field is a metric, and sets the aggregation frequency and aggregation function.
|
desc |
String | Optional | Description of product schema |
Examples
See below for an example.
Note
If aggregations is not set, it defaults to performing all aggregation functions for every aggregation interval as shown below.
"aggregations": {
"Min1": [
"AVG",
"SUM",
"MIN",
"MAX",
"COUNT"
],
"Min5": [
"AVG",
"SUM",
"MIN",
"MAX",
"COUNT"
],
"Min30": [
"AVG",
"SUM",
"MIN",
"MAX",
"COUNT"
],
"Hour2": [
"AVG",
"SUM",
"MIN",
"MAX",
"COUNT"
],
"Day1": [
"AVG",
"SUM",
"MIN",
"MAX",
"COUNT"
]
}