IWorkspaceMeasuresService
Service for create, update or delete measures and querying additional measures data. If you want to query measures themselves, use catalog IWorkspaceCatalogFactory
export interface IWorkspaceMeasuresService
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
(measure: IMeasure, options?: { sortDirection: “ASC” | “DESC”; }) => Promise<IMeasureKeyDrivers> | (ALPHA) Compute key drivers for a given measure. |
Methods
Method | Description |
|---|---|
(ALPHA) Check which measure identifiers are already used in the workspace hierarchy. | |
Create and save measure for the provided measure definition | |
Delete measure with the given reference | |
Get connected attributes for a measure | |
Get measure by reference | |
Get measure expression tokens for provided measure identifier | |
Get all metadata objects which uses specified object (ie. object is used by these objects) by a given reference. | |
Measures query factory. | |
Sets measure certification metadata. | |
Update provided measure | |
Update metadata object for the measure |
Property details
IWorkspaceMeasuresService.computeKeyDriverspropertyAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Compute key drivers for a given measure.
computeKeyDrivers: (measure: IMeasure, options?: {
sortDirection: "ASC" | "DESC";
}) => Promise<IMeasureKeyDrivers>;
Method details
IWorkspaceMeasuresService.checkEntityOverrides()methodAlpha
Alpha API. Initial API, highly likely to change outside SemVer. Don’t build on it in production. See API maturity.
Check which measure identifiers are already used in the workspace hierarchy.
checkEntityOverrides(identifiers: string[]): Promise<IMeasureOverride[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
identifiers | string[] | measure identifiers to check |
Returns
Promise<IMeasureOverride[]>
promise of the used identifiers, each with the workspaces that contain it
Remarks
A measure saved with a used identifier overrides the measure of the other workspace. Identifiers that are not used are not in the result.
IWorkspaceMeasuresService.createMeasure()method
Create and save measure for the provided measure definition
createMeasure(measure: IMeasureMetadataObjectDefinition, options?: ISaveMeasureOptions): Promise<IMeasureMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
measure | measure definition | |
options | (Optional) options for saving the measure |
Returns
Promise<IMeasureMetadataObject>
promise of created measure
IWorkspaceMeasuresService.deleteMeasure()method
Delete measure with the given reference
deleteMeasure(measureRef: ObjRef): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
measureRef | ref of the measure to delete |
Returns
Promise<void>
promise of undefined
IWorkspaceMeasuresService.getConnectedAttributes()method
Get connected attributes for a measure
getConnectedAttributes(definition: IMeasure, auxMeasures?: IMeasure[], options?: IConnectedAttributesOptions): Promise<ObjRef[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
definition | definition of measure | |
auxMeasures | IMeasure[] | (Optional) optional aux measures |
options | (Optional) options influencing which objects count as connected |
Returns
Promise<ObjRef[]>
IWorkspaceMeasuresService.getMeasure()method
Get measure by reference
getMeasure(ref: ObjRef, options?: IGetMeasureOptions): Promise<IMeasureMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the measure to get | |
options | (Optional) options for getting the measure |
Returns
Promise<IMeasureMetadataObject>
promise of measure
IWorkspaceMeasuresService.getMeasureExpressionTokens()method
Get measure expression tokens for provided measure identifier
getMeasureExpressionTokens(ref: ObjRef): Promise<IMeasureExpressionToken[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the measure |
Returns
Promise<IMeasureExpressionToken[]>
promise of measure expression tokens
IWorkspaceMeasuresService.getMeasureReferencingObjects()method
Get all metadata objects which uses specified object (ie. object is used by these objects) by a given reference.
getMeasureReferencingObjects(measureRef: ObjRef): Promise<IMeasureReferencing>;
Parameters
Parameter | Type | Description |
|---|---|---|
measureRef | ref of the measure to check |
Returns
Promise<IMeasureReferencing>
promise of references
IWorkspaceMeasuresService.getMeasuresQuery()method
Measures query factory.
getMeasuresQuery(): IMeasuresQuery;
Returns
measures query
IWorkspaceMeasuresService.setCertification()method
Sets measure certification metadata.
setCertification(ref: ObjRef, certification?: IObjectCertificationWrite): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | measure reference | |
certification | IObjectCertificationWrite | (Optional) certification state; undefined clears certification |
Returns
Promise<void>
IWorkspaceMeasuresService.updateMeasure()method
Update provided measure
updateMeasure(measure: IMeasureMetadataObject): Promise<IMeasureMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
measure | measure to update |
Returns
Promise<IMeasureMetadataObject>
promise of updated measure
IWorkspaceMeasuresService.updateMeasureMeta()method
Update metadata object for the measure
updateMeasureMeta(measure: IUpdateMetadataObjectMetaPayload): Promise<IMeasureMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
measure | metadata object to update |
Returns
Promise<IMeasureMetadataObject>
promise of updated measure