forked from databricks/databricks-sql-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDriverSystemConfiguration.py
More file actions
37 lines (32 loc) · 920 Bytes
/
DriverSystemConfiguration.py
File metadata and controls
37 lines (32 loc) · 920 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import json
from dataclasses import dataclass, asdict
from databricks.sql import __version__
@dataclass
class DriverSystemConfiguration:
driver_version: str
os_name: str
os_version: str
os_arch: str
runtime_name: str
runtime_version: str
runtime_vendor: str
client_app_name: str
locale_name: str
driver_name: str
char_set_encoding: str
def to_json(self):
return json.dumps(asdict(self))
# Part of TelemetryEvent
# DriverSystemConfiguration systemConfig = new DriverSystemConfiguration(
# driver_version = "2.9.3",
# os_name = "Darwin",
# os_version = "24.4.0",
# os_arch = "arm64",
# runtime_name = "CPython",
# runtime_version = "3.13.3",
# runtime_vendor = "cpython",
# client_app_name = "databricks-sql-python",
# locale_name = "en_US",
# driver_name = "databricks-sql-python",
# char_set_encoding = "UTF-8"
# )