Commit acad168
authored
query tags integration (#927)
## Description
This PR adds **Query Tags** support to the JDBC driver. Users can now
attach labels to their SQL queries for analytical purposes. Tags follow
the format `key1:value1,key2:value2"` and appear in the
`system.query.history` table.
### Changes Made:
- **Added `QUERY_TAGS`** to the list of allowed session configurations
in `DatabricksJdbcConstants.java`
### How to Use:
- URL: jdbc:databricks://host;QUERY_TAGS=team:marketing,dashboard:abc123
- Properties: properties.put("QUERY_TAGS",
"team:engineering,project:pipeline")
## Testing
- Tested manually by creating a connection with query tags passed as
connection property and verified that they're sent to the backend
successfully, and appear in the system.query.histroy table
## Additional Notes to the Reviewer
- Works with both Thrift and SEA modes
- Backward compatible - existing connections work unchanged
### Future Plans:
- **Statement-level tags** will be added later (currently session-level
only)
---------
Signed-off-by: Sreekanth Vadigi <sreekanth.vadigi@databricks.com>1 parent 7a137e1 commit acad168
3 files changed
Lines changed: 14 additions & 1 deletion
File tree
- src
- main/java/com/databricks/jdbc/common
- test/java/com/databricks/jdbc/api/impl
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
| 85 | + | |
85 | 86 | | |
86 | 87 | | |
87 | 88 | | |
| |||
Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
472 | 472 | | |
473 | 473 | | |
474 | 474 | | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
475 | 486 | | |
0 commit comments