Search code examples
apache-iotdb

How to add the table header for the query results returned by python API in Apache IoTDB?


When querying data in Apache IoTDB, some measures have values and some do not, how do you determine which measure the final query results belongs to? For example. select a, b, c from root.it.sa limit 10, and if b is empty, two values will be returned. There is no way to determine whether these two values are a, b or a, c. I know that if the results are returned in client, then the results should have a table header, but the API using Python only returns data with two values and a timestamp. Is there a simpler way to solve this problem?


Solution

  • If this time series b has indeed written data or created manually in Apache IoTDB, even if no value has been written within a certain period of time, for your query statement all three time sereis should be returned with a header, even with python API. Unless your time series b has never written any data or created manually. If it is your case and you still want it to be returned, you can manually create this time series, or you can use a template to include all the time series you think may appear, and hang this template on an upper node so that even if b has not written data, it will be returned when query.