Search code examples
apache-iotdb

How to check the number of time series in Apache IoTDB that has data stored from a certain period?


My time series in Apache IoTDB may not have data inserted, and I want to know the number of time series data that has data coming in from a certain period. Anyone know what query statement can I write to check the "updating" status for the time series?


Solution

  • You can use select first_value(*) from root.XX where time >= XXX and time <= XXXX having first_value(*) is not null to query the time series that already stored the data in Apache IoTDB, which should be the "active" time series in your scenario. Then, you can count the number of time series in the result, which should be your final total number to know.