Is dgraph fit for time series and finding equal value in array

is DGraph database fit for this task :

  1. select by unix/epoch time, lower/upper (> or <) than given time (timeseries)
  2. 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
{
  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.

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?

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

Thanks, @MichelDiz.

I appreciate the references as well.