Closed huguesbr closed 9 years ago
Any suggestion?
Hey @huguesbr! Thanks for the suggestion. :)
I don't know how I feel about adding this method. What's the advantage of having it instead of just looping a KIOQuery
array and calling the runAsyncQuery
method for each one?
no pressure ^^ I said it was hacky and it's definitely a weird way to parse the data to recreate a json.. @heitortsergent I know it's kind of weird but the runMultiAnalysisWithQueries have so much limitation (backend) that I was trying to get a way to work around it. I know I could just do multiple queries but then I have to re-parse the data to make it behave the same way than runMultiAnalysisWithQueries... I would love just a way to run multiple query on the same timeframe but with different filters...
@terryhorner do you have any suggestions here? :dancer:
honestly I do think you're right, it's really to ugly. I just want an easy way to query the same result over the same timeframe but with different filters. (I compare actions of different type of users). I thought multiQueries could do that but they are limited to same dataset (identical filters) and are more to run different analysis (average vs median).
@huguesbr yeah, I definitely see the use case for it. I was just wondering if there's any easier way to handle that via Keen's backend, but I don't see anything in the docs.
@huguesbr @heitortsergent there's no way to do this via the API directly, they are required to be separate queries.
The benefit of multi-analysis is that it can calculate multiple aggregations from a single data set without the need to make a second pass on the data. Using multiple filters requires multiple passes because the underlying data required to calculate each result is different.
Yes. I understand the point of having the same dataset. I wanted to keep the keen signature ( json ) but I guess I will just add a convenience method which just return its own data structure. Thank you for putting me back in the righteous way :)
On Tue, Oct 27, 2015 at 8:12 AM -0700, "Terry Horner" notifications@github.com wrote:
@huguesbr @heitortsergent there's no way to do this via the API directly, they are required to be separate queries.
The benefit of multi-analysis is that it can calculate multiple aggregations from a single data set without the need to make a second pass on the data. Using multiple filters requires multiple passes because the underlying data required to calculate each result is different.
— Reply to this email directly or view it on GitHub.
@huguesbr no worries, thanks for helping out with the SDK! :rocket:
It's more a limit of the backend, but I think it will be great to have this on the client (running multiple query).
I've write a dirty (should I say super dirty?) patch trying to be compatible with existing
runMultiAnalysisWithQueries
signature (using NSData, NSURLResponse, NSError) namedrunMultiAsyncQueries
.If idea is interesting, I could refactor to integrate in the current client (rather than category) and probably calling back with a dict rather than NSData.
Even if I liked the idea of keeping all Keen response using JSON rather than dict..