raintank / crate-datasource

Apache License 2.0
13 stars 8 forks source link

modifying group by column values #27

Closed joemoe closed 7 years ago

joemoe commented 7 years ago

when we do a group by a field that has longer values we totally clutter the legend. it would be cool to have there also the possibility to add a regexp or whatever.

we often work with iot data and they use so called topics. topics often look like this /crate/download/server/tar.gz/weekly

alexanderzobnin commented 7 years ago

Put regex in AS field for group by to extract part of column value. You can also use capture groups.

screen shot 2016-12-04 at 21 31 07
joemoe commented 7 years ago

@alexanderzobnin this works fine now. i'm just not sure if rows that are regexed to the same value should be combined. e.g. when you have .{1-3} and you have two different values like abcd and abce in my opinion they shouldn't be aggregated to the same line. what do you think @jodok?

alexanderzobnin commented 7 years ago

@joemoe you're right, I thought about that. I'll check this behaviour.