You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "ZZY1-OSS (via GitHub)" <gi...@apache.org> on 2026/04/16 01:05:57 UTC
[I] [Bug] [Module Name] Bug title No value specified for parameter 1 [seatunnel]
ZZY1-OSS opened a new issue, #10771:
URL: https://github.com/apache/seatunnel/issues/10771
### Search before asking
- [x] I had searched in the [issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues.
### What happened
query = "SELECT * FROM tc_zhsq.t_mdjf_sjgz WHERE dispute_time > ?" 参数传不进去
### SeaTunnel Version
2.3.13
### SeaTunnel Config
```conf
env {
job.mode = "BATCH"
parallelism = 2
}
source {
jdbc {
driver = "com.kingbase8.Driver"
url = "jdbc:kingbase8://***.***.***.***:54321/***"
username = "***"
password = "***"
query = "SELECT * FROM tc_zhsq.t_mdjf_sjgz WHERE dispute_time > ?"
checkpoint.enable = true
checkpoint.column = "dispute_time"
checkpoint.table = "public.dm_project"
checkpoint.key = "2043968658605527041"
checkpoint.key.column = "id"
checkpoint.value.column = "data_last_time"
checkpoint.data.source {
driver = "org.postgresql.Driver"
url = "jdbc:postgresql://***.***.***.***:5432/***"
username = "***"
password = "***"
}
}
}
sink {
jdbc {
driver = "com.mysql.cj.jdbc.Driver"
url = "jdbc:mysql://***.***.***.***:9030/***"
username = "***"
password = "***"
database = "***"
table = "test888"
generate_sink_sql = true
}
}
```
### Running Command
```shell
env {
job.mode = "BATCH"
parallelism = 2
}
source {
jdbc {
driver = "com.kingbase8.Driver"
url = "jdbc:kingbase8://***.***.***.***:54321/***"
username = "***"
password = "***"
query = "SELECT * FROM tc_zhsq.t_mdjf_sjgz WHERE dispute_time > ?"
checkpoint.enable = true
checkpoint.column = "dispute_time"
checkpoint.table = "public.dm_project"
checkpoint.key = "2043968658605527041"
checkpoint.key.column = "id"
checkpoint.value.column = "data_last_time"
checkpoint.data.source {
driver = "org.postgresql.Driver"
url = "jdbc:postgresql://***.***.***.***:5432/***"
username = "***"
password = "***"
}
}
}
sink {
jdbc {
driver = "com.mysql.cj.jdbc.Driver"
url = "jdbc:mysql://***.***.***.***:9030/***"
username = "***"
password = "***"
database = "***"
table = "test888"
generate_sink_sql = true
}
}
```
### Error Exception
```log
No value specified for parameter 1
```
### Zeta or Flink or Spark Version
zeta2.3.13
### Java or Scala Version
_No response_
### Screenshots
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
### Code of Conduct
- [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Module Name] Bug title No value specified for parameter 1 [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10771:
URL: https://github.com/apache/seatunnel/issues/10771#issuecomment-4256869021
Thanks for the report. I checked the current JDBC source docs and code path. This is not a supported way to use `query` parameters today.
`query` is treated as plain SQL text, not as a user-parameterized prepared statement template. In the current source path, SeaTunnel only adds its own internal `?` placeholders when it builds split queries around the partition/split column; it does not bind your custom `?` from `query`. That is why the database returns `No value specified for parameter 1`.
I also do not see this `checkpoint.*` parameter set in the current JDBC source options, so it will not automatically drive the placeholder in `query`.
For the current JDBC source, please try one of these instead:
1. do not put a bare `?` in `query`
2. if you only need a filtered batch read, generate the final SQL with a concrete value before submitting the job
3. if you need resumable incremental capture based on database changes, use a CDC connector where available instead of expecting JDBC source to persist and bind this checkpoint value automatically
This also suggests the JDBC docs could be clearer that custom query placeholders are not supported in source `query`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Module Name] Bug title No value specified for parameter 1 [seatunnel]
Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #10771:
URL: https://github.com/apache/seatunnel/issues/10771#issuecomment-4257429945
For this case, no, the current JDBC source does not have a mechanism to update an external checkpoint table from the literal value inside `query`.
If you write:
```sql
SELECT * FROM tc_zhsq.t_mdjf_sjgz WHERE dispute_time > '2026-04-16'
```
SeaTunnel will only execute that SQL as a fixed query. It will not parse `'2026-04-16'` as checkpoint state, bind it back into the next run, or update `public.dm_project` after the job succeeds.
The key point is that the `checkpoint.*` options in your config are not current JDBC source options, so they will not drive the query or persist an offset.
For now, the practical choices are:
1. generate the final SQL before submitting the job, using your own external scheduler / script to read and update the offset table
2. use a fixed `query` or `where_condition` only when the filter value is already known before submission
3. use a CDC connector instead if you need continuous incremental capture with managed offsets
If SeaTunnel needs to support "JDBC source external offset / checkpoint table" directly, that should be tracked as an enhancement rather than treated as the current `query` behavior. It would need a small design for option names, when the offset is updated, failure / retry semantics, and type conversion. It should not be implemented as simple placeholder replacement, otherwise failed jobs could advance the offset incorrectly.
Also, as SeaTunnel is a global project, please keep follow-up issue content in English where possible. Thanks.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Module Name] Bug title No value specified for parameter 1 [seatunnel]
Posted by "nielifeng (via GitHub)" <gi...@apache.org>.
nielifeng closed issue #10771: [Bug] [Module Name] Bug title No value specified for parameter 1
URL: https://github.com/apache/seatunnel/issues/10771
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Module Name] Bug title No value specified for parameter 1 [seatunnel]
Posted by "ZZY1-OSS (via GitHub)" <gi...@apache.org>.
ZZY1-OSS commented on issue #10771:
URL: https://github.com/apache/seatunnel/issues/10771#issuecomment-4257003237
那比如说SELECT * FROM tc_zhsq.t_mdjf_sjgz WHERE dispute_time > ‘2026-04-16’ 有办法去更新2026-04-16到我的checkpoint的点位表吗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [Module Name] Bug title No value specified for parameter 1 [seatunnel]
Posted by "ZZY1-OSS (via GitHub)" <gi...@apache.org>.
ZZY1-OSS commented on issue #10771:
URL: https://github.com/apache/seatunnel/issues/10771#issuecomment-4256672768
是不能这样写吗
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org