jihantoro
(jihantoro)
June 19, 2019, 9:46am
1
is DGraph database fit for this task :
select by unix/epoch time, lower/upper (> or <) than given time (timeseries)
database that support array, and find word/sentence inside the array
query example :
select * from tweet where created_at > start_at and created_at < end_at and keyword in arraycolumn
MichelDiz
(Michel Diz)
June 19, 2019, 2:06pm
2
{
q(func: has(tweet))@filter(gt(created_at, "2018")
AND lt(created_at, "2019")
AND eq(arraycolumn, "keyword")){
expand(_all_)
}
}
OR
{
q(func: eq(arraycolumn, "keyword") )@filter(gt(created_at, "2018")
AND lt(created_at, "2019") {
expand(_all_)
}
}
Where this “start_at” come from? and what is this “keyword” exactly?
yep
yep
For information: This query could be slow without BTree index if there are many tweets all over the time and only time span makes result span smaller.
yyyguy
(yyyguy)
September 3, 2019, 4:38pm
4
Hello,
So is this question answered? It is not clear to me if DGraph could/should be used for time series purposes. Is there a good definitive answer? I am looking to potentially use DGraph for a small dimensional database project, but I am uncertain if it will perform well over time.
Thoughts?
MichelDiz
(Michel Diz)
September 3, 2019, 10:18pm
5
Yes, it is.
for those cases, you have to use
Inequality
AND, OR and NOT
Maybe in some cases, you could use Value Variables to catch some date from a specific node. And inject in a second block as param.
Value Variables
You could also use “Math on value variables” and/or “Aggregation”.
Aggregation
Math on value variables
yyyguy
(yyyguy)
September 4, 2019, 3:29pm
6
Thanks, @MichelDiz .
I appreciate the references as well.