Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ public final class DatabricksJdbcConstants {
public static final String DEFAULT_HTTP_EXCEPTION_SQLSTATE = "08000";
public static final int TEMPORARY_REDIRECT_STATUS_CODE = 307;
public static final String REDACTED_TOKEN = "****";
public static final String QUERY_TAGS = "query_tags";
public static final int MAX_DEFAULT_STRING_COLUMN_LENGTH = 32767;
public static final int DEFUALT_STRING_COLUMN_LENGTH = 255;
public static final int DEFAULT_MAX_CONCURRENT_PRESIGNED_REQUESTS = 50;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ public class DriverConnectionParameters {
@JsonProperty("async_poll_interval_millis")
int asyncPollIntervalMillis;

@JsonProperty("query_tags")
String queryTags;

public DriverConnectionParameters setHttpPath(String httpPath) {
this.httpPath = httpPath;
return this;
Expand Down Expand Up @@ -356,6 +359,11 @@ public DriverConnectionParameters setAsyncPollIntervalMillis(int asyncPollInterv
return this;
}

public DriverConnectionParameters setQueryTags(String queryTags) {
this.queryTags = queryTags;
return this;
}

@Override
public String toString() {
return new ToStringer(DriverConnectionParameters.class)
Expand Down Expand Up @@ -402,6 +410,7 @@ public String toString() {
.add("useSystemTrustStore", useSystemTrustStore)
.add("rowsFetchedPerBlock", rowsFetchedPerBlock)
.add("asyncPollIntervalMillis", asyncPollIntervalMillis)
.add("queryTags", queryTags)
.toString();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.databricks.jdbc.telemetry;

import static com.databricks.jdbc.common.DatabricksJdbcConstants.QUERY_TAGS;
import static com.databricks.jdbc.common.util.WildcardUtil.isNullOrEmpty;

import com.databricks.jdbc.api.internal.IDatabricksConnectionContext;
Expand Down Expand Up @@ -218,7 +219,8 @@ private static DriverConnectionParameters buildDriverConnectionParameters(
.setRowsFetchedPerBlock(connectionContext.getRowsFetchedPerBlock())
.setAsyncPollIntervalMillis(connectionContext.getAsyncExecPollInterval())
.setEnableTokenCache(connectionContext.isTokenCacheEnabled())
.setHttpPath(connectionContext.getHttpPath());
.setHttpPath(connectionContext.getHttpPath())
.setQueryTags(connectionContext.getSessionConfigs().get(QUERY_TAGS));
if (connectionContext.useJWTAssertion()) {
connectionParameters
.setEnableJwtAssertion(true)
Expand Down
Loading