horaedb icon indicating copy to clipboard operation
horaedb copied to clipboard

Support write/query via OpenTSDB API

Open jiacai2050 opened this issue 2 years ago • 5 comments

Describe This Problem

Currently there are three query language supported in CeresDB: SQL/InfluxQL/PromQL. It would be great to also support OpenTSBD query API.

Proposal

There are many API in OpenTSDB, the following two API are most important, so we can first implement those.

  • [ ] http://opentsdb.net/docs/build/html/api_http/query/index.html
  • [x] http://opentsdb.net/docs/build/html/api_http/put.html

Additional Context

No response

jiacai2050 avatar May 18 '23 08:05 jiacai2050

I would like to work query api, I am newer fo this project, Could you give me some suggestion to start?😊

parkma99 avatar Aug 02 '23 02:08 parkma99

Thanks for you interests, let us know when you have any problems.

Generally speaking, you need to convert opentsdb query syntax to datafusion plan, you can refer how InfluxQL is implemented here:

  • https://github.com/CeresDB/ceresdb/blob/b6a0563226035bfa704a69fed685d030dea6f2ef/proxy/src/influxdb/mod.rs#L39

jiacai2050 avatar Aug 02 '23 04:08 jiacai2050

I find it's very hard to me current 😢😢,I give up to others this issue.

parkma99 avatar Aug 02 '23 14:08 parkma99

@parkma99 😅 Thanks anyway, you can try other issue first.

  • https://github.com/CeresDB/ceresdb/labels/contributor%20friendly

jiacai2050 avatar Aug 07 '23 02:08 jiacai2050

This docs explain how opentsdb query is executed:

Filtering

Grouping

Downsampling

Interpolation

Aggregation

Rate Conversion

Functions

Expressions

Understanding the order of operations is important. When returning query results the following is the order in which processing takes place.

jiacai2050 avatar Sep 04 '23 02:09 jiacai2050