TransformWith and Dynamic Aggregation

14 views
Skip to first unread message

Jonathan Cummins

unread,
Jul 14, 2015, 5:00:55 AM7/14/15
to rav...@googlegroups.com
Hi,

Is it possible to use a transformer before aggregating the results ?

var query = _session.Query<AverageRates.ReduceResult, AverageRates>()
             .TransformWith<MyTransformer, MyTransformer.Result>()
                .AggregateBy(x => x.Month)
                .AverageOn(x => x.ConvertedRate)
                .ToList();

Thanks

Jonathan Cummins

unread,
Jul 14, 2015, 5:14:52 AM7/14/15
to rav...@googlegroups.com
I should have mentioned that when i run this query i get my results in the type of MyTransformer.Result, but i do some calculations in my transformer which seem to be ignored.
I'm just getting the values from my index copied directly into my transform result.

Oren Eini (Ayende Rahien)

unread,
Jul 14, 2015, 5:18:04 AM7/14/15
to ravendb
No, the aggregation runs on the index directly, without involving the transformer.

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages