If you put objectid into path like `root.db.objectId.carId(timestamp, longitude)`, you will put data of one car into different devices in IoTDB, I don't think it's a good idea because the number of devices will expand and will affect the performance.
If you really want to do this, you can get longitude for one car like `select longitude from root.db.*.carId where time >= XXX and time <= XXX align by device` you can also get longitude for each car like `select longitude from root.db.*.carId where time >= XXX and time <= XXX align by device` However, as objectId is meaningless, so the order in result set is also meaningless. Best regards, ---------------------- Yuan Tian On Mon, Jan 22, 2024 at 10:32 AM 김천구 <[email protected]> wrote: > Dear Yuan Tian > > Thank you for your reply. Your response was very helpful. > But I have an additional question here. > > Since the original data is stored in MongoDB, the issue arises because it > is not time series data. > After discussing with my colleagues, we've decided that adding an offset to > modify the original data is not an option. > And I found information about using tags in IoTDB. So, I have a question > regarding the use of tags. > > As far as I understand, when using tags in IoTDB, it is done as follows, > based on what I observed on the website. > > root.db.tag1.tag2.device.sensor_value > > > Here comes my question. If I want to attach a unique tag to each tuple to > avoid duplicates, > is it possible to use MongoDB's objectId as a tag and create a time series > like the following in IoTDB? > > create timeseries root.db.objectId.device.longitude DOUBLE, encoding=plain > insert into root.db.objectId.device(timestamp, longitude) values(1, 33.33) > > Or is there *any other way* to use the objectId as a tag in IoTDB? > > > > Secondly, if I were to use such a way, how could I select information such > as the longitude for each tuple? > > select longitude from root.db.** > > I couldn't select the data using the method mentioned above. If objectId is > inserted into a timeseries in the IoTDB tree structure, > could you please provide guidance on how to access the values of each > tuple? > > > > Thank you for your time and assistance on this matter. > > Best regards, > ----------------------------------- > Cheongu Kim > [email protected] >
