This is an automated email from the ASF dual-hosted git repository.
abhishek pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/master by this push:
new b102667695c [Docs] Add example connection parameters for Java APIs
(#15345)
b102667695c is described below
commit b102667695c04c39e62ccd44f6c7c5d952a3c975
Author: Petrichor <[email protected]>
AuthorDate: Tue Nov 28 17:39:41 2023 +0800
[Docs] Add example connection parameters for Java APIs (#15345)
---
docs/api-reference/sql-jdbc.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/docs/api-reference/sql-jdbc.md b/docs/api-reference/sql-jdbc.md
index 2963713e709..0d8d85c5db6 100644
--- a/docs/api-reference/sql-jdbc.md
+++ b/docs/api-reference/sql-jdbc.md
@@ -68,6 +68,10 @@ String url =
"jdbc:avatica:remote:url=http://localhost:8888/druid/v2/sql/avatica
// Any property from
https://druid.apache.org/docs/latest/querying/sql-query-context.html can go
here.
Properties connectionProperties = new Properties();
connectionProperties.setProperty("sqlTimeZone", "Etc/UTC");
+//To connect to a Druid deployment protected by basic authentication,
+//you can incorporate authentication details from
https://druid.apache.org/docs/latest/operations/security-overview
+connectionProperties.setProperty("user", "admin");
+connectionProperties.setProperty("password", "password1");
try (Connection connection = DriverManager.getConnection(url,
connectionProperties)) {
try (
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]