Reputation: 1
I would like to ask, if there are 3 devices ("DEVICE001", "DEVICE002", "DEVICE003") in the same time series, is it possible to read all device data at one time in the same database query?
Currently, the following database queries are used to read the data from different devices separately:
"SELECT * FROM root.location.data.DEVICE001"
"SELECT * FROM root.location.data.DEVICE002"
"SELECT * FROM root.location.data.DEVICE003"
But I think to achieve one database query, the prerequisite is to know DEVICE00X before you can write the query statement. Is there any ways to include all device names to query all data?
Does anyone can deal this problem? Help please
Upvotes: 0
Views: 28
Reputation: 375
For your first question, you can use select * from dev_1, dev_2, dev_3
to query data from three devices in one statement of Apache IoTDB.
For your second question, you can use * to represent all devices, just like to represent all parameters that you already used. Therefore, the statement will be: select * from root.data.*
.
Upvotes: -1