Database Reference
In-Depth Information
These few examples of the executeQuery overload show only a small bit of the func-
tionality available in this overload. other query functionalities include the ability to
query members based on a named level or generation, user-defined attributes, attribute
dimensions, dynamic time series, and varying attributes. This overload, however, has a
fairly large number of options that can make it complex to use. on the other hand, most
Essbase professionals have worked with Essbase calculation scripts during their career,
and the Essbase Calc Script language features a robust set of member set functions. We
will next look at an overload of executeQuery that leverages the Calc Script member set
functions.
The Calc Script member set functions provide the most flexible way to specify
member sets available in the Essbase API. There are at least 45 different functions
that you can use to create member sets and you can nest the functions to provide
more control over the members in your set. here is an example of this executeQuery
overload.
// execute the query
selection.executeQuery(
"<OutputType Binary <SelectMbrInfo ( MemberName, ParentMemberName )",
"@ICHILD(Colas)");
There are a couple of things to note about the arguments for this overload. The first
argument specifies the property values that will be available in the partially described
IEssMember object that is returned. keep in mind, however, that if you call methods
on the partially described IEssMember object, it will not throw an exception, but it may
return incorrect information. Below are selected fields from IEssMember objects created
from this query. Can you spot the incorrect information in the list below?
Name: 100-10
Level: 0
Parent: 100
Name: 100-20
Level: 0
Parent: 100
Name: 100-30
Level: 0
Parent: 100
Name: 100
Level: 0
Parent: Product
If you noticed that the level for member name 100 is incorrectly reported as level-0,
you are correct. As the executeQuery method in this example did not specify that the
level number should be returned, then the value reported is the default value for an inte-
ger field in Java which is, of course, zero.
The member set functions can be extremely useful, but they may not work in exactly
the same way as they work in the calculation engine. For example, the @merge member
set function will merge lists, but it does not appear to return a unique list of mem-
bers as stated in the documentation. Consider the following example adapted from the
@mErgE documentation in the Essbase technical reference.
Search WWH ::




Custom Search