Breeze0806 / go-etl

go-etl is a toolset for data extraction, transformation and loading。(go-etl是一个集数据源抽取,转化,加载的工具集,提供强大的数据同步能力)
Apache License 2.0
118 stars 38 forks source link

fail: sql: expected 0 arguments, got 2 #36

Closed lxiangv closed 3 months ago

lxiangv commented 4 months ago

config.json

when I use this config file expecting to query data which id is between 1 and 9, it runs fail as the pic below

image

Shane-XB-Qian commented 4 months ago

the log seems was incomplete, the err looks was the query failed.

Breeze0806 commented 3 months ago

The issue arises when trying to split a table into one part. In this case, the job.setting has not been set, and therefore the number of tables to split into is set to 1.

Shane-XB-Qian commented 3 months ago

that he/she pasted log was confused: expected 0 arguments, got 2, um... my first feeling was: it was set to split 1~9, but actually there was nothing can be done for split? so maybe if there had where clause would help?

Breeze0806 commented 3 months ago

Haha, this is actually an issue caused by a misjudgment. Originally, my intention was that this judgment would speed up the program processing, but unfortunately, it resulted in this issue .

At 2024-05-13 22:41:02, "Shane-XB-Qian" @.***> wrote:

that he/she pasted log was confused: expected 0 arguments, got 2, um... my first feeling was: it was set to split 1~9, but actually there was nothing can be done for split? so maybe if there had where clause would help?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

Breeze0806 commented 3 months ago

@lxiangv Thank you for your feedback, now you can try again.

Breeze0806 commented 3 months ago

that he/she pasted log was confused: expected 0 arguments, got 2, um... my first feeling was: it was set to split 1~9, but actually there was nothing can be done for split? so maybe if there had where clause would help?

Yes,originally, when the table partition count was set to 1, we were in fact passing values for left and right to this SQL, but there was no need for parameter passing in the SQL itself, which led to this issue.