seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[Bug] [connector-iotdb] timestamp zone id config does not work

Open alextinng opened this issue 1 year ago • 0 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

found wrong timezone of timestamp data after writing data into iotdb,

data import from tdengine

          time           |           power           |
======================================================
 2024-02-01 00:00:00.000 |              26.410000000 |
 2024-02-01 00:01:00.000 |              26.310000000 |
 2024-02-01 00:02:00.000 |              26.580000000 |
 2024-02-01 00:03:00.000 |              26.970000000 |
 2024-02-01 00:04:00.000 |              27.630000000 |

data in iotdb

IoTDB> show time_zone
Current time zone: Asia/Shanghai
IoTDB> select s_1603004 from root.default.meters.**.d_2
+-----------------------------+--------------------------------------------------------+
|                         Time|root.default.d1.power|
+-----------------------------+--------------------------------------------------------+
|2024-02-01T08:00:00.000+08:00|                                                   26.41|
|2024-02-01T08:01:00.000+08:00|                                                   26.31|
|2024-02-01T08:02:00.000+08:00|                                                   26.58|
|2024-02-01T08:03:00.000+08:00|                                                   26.97|
|2024-02-01T08:04:00.000+08:00|                                                   27.63|
+-----------------------------+--------------------------------------------------------+
Total line number = 5

possibly cause:

image

SeaTunnel Version

2.3.4

SeaTunnel Config

{
    "env" : {
        "execution.parallelism" : 1,
        "job.mode" : "BATCH"
    },
    "source" : [
        {
            "password" : "taosdata",
            "database" : "db",
            "lower_bound" : "2024-02-01 00:00:00",
            "stable" : "meters",
            "result_table_name" : "t_src",
            "upper_bound" : "2024-02-01 00:05:00",
            "plugin_name" : "TDengine",
            "url" : "jdbc:TAOS-RS://localhost:6041/db?timezone=Asia/Shanghai&user=root&password=taosdata",
            "username" : "root"
        }
    ],
   
    "sink" : [
        {
            "zone_id" : "Asia/Shanghai",
            "password" : "root",
            "batch_size" : 1024,
            "node_urls" : [
                "localhost:6667"
            ],
            "storage_group" : "root.default",
            "source_table_name" : "t_dest",
            "key_timestamp" : "ts",
            "plugin_name" : "Console",
            "key_device" : "device_name",
            "username" : "root",
            "batch_interval_ms" : 1000
        }
    ]
}

Running Command

bin/seatunel.sh --config a.conf -e local

Error Exception

no exception

Zeta or Flink or Spark Version

No response

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

alextinng avatar Feb 01 '24 10:02 alextinng