Skip to content

Latest commit

 

History

History
149 lines (79 loc) · 2.92 KB

metricdefinition.schema.md

File metadata and controls

149 lines (79 loc) · 2.92 KB

Metric Definition Schema

https://ns.adobe.com/xdm/data/metricdefinition

A metric definition is a definition of a measurable or countable quantity.

A metric definition consists of a measurement and a dimension. For easier identification, metrics have a name and a unique URI that can be used when referring to the metric definition.

Through XDM's extensibility mechanism, new metrics can be defined by extending Metric Definition.

Abstract Extensible Status Identifiable Custom Properties Additional Properties Defined In
Can be instantiated Yes Stabilizing Yes Forbidden Permitted data/metricdefinition.schema.json

Schema Hierarchy

  • Metric Definition https://ns.adobe.com/xdm/data/metricdefinition

Metric Definition Example

{
  "schema:name": "Example Metric",
  "@id": "https://ns.adobe.com/xdm/data/example-metric",
  "xdm:measurement": "weight",
  "xdm:unit": "kg"
}

Metric Definition Properties

Property Type Required Defined by
@id string Required Metric Definition (this schema)
schema:name string Required Metric Definition (this schema)
xdm:measurement string Required Metric Definition (this schema)
xdm:unit complex Required Metric Definition (this schema)
* any Additional this schema allows additional properties

@id

The unique identifier of this metric.

@id

  • is required
  • type: string
  • defined in this schema

@id Type

string

  • format: uri – Uniformous Resource Identifier (according to RFC3986)

schema:name

The human-readable name of the metric. The name can be used in user interfaces and does not have to be unique.

schema:name

  • is required
  • type: string
  • defined in this schema

schema:name Type

string

xdm:measurement

How to take measures of this metric.

xdm:measurement

  • is required
  • type: string
  • defined in this schema

xdm:measurement Type

string

xdm:measurement Examples

"distance"
"time"
"price"
"count"

xdm:unit

xdm:unit

  • is required
  • type: complex
  • defined in this schema

xdm:unit Type

Any following options needs to be fulfilled.

Option 1

string

Option 2