cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to work on Aggregate Query

Former Member
0 Likes
844

Hi,

Can anyone please guide me how to work on <b>Aggregate Query</b> (With example)

Thanks in Advance

Regards

Muzammil

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Likes

Hi muzammil,

Aggregate Query is used to combine various results from different query templates into a single result set.By using Tag Query,SQL query and others you cannot combine tables from multiple databases or even servers.That means whatever database the data may lie we can combine it to give a single result set using Aggregate Query.This is the advantage of Aggregate query over others.

Coming to how to use part.First u need to map what templates u would like to aggregate.And if the queries are taking parameters.U can individually set the parameter values for each query or else u can give a parameter value common to all queries.U can also set aliases for query templates for better understandability.

U can reply for further assistance,if required.

Regards,

Ravi kumar.

Former Member
0 Likes

Hi Ravi,

Thanks for your reply.

I need to know what is the use of <b>Aggregrate Query Source path and Target path</b> in <b>Aggregate Query Details</b> tab,.

Thanks in Advance

Muzammil P.T

Former Member
0 Likes

Check out this link from the SAP Help Documentation:

http://<servername>/LighthammerCMS/Help/Applet_Reference_Details/ParameterReference.htm#Parameters

But, as Rick mentioned above, you should really focus on using the power of Business Logic Services as opposed to using the Aggregate Queries.

Former Member
0 Likes

Once again, I would STRONGLY recommend that you not use the AggregateQuery in your application. You get more functionality, easier implementation, and much easier maintenance if you use BLS. For this.

By the way, I wrote much of xMII, if that helps influence your decision.

- Rick

Former Member
0 Likes

Hi,

I would like to agree with Rick as he said it would be easy to do the same in BLS.But time taken will be less when queries are aggregated using Query template rather than BLS.But it depends on the situation whether to depend on BLS on or Query template.if it is a simple aggregate of two queries why to go to BLS and increase the time of execution.....?

I Guess you are asking for difference between aggregate query source param and target param....?if so i would like to explain using an example

consider if i had selected duration for target param and aggregate query source param after selecting a query template in target template.then duration in target param is nothing but what we had defined as duration in that query template while creating that query template.

and here what we are doing is setting that query template's duration to aggregate query's duration..........

Based on this example u can correlate the same for other parameters under target param or aggregate query source param.

Please revert back for further info........

regards,

Ravi Kumar.

Former Member
0 Likes

Thanks to Ryan , Rick and Ravi for your valuable suggessions.

Regards

Muzammil

Former Member
0 Likes

Hi Rick,

Do you have any documentation or pointers on how to integrate data from two different data servers into a single query using the Business Logic Services. The data will be coming from an SQL Server database and a DB2 database.

Thanks,

Mahwish

Former Member
0 Likes

Use SQL Query Action blocks to run the two queries. Then you can use the XML Joiner to combine the results from the two queries into one document assuming they have a common column.

Former Member
0 Likes

Thanks Ryan, can you please elaborate a little bit further, I'm completely new to xMII. How to you output the results of a particular action (eg running the SQL query). Does each step (including the XML joiner) go in a sequence on its own or are they all in the same sequence.

Thanks.

Former Member
0 Likes

The queries can go in the same sequence (don't have to). But the joiner must come in a sequence after the queries.

Answers (1)

Answers (1)

Former Member
0 Likes

The aggregate query is a "legacy" feature of xMII that existed prior to the inclusion of xMII's business logic services (BLS). You can achieve the same results plus much, much more with BLS versus the aggregate queries, so I would suggest not using them in your applications.

The xMII query and XML actions (Tag, SQL, join, merge, normalize, calculated columns, etc.) in BLS give you almost infinite flexibility in building composite data services that gather data from multiple source into a single resultset that can be viewed in one of the xMII widgets or some external application.

Best regards,

- Rick