You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@superset.apache.org by Batchu Venkatasai <ve...@paypal.com.INVALID> on 2020/06/02 09:26:12 UTC

Superset chart with percentiles with data from druid

Hello everyone,

We have a use case where we have to show the 90th, 95th and 99th percentile value of a dimension. I came across this https://druid.apache.org/docs/latest/development/extensions-core/datasketches-quantiles.html. Here we can add this extension to druid to get the 95th percentile aggregator. Is there any way to use this aggregator in Superset so that we can plot 90th, 95th, 99th percentile value of a dimension in a single chart or across multiple charts ? I found that we can define custom post agrregators in Superset for druid but not sure if we can define custom aggregators too. 

Thanks,
Bharat

Re: Superset chart with percentiles with data from druid

Posted by Batchu Venkatasai <ve...@paypal.com.INVALID>.
Thank you Maxime Beauchemin. I will use that.


On 2020/06/03 06:01:02, Maxime Beauchemin <ma...@preset.io> wrote: 
> Hi Batchu, we recommend using the SQLAlchemy connector to druid from
> Superset as we're slowly deprecating the native Druid connector.
> 
> Knowing that, you can use the SQL function "APPROX_QUANTILE(my_metric,
> 0.95)" just like you can as any other function
> [image: Screen Shot 2020-06-02 at 11.00.26 PM.png]
> 
> On Tue, Jun 2, 2020 at 2:26 AM Batchu Venkatasai
> <ve...@paypal.com.invalid> wrote:
> 
> > Hello everyone,
> >
> > We have a use case where we have to show the 90th, 95th and 99th
> > percentile value of a dimension. I came across this
> > https://druid.apache.org/docs/latest/development/extensions-core/datasketches-quantiles.html.
> > Here we can add this extension to druid to get the 95th percentile
> > aggregator. Is there any way to use this aggregator in Superset so that we
> > can plot 90th, 95th, 99th percentile value of a dimension in a single chart
> > or across multiple charts ? I found that we can define custom post
> > agrregators in Superset for druid but not sure if we can define custom
> > aggregators too.
> >
> > Thanks,
> > Bharat
> >
> 

Re: Superset chart with percentiles with data from druid

Posted by Maxime Beauchemin <ma...@preset.io>.
Hi Batchu, we recommend using the SQLAlchemy connector to druid from
Superset as we're slowly deprecating the native Druid connector.

Knowing that, you can use the SQL function "APPROX_QUANTILE(my_metric,
0.95)" just like you can as any other function
[image: Screen Shot 2020-06-02 at 11.00.26 PM.png]

On Tue, Jun 2, 2020 at 2:26 AM Batchu Venkatasai
<ve...@paypal.com.invalid> wrote:

> Hello everyone,
>
> We have a use case where we have to show the 90th, 95th and 99th
> percentile value of a dimension. I came across this
> https://druid.apache.org/docs/latest/development/extensions-core/datasketches-quantiles.html.
> Here we can add this extension to druid to get the 95th percentile
> aggregator. Is there any way to use this aggregator in Superset so that we
> can plot 90th, 95th, 99th percentile value of a dimension in a single chart
> or across multiple charts ? I found that we can define custom post
> agrregators in Superset for druid but not sure if we can define custom
> aggregators too.
>
> Thanks,
> Bharat
>