Skip to content

Commit

Permalink
[Docs] Add example connection parameters for Java APIs (apache#15345)
Browse files Browse the repository at this point in the history
  • Loading branch information
vinlee19 committed Nov 28, 2023
1 parent 7a8204d commit b102667
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/api-reference/sql-jdbc.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ String url = "jdbc:avatica:remote:url=https://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 (
Expand Down

0 comments on commit b102667

Please sign in to comment.