1

I've been trying to create a new action in ActivePivot Live, that calls retrieveObject on the QueriesService. Something like this:

IQueriesService queriesService = getSessionService(IQueriesService.class);
ObjectDTO dto = queriesService.retrieveObject("MyDistributedCube", action.getObjectKey());

This works fine on a local cube, but in a distributed setup if fails to retrieve an object from a remote server. Maybe this is not surprising, but the question is how do I make it work?

Would a new query type, similar to the LargeDealsQuery in this example help me? http://support.quartetfs.com/confluence/display/AP4/How+to+Implement+a+Custom+Web+Service

UPDATE:

Here is the context. What I have is too may fields to resonably show in the drill-through blotter, so I'm hiding some in the cube drill-through config, both for display, but also to reduce the amount of data transfered. To see all the fields when that is needed, I added a "drill-through details" item to the right-click menu, that will query the cube for all fields on a single drill-through row and show that in a pop-up. Maybe there is a better way to get this functionality?

2 Answers2

0

IQueriesService.retrieveObject() is an obsolete service that was introduced in ActivePivot 3.x. At that time ActivePivot stored the input objects directly in the memory and it was natural to provide means to retrieve those objects. But later versions of ActivePivot introduced a column store: the data is extracted from the input objects and packed and compressed into columnar structures. The input objects are then released, vastly reducing memory usage.

For ActivePivot 4.x the retrieveObject() service has been somewhat maintained, although indirectly, as in fact generic objects are reconstructed on the fly from the compressed data. As you noticed the implementation only supports local cubes. Only MDX queries and Drillthrough queries have a distributed implementation.

For ActivePivot 5.x the retrieveObject() service has been removed completely, in favor of direct access to the underlying datastore.

There is a good chance you can address your use case with a (distributed) drillthrough query that retrieve raw facts. Another quick fix would be to issue your request manually on each of the local cubes in the cluster.

More generally, drillthrough queries (and also MDX queries, and GetAggregates queries) are contextual in ActivePivot. You can attach *IContextValue*s to the query that will alter the way the query is executed. For drillthrough queries in particular, you can attach the IDrillThroughProperties context value to the query:

public interface IDrillthroughProperties extends IContextValue {

/**
 * @return The list of hidden columns defined by their header names.
 */
List<String> getHiddenColumns();

/**
 * @return The comparator used to sort drillthrough headers (impacts the column order).
 */
IComparator<String> getHeadersComparator();

/**
 * Returns the post-processed columns defined as plugin definitions of {@link IPostProcessedProperty}.
 * @return the post-processed columns defines as plugin definitions of {@link IPostProcessedProperty}.
 */
List<IPluginDefinition> getPostProcessedColumns();

@Override
IDrillthroughProperties clone();
}

This will among other things allow you to retrieve only the columns you want for a specific drillthrough query.

Antoine CHAMBILLE
  • 1,676
  • 2
  • 13
  • 29
  • Hi, Antoine. Thanks for the answer. I added some context to the question. What I really want is standard drill-through with a limited number of fields, and a "full" drill-through with all fields for a single fact. Can I get that using a drill-through queries? – Anders Blaagaard Oct 03 '13 at 08:06
0

According to your update one may do the following: set the drillthroughProperties not in the shared context but in a given role or per user and allow each user to change that before firing a DT query. So you have to code a service that will display all the attributes that a user can access, then the user can choose what fields should appear in the drillthourgh, populate the drillthroughProperties then and fire a DT query. You'll see then only what you're interested in. see this like the currency context of the sandbox but here it impacts the DT.

tuxmobil
  • 238
  • 3
  • 10