What is the best way to model time series data in Dgraph? I would like to store tags about a series as well as the time+value pairs. Searching should be fast for tags as well as by time ranges. Is this possible? Can a dgraph cluster scale to support a growing dataset?
Any Graph DB is a clean paint board. You can have any model you want. The problem tho is that a GraphDB isn’t meant to work as a Time Series DB. If you wish to just ingest Time Series data in a GraphDB, fine, but if you wish features and other characteristics that only a TSDB can have a GraphDB isn’t for the job.
We don’t have any model to follow. But I think a model for TSDB should be simple to implement. A GraphDB is really good to “invent” new models or apply any standardized model out there. What you need first is to master the DQL part.
Tags you can choose to have a fixed predicate called “Tags” and index them.
You can also use predicates as Tags, but if you have thousands of tags, your schema can grow exponentially.
You can use Facets to record “metadata”.
A triple (the smallest unit in Dgraph) works like a key-value pair. But for your case, you would work with the concept of nodes. Where you gonna add several keys that represent the time-series information.