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

new fields in the schema (added to the postgres schema) begin to be recognized only after failed and restarting the clickhouse-sink-connector #904

Open
salisbury-espinosa opened this issue Nov 4, 2024 · 0 comments

Comments

@salisbury-espinosa
Copy link
Contributor

salisbury-espinosa commented Nov 4, 2024

so we have to stop the clickhouse-sink-connector with an error and start clickhouse-sink-connector.
"hot reload" is not available and causes an error during runtime

sink  | java.sql.SQLException: Missing value for parameter #74 [test2 String]
sink  | 	at com.clickhouse.jdbc.SqlExceptionUtils.clientError(SqlExceptionUtils.java:73) ~[clickhouse-kafka-sink-connector-0.0.9.jar:?]
sink  | 	at com.clickhouse.jdbc.internal.InputBasedPreparedStatement.addBatch(InputBasedPreparedStatement.java:333) ~[clickhouse-kafka-sink-connector-0.0.9.jar:?]

"just stop clickhouse-sink-connector, upgrade schema, and start clickhouse-sink-connector" - doesn't work.
it only works with an error - maybe something is being cached or there is some kind of race condition

Example upgrade schema in postgresql:

ALTER TABLE test ADD COLUMN test2 character varying(50) NOT NULL DEFAULT 'yiii';

pay attention to NOT NULL

at the same time, the schema in the clickhouse itself is updated and a new column appears !

@salisbury-espinosa salisbury-espinosa changed the title new fields in the schema (added to the postgres schema) begin to be recognized only after restarting the clickhouse-sink-connector new fields in the schema (added to the postgres schema) begin to be recognized only after failed and restarting the clickhouse-sink-connector Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant