mirror of https://github.com/apache/druid.git
[Docs] Add example connection parameters for Java APIs (#15345)
This commit is contained in:
parent
7a8204db72
commit
b102667695
|
@ -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 (
|
||||
|
|
Loading…
Reference in New Issue