Views definitions are stored in a centralized location in View Manager.
Views are used to simplify the configuration of visualization components in Studio. The Chart is the first Studio component that uses Views in it’s configuration.
- There is no return statement in a view. The Studio component (e.g., Chart) is responsible for generating the return statement.
- The only attributes returned by a View are those in the statement where the define name equals the view Key.
- A view can be used in a EQL definition. Example with the employee view from the quickstart application:
RETURN viewQuery AS SELECT SUM(Sales) as SalesSum, FROM Employees GROUP BY DimEmployee_DepartmentName ORDER BY SalesSum PAGE(0,10)
/* CORRECT */ DimEmployee_FullName AS DimEmployee_FullName /* INCORRECT */ DimEmployee_FullName AS FullName
- Statement Names defined in the define word must be unique throughout all Views since there is a single namespace.
The view manager is an interface that allows you to create, edit and delete views.
You can find it:
- in Studio’s Control Panel before the version 3.1
- in the application settings after the version 3.1
where you can see:
- Dimension Selecting the “Dimension?” checkbox allow the attribute to be available for grouping within a visualization components (i.e., Chart).
- Predefined Metrics: reserved for complex expressions such as with Endeca Server - Endeca Query Language (EQL)
/* Ratio between the sum and the total */ SUM(FactSales_SalesAmount)/GlobalSales.GlobalSales
- a base view: The base view is created and maintained automatically by the Endeca Server data store for all data sources in Studio. It contains all of the available attributes.
Sconfig Web Service
In order to list the Entity (View), you can use the listEntities function of the sconfig web service. It's the easy way to extract the view definition that you can use with a copy of the getting started application.
With this web service, you can also, put (add), delete, validate entities.