You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2018/08/23 12:25:07 UTC

[GitHub] sowalassane removed a comment on issue #5496: Druid Postaggregations in superset: list index out of range

sowalassane removed a comment on issue #5496: Druid Postaggregations in superset: list index out of range
URL: https://github.com/apache/incubator-superset/issues/5496#issuecomment-408793511
 
 
   Hi, thank you.
   
   The context of my request:
   - i have data from 2009 to 2014
   - two measures nb
   
   _personnes and quantity and two dimensions for exemple region and
   department.
   
   I want to calculate the average per region or per department.
   
   
   Here is my definition of the average metric:
   
   
   *{  "aggregations" : [    { "type" : "count", "name" : "rows" }, /* count
   the total number of records */    { "type" : "longSum", "name" : "tot",
   "fieldName" : "nb_personnes" }/* compute the total sum of my measure with
   nb_personnesfield in my druid datasources */  ],/* query to compute the
   average */  "postAggregations" : [{    "type"   : "arithmetic",    "name"
     : "average",    "fn"     : "/",    "fields" : [
         {"type":"fieldAccess", "name":"tot", "fieldName":"tot"},/* the total
   sum that i calculated*/       { "type" : "fieldAccess", "name": "count"} /*
   the total of records*/    ]  }]}Have i to specify an intervalle of time in
   the definition ?*find in P.J respectively the stack trace when i use your
   sample postagg definition and when i use my definition.
   
   
   
   Le lun. 30 juil. 2018 à 05:15, ahsanshah <no...@github.com> a
   écrit :
   
   > Here is a sample postagg definition for an "Average" metric:
   >
   > {
   > "type": "arithmetic",
   > "name": "div",
   > "fn": "/",
   > "fields": [
   > {
   > "fieldName": "sum__average_metric",
   > "type": "fieldAccess",
   > "name": "sum__average_metric"
   > },
   > {
   > "type": "fieldAccess",
   > "fieldName": "count",
   > "name": "count"
   > }
   > ]
   > }
   >
   > Are you defining the postagg properly?
   >
   > —
   > You are receiving this because you authored the thread.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/incubator-superset/issues/5496#issuecomment-408735109>,
   > or mute the thread
   > <https://github.com/notifications/unsubscribe-auth/AOPq29Hm2ZUtUfgdVi40ex2Wb4018B9Bks5uLnpPgaJpZM4VhhO2>
   > .
   >
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org