Ask Your Question
1

What is the process to duplicate the measurement points and data from one root device to another in Apache IoTDB?

asked 2023-07-07 05:05:57 +0000

plato gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2023-07-07 05:25:02 +0000

ladyg gravatar image

To duplicate the measurement points and data from one root device to another in Apache IoTDB, you can follow these steps:

  1. Open the source IoTDB instance and navigate to the database you want to copy.

  2. Use the "SHOW TIMESERIES" command to obtain a list of all metrics present in the database.

  3. Use the "EXPORT" command to generate a file containing all the data you want to copy. For example, if you want to copy all data from the "metrics" database, you can use the following command:

    EXPORT "metrics.csv" WITH csv

  4. Move the exported file to the destination IoTDB instance.

  5. Open the destination IoTDB instance and navigate to the database where you want to import the data.

  6. Use the "CREATE TIMESERIES" command to create all the metrics present in the exported file. For example, if you exported data from the "metrics" database, you can use the following command to create a timeseries with the same properties in the destination database:

    CREATE TIMESERIES root.metrics WITH DATATYPE=DOUBLE, ENCODING=PLAIN

  7. Use the "IMPORT" command to import the data from the exported file. For example, you can use the following command to import data from the "metrics.csv" file:

    IMPORT "metrics.csv" WITH csv

  8. Once the data is imported, you can use the "SHOW TIMESERIES" command to verify that all metrics and data have been successfully copied to the destination IoTDB instance.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2023-07-07 05:05:57 +0000

Seen: 12 times

Last updated: Jul 07 '23