och5351 commented on PR #193: URL: https://github.com/apache/flink-connector-jdbc/pull/193#issuecomment-4760534371
Hi @Dennis-Mircea! Thank you for reviewing the changes and checking the Jira ticket. I really appreciate you handling this so quickly! I noticed a couple of other things in this PR that are different from the fixes you made, and I'd like to request your help with them: > Both `docs/content/docs/connectors/datastream/jdbc.md` and `docs/content.zh/docs/connectors/datastream/jdbc.md` have the same issues. 1. Under the "JDBC execution options" section, the indentation of `.build();` in the first code block doesn't seem to match the one below. Could you align it with the code below? <img width="889" height="390" alt="image" src="https://github.com/user-attachments/assets/1c73d221-a12a-4b49-b890-801cd2bd7936" /> > https://nightlies.apache.org/flink/flink-docs-release-2.2/docs/connectors/datastream/jdbc/#jdbc-execution-options 2. Under the "JdbcSink.exactlyOnceSink" section, could you update the `env.fromElements` part to match the code shown below? ```java StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment(); env.fromElements(...) .addSink( JdbcSink.exactlyOnceSink( "insert into books (id, title, author, price, qty) values (?,?,?,?,?)", (ps, t) -> { ps.setInt(1, t.id); ps.setString(2, t.title); ps.setString(3, t.author); ps.setDouble(4, t.price); ps.setInt(5, t.qty); }, JdbcExecutionOptions.builder().withMaxRetries(0).build(), JdbcExactlyOnceOptions.defaults(), () -> { // create a driver-specific XA DataSource // The following example is for derby EmbeddedXADataSource ds = new EmbeddedXADataSource(); ds.setDatabaseName("my_db"); return ds; })); env.execute(); ``` 3. Once you've finished the changes, could you squash the commits and make sure the commit message matches the PR title, then request a review again? Please don't hesitate to point out anything I may have missed or gotten wrong. I'd really appreciate it! cc. @RocMarshal @ocb3916 Thank you! -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
