ビューは、特定のビジネス上の問題または可視化に関連するデータのビューを定義する論理的構成です。
これらの属性および属性グループに関連付けられたメタデータは、ビュー定義の一部としてEndeca Serverデータ・ドメインに格納されます。
エンティティ構成Webサービスを使用して、ビューのメタデータ・プロパティを設定します。
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns:putEntities xmlns:ns="http://www.endeca.com/endeca-server/sconfig/2/0"> <ns:semanticEntity key="Products" displayName="Products" isActive="false"><ns:definition>/*Calculate Total Sales respecting Navigation*/DEFINE GlobalSales2 as select sum(FactSales_SalesAmount) AS TotalSales Group; DEFINE Products AS SELECT ProductSubcategoryName AS ProductSubcategoryName, ProductCategoryName AS ProductCategoryName, coalesce(ProductName, 'N/A') as ProductName, Description AS Description, Color as Color, arb(SurveyResponse) as "SurveyResponse",avg(FactSales_SalesAmount) AS AvgSales, sum(FactSales_SalesAmount) AS SalesSum, avg(FactSales_ProductStandardCost) AS AvgStandardCost, avg(ListPrice) AS AvgListPrice, avg(FactSales_UnitPrice) AS AvgUnitPrice, Avg(FactSales_OrderQuantity) as AvgQuantity, Sum(FactSales_SalesAmount-(FactSales_OrderQuantity*FactSales_ProductStandardCost)) as MonthlyProfit, Avg((FactSales_SalesAmount-(FactSales_OrderQuantity*FactSales_ProductStandardCost))/FactSales_OrderQuantity) as AvgMargin, sum(FactSales_SalesAmount)/GlobalSales2[].TotalSales as SalesShare, DimDate_FiscalYear*100+DimDate_MonthNumberOfYear as "Year-Month", DimDate_FiscalYear as DimDate_FiscalYear GROUP BY ProductName, "Year-Month"</ns:definition> <ns:description>This view is grouped to a year/month and product name.</ns:description> <ns:attributes> <ns:semanticAttribute name="Color" displayName="Color" datatype="mdex:string" isDimension="true" isKeyColumn="false"> <ns:property key="availableAggregations">COUNT,COUNTDISTINCT</ns:property> <ns:property key="defaultAggregation"></ns:property> <ns:property key="localizedDn">{"de_DE":"Farbe""fr_FR":"Couleur", "es_ES":"Color"}</ns:property> </ns:semanticAttribute> <ns:semanticAttribute name="Description" displayName="Description" datatype="mdex:string" isDimension="true" isKeyColumn="false"> <ns:property key="availableAggregations">COUNT,COUNTDISTINCT</ns:property> <ns:property key="defaultAggregation"></ns:property> <ns:property key="localizedDn">{"de_DE":"Beschreibung", "fr_FR":"Description", "es_ES":"Descripción"}</ns:property> </ns:semanticAttribute> <ns:semanticAttribute name="ProductCategoryName" displayName="Product Category Name" datatype="mdex:string" isDimension="true" isKeyColumn="false"> <ns:property key="availableAggregations">COUNT,COUNTDISTINCT</ns:property> <ns:property key="defaultAggregation"></ns:property> <ns:property key="localizedDn">{"de_DE":"Produktbezeichnung", "fr_FR":"Nom de catégorie", "es_ES":"Categorías des Productos"}</ns:property> </ns:semanticAttribute> <ns:semanticAttribute name="ProductName" displayName="Product Name" datatype="mdex:string" isDimension="true" isKeyColumn="true"> <ns:property key="availableAggregations">COUNT,COUNTDISTINCT</ns:property> <ns:property key="defaultAggregation"></ns:property> <ns:property key="localizedDn">{"de_DE":"Produktname", "fr_FR":"Nom de produit", "es_ES":"Nombre del producto"}</ns:property> </ns:semanticAttribute> <ns:semanticAttribute name="SalesShare" displayName="Sales Share" datatype="mdex:double" isDimension="false" isKeyColumn="false"> <ns:property key="availableAggregations">SUM,AVG,MEDIAN,MIN,MAX,VARIANCE,STDDEV</ns:property> <ns:property key="defaultAggregation">SUM</ns:property> <ns:property key="formatSettings">{"type":"PERCENTAGE","@class":"com.endeca.portal.format.NumberFormatter"}</ns:property> <ns:property key="localizedDn">{"de_DE":"Umsatzanteil", "fr_FR":"Division de ventes", "es_ES":"División de Ventas"}</ns:property> </ns:semanticAttribute> <ns:semanticAttribute name="SalesSum" displayName="Sales Sum" datatype="mdex:double" isDimension="false" isKeyColumn="false"> <ns:property key="availableAggregations">SUM,AVG,MEDIAN,MIN,MAX,VARIANCE,STDDEV</ns:property> <ns:property key="defaultAggregation">SUM</ns:property> <ns:property key="localizedDn">{"de_DE":"Umsatz", "fr_FR":"somme de ventes", "es_ES":"Ventas totales"}</ns:property> <ns:property key="formatSettings">{"type":"CURRENCY","@class":"com.endeca.portal.format.NumberFormatter","currencySymbol":"$"}</ns:property> </ns:semanticAttribute> <ns:semanticAttribute name="SurveyResponse" displayName="Survey Response" datatype="mdex:string" isDimension="true" isKeyColumn="false"> <ns:property key="availableAggregations">COUNT,ARB</ns:property> <ns:property key="defaultAggregation">ARB</ns:property> <ns:property key="localizedDn">{"de_DE":"Umfrageantwort", "fr_FR":"Réponse à l'enquête", "es_ES":"Respuesta a la encuesta"}</ns:property> </ns:semanticAttribute> </ns:attributes> <ns:metrics/> <ns:groups> <group displayName="Products" key="Products"> <semanticAttributeKey name="ProductName"/> <semanticAttributeKey name="ProductCategoryName"/> <semanticAttributeKey name="Color"/> <semanticAttributeKey name="Description"/> <property key="includeInNavigation">true</property> <property key="includeInRecord">true</property> <property key="localizedDn">{"de_DE":"Produkte", "fr_FR":"Produits", "es_ES":"Productos"}</property> </group> </ns:groups> </ns:semanticEntity> </ns:putEntities> </soap:Body> </soap:Envelope>
この例は、Endeca Serverデータ・ドメインに格納されているビューの定義(Endeca Serverではセマンティック・エンティティとして格納)を示しています。このビューの定義には、次のものが含まれます。
ビューのプロパティ | 説明 |
---|---|
definition | Endeca Serverデータ・ドメインに格納されている物理データからビューを導出するEQL定義 |
Key | ビューの一意の識別子 |
displayName | ビューの名前 |
description | ビューの説明 |
attributes | ビューに関連付けられた属性、およびこれらの属性のすべてのメタデータのリスト |
metrics | ビューに関連付けられた事前定義メトリック、およびこれらのメトリック属性のすべてのメタデータのリスト |
groups | ビューに関連付けられたグループ、およびこれらのグループのすべてのメタデータのリスト |