-
In the examples I see that the pattern used is to provide a byte string to query.timeseries(
datasource='twitterstream',
granularity='day',
intervals='2014-02-02/p4w',
aggregations={'length': doublesum('tweet_length'), 'count': doublesum('count')},
post_aggregations={'avg_tweet_length': (Field('length') / Field('count'))},
filter=Dimension('first_hashtag') == 'sochi2014'
) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hello @vigith ! Thank you for your question :) NB: You can chain methods calls like
Enjoy! |
Beta Was this translation helpful? Give feedback.
Hello @vigith !
Thank you for your question :)
I've just pushed an exampe for building structures https://github.com/grafadruid/go-druid/blob/master/examples/main.go
I've moved examples from parsing json to structures there https://github.com/grafadruid/go-druid/blob/master/examples/fromjson/main.go
Hope this helps :)
NB: You can chain methods calls like
f := filter.NewSelector().SetDimension("country").SetValue("France")
or you can go the one line per method call wayEnjoy!