Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] [JDBC] use mysql source extract starrocks split function has issue #7293

Closed
3 tasks done
liunaijie opened this issue Aug 1, 2024 · 0 comments · Fixed by #7294
Closed
3 tasks done

[Bug] [JDBC] use mysql source extract starrocks split function has issue #7293

liunaijie opened this issue Aug 1, 2024 · 0 comments · Fixed by #7294
Labels

Comments

@liunaijie
Copy link
Member

Search before asking

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

What happened

I try to use jbdc(mysql) to extract data from starrocks. it's a big query, if run the query directly, will get timeout over 300s exception. it's throw by starrocks.

so i want split the query to multiple small query. i add partition_column parameter. but i find the jdbc default split logical add this query filter
abs(md5(<partition_column>)) % <partition_num> = ?
the finial query would be

select * from ( user defined query ) split where abs(md5(<partition_column>)) % <partition_num> = ?

in mysql the result of md5 % <partition_num> is a number, so it can work.

but in starrocks, it can't work. we need use md5sum_numeric function.

SeaTunnel Version

2.3.5

SeaTunnel Config

{

            "password" : "",

            "driver" : "com.mysql.cj.jdbc.Driver",

            "query" : "xxxxxx",

            "connection_check_timeout_sec" : 100,

            "fetch_size" : 10000,

            "partition_column" : "data_day", -- string type

            "result_table_name" : "",

            "plugin_name" : "Jdbc",

            "user" : "xxx",

            "url" : "jdbc:mysql://xxx"

        }

Running Command

rest api to submit job

Error Exception

no exception, and no data readed

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant