From 2242f7297a0b7a1e47fe42e773d5f7e64bfe886a Mon Sep 17 00:00:00 2001 From: Holger Stitz Date: Mon, 21 Nov 2016 15:10:28 +0100 Subject: [PATCH] Add median aggregator Caleydo/targid2#53 --- config.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/config.json b/config.json index 1d7d20b..dcab696 100644 --- a/config.json +++ b/config.json @@ -1,6 +1,10 @@ { "dburl": "sqlite:///${caleydo_server.dir}/plugins/targid_dummy/ab.sqlite", "index": "(t.rowid-1) as _index", + "agg_score": { + "query": "%(agg)s(%(score)s)", + "replacements": ["agg", "score"] + }, "views": { "a": { "table": "a", @@ -69,8 +73,8 @@ }, "score": { "idType": "IDTypeA", - "query": "SELECT cast(a_id as text) as id, %(agg)s(%(score)s) as score FROM ab INNER JOIN b ON b.id = ab.b_id WHERE b.b_cat2 = :b_cat2 GROUP BY ab.a_id", - "replacements": ["agg", "score"], + "query": "SELECT cast(a_id as text) as id, %(agg_score)s as score FROM ab INNER JOIN b ON b.id = ab.b_id WHERE b.b_cat2 = :b_cat2 GROUP BY ab.a_id", + "replacements": ["agg", "score", "agg_score"], "arguments": ["b_cat2"] } },