Skip to content

[Bug] [connector-jdbc] DM compatible data type NVARCHAR2 #10635

@loevingerx

Description

@loevingerx

Search before asking

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

What happened

When synchronizing multi-table data from Dameng Database to MySQL Database via the JDBC connector, the Source does not support NVARCHAR2 type mapping.

The task configuration is as follows:

{
  "env": {
    "parallelism": 1,
    "job.mode": "BATCH"
  },
  "source": [
    {
      "plugin_name": "Jdbc",
      "plugin_input": "source",
      "driver": "dm.jdbc.driver.DmDriver",
      "url": "jdbc:dm://1127.0.0.1:5236/sfsjzt",
      "user": "SYSDBA",
      "password": "SYSDBA001",
      "table_list": [
        {
          "table_path": "sfsjzt.test_nvarchar2"
        }
      ],
      "connection_check_timeout_sec": 100
    }
  ],
  "sink": [
    {
      "plugin_name": "Jdbc",
      "plugin_input": "sink",
      "url": "jdbc:mysql://127.0.0.1:3306/test?useSSL=false&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true", 
      "driver": "com.mysql.cj.jdbc.Driver",
      "user": "root",
      "password": "testing", 
      "generate_sink_sql": true,
      "database": "test",
      "table": "${table_name}",
      "data_save_mode": "append_data",
      "schema_save_mode": "CREATE_SCHEMA_WHEN_NOT_EXIST",
      "connection_check_timeout_sec": 100,
      "batch_size": 1000
    }
  ]
}

SeaTunnel Version

apache-seatunnel-2.3.8

SeaTunnel Config

Standalone testing environment

Running Command

../bin/seatunnel.sh --config dm_all_table_collect.json -m local

Error Exception

The error message is as follows
Caused by: org.apache.seatunnel.common.exception.SeaTunnelRuntimeException: ErrorCode:[COMMON-21], ErrorDescription:['Dameng' tables unsupported get catalog table,the corresponding field types in the following tables are not supported: '{"test.test_nvarchar2":{"id":"nvarchar2","name":"nvarchar2","age":"nvarchar2"}}'

Zeta or Flink or Spark Version

2.3.8

Java or Scala Version

jdk1.8

Screenshots

Image

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Doing

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions