@@ -82,24 +82,25 @@ func (c *Config) DeepCopy() *Config {
8282
8383// UserConfig is the set of configurations exposed to users
8484type UserConfig struct {
85- Protocol string
86- Host string // from databricks UI
87- Port int // from databricks UI
88- HTTPPath string // from databricks UI
89- Catalog string
90- Schema string
91- Authenticator auth.Authenticator
92- AccessToken string // from databricks UI
93- MaxRows int // max rows per page
94- QueryTimeout time.Duration // Timeout passed to server for query processing
95- UserAgentEntry string
96- Location * time.Location
97- SessionParams map [string ]string
98- RetryWaitMin time.Duration
99- RetryWaitMax time.Duration
100- RetryMax int
101- Transport http.RoundTripper
102- UseLz4Compression bool
85+ Protocol string
86+ Host string // from databricks UI
87+ Port int // from databricks UI
88+ HTTPPath string // from databricks UI
89+ Catalog string
90+ Schema string
91+ Authenticator auth.Authenticator
92+ AccessToken string // from databricks UI
93+ MaxRows int // max rows per page
94+ QueryTimeout time.Duration // Timeout passed to server for query processing
95+ UserAgentEntry string
96+ Location * time.Location
97+ SessionParams map [string ]string
98+ RetryWaitMin time.Duration
99+ RetryWaitMax time.Duration
100+ RetryMax int
101+ Transport http.RoundTripper
102+ UseLz4Compression bool
103+ EnableMetricViewMetadata bool
103104 CloudFetchConfig
104105}
105106
@@ -123,25 +124,26 @@ func (ucfg UserConfig) DeepCopy() UserConfig {
123124 }
124125
125126 return UserConfig {
126- Protocol : ucfg .Protocol ,
127- Host : ucfg .Host ,
128- Port : ucfg .Port ,
129- HTTPPath : ucfg .HTTPPath ,
130- Catalog : ucfg .Catalog ,
131- Schema : ucfg .Schema ,
132- Authenticator : ucfg .Authenticator ,
133- AccessToken : ucfg .AccessToken ,
134- MaxRows : ucfg .MaxRows ,
135- QueryTimeout : ucfg .QueryTimeout ,
136- UserAgentEntry : ucfg .UserAgentEntry ,
137- Location : loccp ,
138- SessionParams : sessionParams ,
139- RetryWaitMin : ucfg .RetryWaitMin ,
140- RetryWaitMax : ucfg .RetryWaitMax ,
141- RetryMax : ucfg .RetryMax ,
142- Transport : ucfg .Transport ,
143- UseLz4Compression : ucfg .UseLz4Compression ,
144- CloudFetchConfig : ucfg .CloudFetchConfig ,
127+ Protocol : ucfg .Protocol ,
128+ Host : ucfg .Host ,
129+ Port : ucfg .Port ,
130+ HTTPPath : ucfg .HTTPPath ,
131+ Catalog : ucfg .Catalog ,
132+ Schema : ucfg .Schema ,
133+ Authenticator : ucfg .Authenticator ,
134+ AccessToken : ucfg .AccessToken ,
135+ MaxRows : ucfg .MaxRows ,
136+ QueryTimeout : ucfg .QueryTimeout ,
137+ UserAgentEntry : ucfg .UserAgentEntry ,
138+ Location : loccp ,
139+ SessionParams : sessionParams ,
140+ RetryWaitMin : ucfg .RetryWaitMin ,
141+ RetryWaitMax : ucfg .RetryWaitMax ,
142+ RetryMax : ucfg .RetryMax ,
143+ Transport : ucfg .Transport ,
144+ UseLz4Compression : ucfg .UseLz4Compression ,
145+ EnableMetricViewMetadata : ucfg .EnableMetricViewMetadata ,
146+ CloudFetchConfig : ucfg .CloudFetchConfig ,
145147 }
146148}
147149
@@ -272,6 +274,14 @@ func ParseDSN(dsn string) (UserConfig, error) {
272274 ucfg .MaxDownloadThreads = numThreads
273275 }
274276
277+ // Metric View Metadata parameter
278+ if enableMetricViewMetadata , ok , err := params .extractAsBool ("enableMetricViewMetadata" ); ok {
279+ if err != nil {
280+ return UserConfig {}, err
281+ }
282+ ucfg .EnableMetricViewMetadata = enableMetricViewMetadata
283+ }
284+
275285 // for timezone we do a case insensitive key match.
276286 // We use getNoCase because we want to leave timezone in the params so that it will also
277287 // be used as a session param.
0 commit comments