Drilling with JS
Hey everybody,
when I look at my mongoDb I can't see any info to correlate events. Suppose I have a custom event with two fields: foo
and bar
and I want to get the number of events where foo = 1 && bar == 2
. How do I do that with data that is structured like this:
{
"_id" : "TIMESTAMP_2019:12_P",
"d" : {
"10" : {
"1" : {
"c" : NumberInt(1)
}
}
},
"m" : "2019:12",
"s" : "foo"
}
{
"_id" : "DURATION_2019:12_I",
"d" : {
"10" : {
"2" : {
"c" : NumberInt(1)
}
}
},
"m" : "2019:12",
"s" : "bar"
}
The "drill" module seems to be able to do it, generating queries like
{"event":"event","dbFilter":{"sg.foo":{"$in":[1]},"sg.bar":{"$in":[2]},"byVal":""}
Comments
In the standard aggregated data model, you cannot correlate them, data can be viewed only from a single property perspective (which is encoded in _id)
for multi-field correlation you must use drill
Thanks for the reply!
Do you mean "to do this programatically you need to be a enterprise customer" or "even if you are a enterprise customer you can only do this using drill".
Community edition only has aggregated data, so all segments are stored separately, and there is no way to tie them together.
While Enterprise edition stores granular data and you can query that data almost any way you like.
So I guess, yes, to do this even programmatically, you need to be an enterprise customer (mostly for the drill feature)
Please sign in to leave a comment.