0

I was using TDengine for some times,and I tried to caculate some rate through the tags and columns. The follow is my table structure:

create table p(ts timestamp,voltag int)tags(nominal_voltage int);

Any calculate SQL is

select voltag/nominal_voltage from p;

but an I got the error bellow:

DB error: invalid operation: tag columns can not be used in arithmetic expression (0.001368s)

My TDengine Version is: version: 2.4.0.12.

Does some know is there any way to calculate the rate. Or is there any method that TDengine supports for this situation.

xiaolei
  • 43
  • 1
  • 6

3 Answers3

0

Sorry, the arithmetic expression is not supported for tag in TDengine. Tag is just a flag that identifies the data table.

ming
  • 101
  • 4
0

I think I can store the tag value as a normal column, and then I can do arithmetic calucate between them

xiaolei
  • 43
  • 1
  • 6
0

TDengine 2.x does not support calculation between column and tag. It will be improved in a 3.x re-designation.

zitsen
  • 339
  • 2
  • 10