greptime team, could someone help how I can create...
# general
w
greptime team, could someone help how I can create flow table to calculate the traffic(rx/tx) rate, and discard/crc delta in the same table? for instance,
Copy code
CREATE TABLE interface (
  router STRING NOT NULL,
  port STRING NOT NULL,
  rx INT NOT NULL,
  tx INT NOT NULL,
  discards INT,
  crc INT,
  ts TIMESTAMP(3) NOT NULL,
  TIME INDEX (ts)
)
WITH(
  append_mode = 'true'
);
Sink table:
Copy code
CREATE TABLE interface_sink (
  router STRING NOT NULL,
  port STRING NOT NULL,
  rx INT NOT NULL,
  tx INT NOT NULL,
  discards INT,
  crc INT,
  time_window TIMESTAMP TIME INDEX,
  update_at TIMESTAMP
);
I'd like to create a flow that calculates rate for tx/rx, delta for CRC/discard. Metric is sent every 30s. Occasionally, it could be missed due to various reasons. CC: @Ruihang