gianm commented on a change in pull request #10182:
URL: https://github.com/apache/druid/pull/10182#discussion_r454468609



##########
File path: docs/querying/sql.md
##########
@@ -885,6 +885,18 @@ Druid SQL supports setting connection parameters on the 
client. The parameters i
 All other context parameters you provide will be attached to Druid queries and 
can affect how they run. See
 [Query context](query-context.html) for details on the possible options.
 
+```java
+String url = 
"jdbc:avatica:remote:url=http://localhost:8082/druid/v2/sql/avatica/";;
+
+// Set any query context parameters you need here.
+Properties connectionProperties = new Properties();
+connectionProperties.setProperty("sqlTimeZone", "America/Los_Angeles");
+connectionProperties.setProperty("useCache", "false");
+
+try (Connection connection = DriverManager.getConnection(url, 
connectionProperties)) {
+  // do some SQL stuff

Review comment:
       Please make this more professional, like "Use the JDBC connection."

##########
File path: docs/querying/sql.md
##########
@@ -885,6 +885,18 @@ Druid SQL supports setting connection parameters on the 
client. The parameters i
 All other context parameters you provide will be attached to Druid queries and 
can affect how they run. See
 [Query context](query-context.html) for details on the possible options.
 
+```java
+String url = 
"jdbc:avatica:remote:url=http://localhost:8082/druid/v2/sql/avatica/";;
+
+// Set any query context parameters you need here.
+Properties connectionProperties = new Properties();
+connectionProperties.setProperty("sqlTimeZone", "America/Los_Angeles");
+connectionProperties.setProperty("useCache", "false");
+
+try (Connection connection = DriverManager.getConnection(url, 
connectionProperties)) {
+  // do some SQL stuff
+}
+```

Review comment:
       I think (but am not sure) that the renderer we use likes to have a blank 
line after a closing triple-tick.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to