chamikaramj commented on code in PR #37611:
URL: https://github.com/apache/beam/pull/37611#discussion_r2818538166
##########
sdks/java/io/clickhouse/src/main/java/org/apache/beam/sdk/io/clickhouse/ClickHouseIO.java:
##########
@@ -130,9 +145,57 @@ public class ClickHouseIO {
public static final Duration DEFAULT_MAX_CUMULATIVE_BACKOFF =
Duration.standardDays(1000);
public static final Duration DEFAULT_INITIAL_BACKOFF =
Duration.standardSeconds(5);
+ /**
+ * Creates a write transform using a JDBC URL format.
+ *
+ * <p><b>Deprecated:</b> Use {@link #write(String, String, String)} instead
with separate URL,
+ * database, and table parameters.
+ *
+ * <p>This method is provided for backward compatibility. It parses the JDBC
URL to extract the
+ * connection URL, database name, and any connection properties specified in
the query string.
+ * Properties can be overridden later using {@link
Write#withProperties(Properties)}.
+ *
+ * <p>Example:
+ *
+ * <pre>{@code
+ * // Old way (deprecated):
+ *
ClickHouseIO.write("jdbc:clickhouse://localhost:8123/mydb?user=admin&password=secret",
"table")
+ *
+ * // New way:
+ * ClickHouseIO.write("http://localhost:8123", "mydb", "table")
+ * .withProperties(props)
+ * }</pre>
+ *
+ * <p><b>Property Precedence:</b> Properties from the JDBC URL can be
overridden by calling {@link
Review Comment:
Sg.
--
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]