IResultAttributeHeaderItem
Attribute header item specifies name and URI of the attribute element to which the calculated measure values in the particular data view slice belong.
export interface IResultAttributeHeaderItem
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
string | (Optional) Formatted name of attribute element. | ||
string | null | Human readable name of the attribute element. | ||
string | (Optional) Normalized value of attribute element. | ||
string | URI of the attribute element. |
Property details
IResultAttributeHeaderItem.formattedNameproperty
Formatted name of attribute element.
formattedName?: string;
Remarks
This property holds the formatted form of name property in case of date attributes. When using attribute elements in visualisations, formatted name should have precedence over original name to show a more readable form of dates. In other cases, such as drilling, original name property must be used to avoid inconsistencies.
IResultAttributeHeaderItem.nameproperty
Human readable name of the attribute element.
name: string | null;
Remarks
IResultAttributeHeaderItem.normalizedValueproperty
Normalized value of attribute element.
normalizedValue?: string;
Remarks
This property holds the normalized form of value property in case of attributes if its differ from name property. Its used by date attributes for example when normalized value can hold ISO string of date. Its related to type of attribute and can differ for different implementations.
IResultAttributeHeaderItem.uriproperty
URI of the attribute element.
uri: string;
Remarks
This is essentially a primary key of the attribute element. It can be used in places where attribute elements have to be exactly specified - such as positive or negative attribute filters.
It is up to the backend implementation whether the URI is transferable across workspaces or not in the data distribution scenarios. In other words, if a data for one attribute (say Product) is distributed into multiple workspaces, it is up to the backend whether the URIs of the elements will be same across all workspaces or not.
Recommendation for the consumers: URI is safe to use if you obtain in programmatically from this header and then use it in the same workspace for instance for filtering. It is not safe to hardcode URIs and use them in a solution which should operate on top of different workspaces.
Note that this can actually be null on some backends if your data contains NULL values. We will change the type of this to string | null in the next major (since it is a breaking change), but for now, if you expect NULLs in your data, treat this as string | null already.