我正在使用德鲁伊创建用于生成报告的用户界面。对于脚本,我使用如下代码:德鲁伊聚合函数
{
"type" : "doubleSum",
"name" : "impressions",
"fieldName" : "impressions"
},
{
"type" : "doubleSum",
"name" : "clicks",
"fieldName" : "clicks"
},
{
"type" : "doubleSum",
"name" : "pvconversions",
"fieldName" : "pvconversions"
},
{
"type" : "doubleSum",
"name" : "pcconversions",
"fieldName" : "pcconversions"
}
我需要两个字段:
Total Conversions = pvconversions+pcconversions
CTR = Clicks/Impressions
我还没有能够找到关于这件事情如何给他们写什么。 任何人都可以帮忙。
感谢
没错!谢谢:) –
这里是链接,如果你正在寻找哪些将是有益的 - http://druid.io/docs/latest/querying/aggregations.html – thunderbird