Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The process of adjusting timestamp precision from milliseconds to microseconds or nanoseconds if there's an error in Apache IoTDB's timestamp_precision settings can be done by modifying the storage group's TTL (Time to Live) and DPI (Data Point Interval) parameters. Here are the steps for doing this:

  1. Check the current timestamp_precision setting of IoTDB by executing the following command in the IoTDB shell:

SHOW CONCAT(TIME, '', TIMESTAMPPRECISION)

  1. If the current timestampprecision setting is incorrect, modify the DPI parameter of the storage group to match the desired timestampprecision. For example, to set the timestamp_precision to microseconds (µs), set the DPI to 1000 µs as follows:

SET STORAGE GROUP <storage_group_name> TTL <ttl_value> DPI 1000

  1. Verify that the DPI was set correctly by executing the following command:

SHOW STORAGE GROUP <storage_group_name>

  1. After the DPI has been modified, adjust the TTL to match the desired timestampprecision. For example, to set the timestampprecision to nanoseconds (ns), set the TTL to 1000000 ns as follows:

SET STORAGE GROUP <storage_group_name> TTL 1000000 DPI <dpi_value>

  1. Verify that the TTL was set correctly by executing the following command:

SHOW STORAGE GROUP <storage_group_name>

  1. Finally, check the timestamp_precision setting by executing the SHOW command again to ensure that it has been adjusted correctly:

SHOW CONCAT(TIME, '', TIMESTAMPPRECISION)

By following these steps, the timestamp precision in IoTDB can be adjusted from milliseconds to microseconds or nanoseconds as desired.