Leverage meta information for table, anomaly, and kpi-list in Views
You can now access the meta information stored in the knowledge model for the table, anomaly, and kpi list components. This can help the board creator to simplify the board creation.
Let's say we have a View consisting of the three-component: table, anomaly and kpi list:
![]() |
View
metadata: key: anomaly template: false name: Anomaly knowledgeModelKey: new-sales-data variables: - name: kpiId defaultValue: KPI_AVERAGE_PROCESS_TIME layout: rows: - id: row1 columns: - id: column_e78735d4-a6de-4826-842a-c8f91ffa06ff componentId: kpi1 size: "1" order: 1 - id: column_d1118984-0ab0-4a7f-a924-e02c080fecbf componentId: anomaly1 size: "1" order: 2 - id: column_e739fee0-7faa-4187-92f9-a65c7c6e4046 componentId: table1 size: "1" order: 100 order: 100 components: - id: kpi1 type: kpi-list settings: options: size: sm showSettings: true showBenchmark: true showTarget: true showPriority: true scroll: false responsive: false data: kpis: - show: true id: a1812c90-2656-456c-a5a1-5a0218a1e61b kpi: KPI_AVERAGE_PROCESS_TIME order: 100 - show: true kpi: SUM_OF_SALES_EX id: a2463161-e7c5-4ab4-947f-c4bf3d8616f3 order: 200 onClick: update: variables: id: kpiId - id: anomaly1 type: anomaly-list settings: kpi: ${kpiId} name: Systemic Blockers - id: table1 type: table settings: data: columns: - id: ORDERS.ORDER_ID link: true order: 100 - id: ORDERS.PROCESS_TIME order: 150 - id: ORDERS.PRODUCT_NAME order: 200 - id: ORDERS.QUANTITY order: 300 - id: ORDERS.OORDER_DATE order: 400 limit: 10 options: stickyHeader: true showPagination: true
KPI
Now let's modify the View to make use of the meta-information for the KPI List.
![]() |
View
metadata: key: anomaly template: false name: Anomaly knowledgeModelKey: new-sales-data variables: - name: kpiId defaultValue: KPI_AVERAGE_PROCESS_TIME - name: kpiMeta #Defines the input parameter of name kpiMeta. The object itself is defined in line 56. We recommend to define a default value for the object and its attributes, so that no NULL values are shown up-on page load. defaultValue: id: KPI_AVERAGE_PROCESS_TIME displayName: Average Order Proccess Date (days) customAttributes: absoluteCalculation: true layout: rows: - id: row1 columns: - id: column_e78735d4-a6de-4826-842a-c8f91ffa06ff componentId: kpi1 size: "1" order: 1 - id: column_d1118984-0ab0-4a7f-a924-e02c080fecbf componentId: anomaly1 size: "1" order: 2 - id: column_e739fee0-7faa-4187-92f9-a65c7c6e4046 componentId: table1 size: "1" order: 100 - id: column_e739fee0-7faa-4187-92f9-a65c7c6e4045 #Added an additional component to display all information of the KPI object componentId: text1 size: "1" order: 200 order: 100 components: - id: kpi1 type: kpi-list settings: options: size: sm showSettings: true showBenchmark: true showTarget: true showPriority: true scroll: false responsive: false data: kpis: - show: true id: a1812c90-2656-456c-a5a1-5a0218a1e61b kpi: KPI_AVERAGE_PROCESS_TIME order: 100 - show: true kpi: SUM_OF_SALES_EX id: a2463161-e7c5-4ab4-947f-c4bf3d8616f3 order: 200 onClick: update: variables: metadata: kpiMeta #Defines the KPI object with the name kpiMeta - id: anomaly1 type: anomaly-list settings: kpi: ${kpiMeta.id} #Referencing the KPI ID name: Systemic Blockers - id: table1 type: table settings: data: columns: - id: ORDERS.ORDER_ID link: true order: 100 - id: ORDERS.PROCESS_TIME order: 150 - id: ORDERS.PRODUCT_NAME order: 200 - id: ORDERS.QUANTITY order: 300 - id: ORDERS.OORDER_DATE order: 400 limit: 10 options: stickyHeader: true showPagination: true - id: text1 type: text-box settings: title: Listing meta data from the knowledge model content: <strong>id:</strong> ${kpiMeta.id} <br/><br/> <strong>name:</strong> #Defined in the knowledge model below in row 2 ${kpiMeta.displayName} <br/><br/> <strong>pql:</strong> ${kpiMeta.pql} #Defined in the knowledge model below in row 3 and 6 <br/><br/> <strong>unit:</strong> ${kpiMeta.unit} <br/><br/> #Defined in the knowledge model below in row 8 <strong>format:</strong> ${kpiMeta.format} <br/><br/> #Defined in the knowledge model below in row 9 <strong>desiredDirection:</strong> ${kpiMeta.desiredDirection} #Defined in the knowledge model below in row 15 <br/><br/>
Knowledge Model snipped
kpis: - id: KPI_AVERAGE_PROCESS_TIME displayName: Average Order Proccess Date (days) customAttributes: absoluteCalculation: true pql: AVG(DAYS_BETWEEN("Sample-sales-data-excel_xlsx_Orders"."ORDER DATE","Sample-sales-data-excel_xlsx_Orders"."SHIP DATE")) filterIds: [] unit: Days format: ',.2f' breakdowns: [] aggregations: [] parameters: [] targets: [] desiredDirection: INCREASE type: KPI
Anomaly
Next let's create a Profile View for the Anomaly component. Here you can find a screenshot on how the provided example will looks like:
Profile View
metadata: key: anomaly-detail template: false name: Anomaly Detail knowledgeModelKey: new-sales-data knowledgeObjectId: ORDERS_ANOMALY profileView: true variables: - name: anomaly #Defines the anomaly object to access its meta data from the knowledge model. We recommend to define a default value for the object and its attributes, so that no NULL values are shown up-on page load. defaultValue: id: ANOMALY_LATE_PROCESSED_ORDERS displayName: Orders processed later than 5 days description: This Anomaly displays Orders processed later than 5 days customAttributes: prop1: anomaly1_value1 prop2: anomaly1_value2 prop3: test_test # Default input parameters, which can be used for an anomaly component - name: blockerId - name: blockerName - name: blockerValue - name: flagId - name: flagName - name: kpiId includedTools: - default-action layout: rows: - id: row1 columns: - id: row1-col4 componentId: text2 size: 1/2 order: 400 order: 100 components: - id: activity1 type: activity-history settings: objectId: ${id} recordMetadataId: ORDERS name: Activity History - id: text2 #Listing meta data from the knowledge model type: text-box settings: title: Listing meta data from the knowledge model content: "<strong>id:</strong> ${anomaly.id} <br/><br/> #Defined in the knowledge model below in row 2 and 15 <strong>displayName:</strong> ${anomaly.displayName} <br/><br/> #Defined in the knowledge model below in row 3 and 16 <strong>Description:</strong> ${anomaly.description} <br/><br/> #Defined in the knowledge model below in row 4 and 17 <strong>Flag:</strong> ${anomaly.flag} <br/><br/> #Defined in the knowledge model below in row 9 and 21 <strong>prop1:</strong> ${anomaly.customAttributes.prop1} <br/><br/> #Defined in the knowledge model below in row 6 and 19 <strong>prop2: </strong> ${anomaly.customAttributes.prop2}<br/><br/> #Defined in the knowledge model below in row 7 and 20 <strong>prop3: </strong> ${anomaly.customAttributes.prop3}" #Defined in the knowledge model below in row 8. In the screenshot above we look at the second anomaly which doesn't have this object defined and therefore returns null. - id: text3 #Listing default input parameters type: text-box settings: title: Listing default input parameters content: " <strong>blockerId:</strong> ${blockerId} <br/><br/> <strong>blockerName:</strong> ${blockerName} <br/><br/> <strong>blockerValue:</strong> ${blockerValue} <br/><br/> <strong>flagId:</strong> ${flagId} <br/><br/> <strong>flagName:</strong> ${flagName} <br/><br/> <strong>kpiId:</strong> ${kpiId}"
Knowledge Model
anomalies: - id: ANOMALY_LATE_PROCESSED_ORDERS displayName: Orders processed later than 5 days description: This Anomaly displays Orders processed later than 5 days customAttributes: prop1: anomaly1_value1 prop2: anomaly1_value2 prop3: test_test flag: FLAG_LATE_PROCESSED_ORDERS kpiIds: - KPI_AVERAGE_PROCESS_TIME - SUM_OF_SALES_EX knowledgeObjectId: ORDERS_ANOMALY type: ANOMALY - id: ANOMALY_HIGH_PROFIT_ORDERS displayName: Orders with a profit higher than 100 dollars description: This Anomaly displays Orders with a profit higher than 100 dollars customAttributes: prop1: anomaly2_value1 prop2: anomaly2_value2 flag: FLAG_HIGH_PROFIT_ORDERS kpiIds: - KPI_AVERAGE_PROCESS_TIME - SUM_OF_SALES_EX knowledgeObjectId: ORDERS_ANOMALY type: ANOMALY
Table
Next, let's create a Profile View for the table component. Here you can find a screenshot of how the provided example will look like:
Orders Profile View
metadata: key: order-details template: false name: Order Details knowledgeModelKey: new-sales-data knowledgeObjectId: ORDERS profileView: true variables: - name: record #Defines the table object to access its meta data from the knowledge model - name: id # Default input parameters, which can be used for a table component layout: rows: - id: row1 columns: - id: row1-col1 componentId: activity1 size: "1" order: 200 - id: row1-col2 componentId: text1 size: 1/2 order: 300 order: 100 components: - id: activity1 type: activity-history settings: objectId: ${id} recordMetadataId: ORDERS name: Activity History - id: text1 #Listing meta data from the knowledge model. As of this is only limited to the object used in the table. Other attributes can not be displayed. type: text-box settings: title: Listing meta data from the knowledge model content: ${record.PRODUCT_NAME}<br/><strong>Process Time:</strong> ${record.PROCESS_TIME}<br/><strong>Order ID:</strong> ${record.ORDER_ID}<br/><strong>Quantity:</strong> ${record.QUANTITY}<br/> - id: text2 #Listing default input parameters type: text-box settings: title: Listing default input parameters content: <strong>id:</strong> ${id} <br/> <strong>Product Name:</strong>
View - Table configuration
- id: table1 type: table settings: data: columns: - id: ORDERS.ORDER_ID link: true order: 100 - id: ORDERS.PROCESS_TIME order: 150 - id: ORDERS.PRODUCT_NAME order: 200 - id: ORDERS.QUANTITY order: 300 - id: ORDERS.OORDER_DATE order: 400