Reputation: 151
Are there any way to add a fixed constant column to the data retrieved from query of Apache IoTDB? The query statement I currently want to use is select avg(cast(val,'type'='DOUBLE'))as val from root.coal.
CL:BOIL:4#:LOAD group by([2023-11-01T00:00:00,2023-11-03T00:00:00),1h) fill (0) ALIGN BY DEVICE
, and I also tried to add as
after this statement, and it does not work. Does anyone know how I should correct this query statement?
When I ask this question, I checked all the exisiting question related to Apache IoTDB, but no relevant information is included at that time. Also, I already listed what I tried to do in the question, so I think this question gives enough information and shows my effort.
Upvotes: 0
Views: 30
Reputation: 411
Apache IoTDB can create constant time series by using const
function in the query statement. Try to generate command like select s1, s2, const(s1, 'value'='1024', 'type'='INT64'), pi(s2), e(s1, s2) from root.sg1.d1
.
Upvotes: 0