Skip to content

[Bug] [flink Jdbc Source] field parsing error when there is a Complex SQL #1779

Closed
@gleiyu

Description

Search before asking

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

What happened

flink jdbc source can't support sql like select t.* from tableName t or multiple table join,the regex can't work with complex sql,and the function extendPartitionQuerySql in JdbcSource just support a single table query.

SeaTunnel Version

2.1.1
dev

SeaTunnel Config

{
  "env" : {
    "execution.parallelism" : 1
  },
  "source" : [
    {
      "password" : "",
      "driver" : "com.mysql.jdbc.Driver",
      "query" : "select t.* from test_table t",
      "plugin_name" : "JdbcSource",
      "url" : "jdbc:mysql://127.0.0.1:3306/db?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai",
      "username" : "root"
    }
  ],
  "transform" : [],
  "sink" : [
    {
      "plugin_name" : "ConsoleSink"
    }
  ]
}

Running Command

running with LocalFlinkExample demo

Error Exception

image

Flink or Spark Version

flink 1.13.0

Java or Scala Version

jdk 1.8

Screenshots

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions