Commit 2532cb2
feat: prepend breadcrumb comment to all SQL queries (DX-117497) (#9)
## Summary
- All SQL submitted through `dremio-cli` now carries a leading
breadcrumb comment: `/* dremio-cli: submitter=cli */ <user SQL>`
- Enables backend query attribution — the Jobs service can detect
CLI-originated queries, consistent with how `dremio-mcp` uses `/*
dremioai: submitter=agent */`
- Applied in the single `submit_sql()` method in `client.py`, so every
command that runs SQL (query, job, schema, folder, reflection) gets it
automatically
## Test plan
- [x] 2 new tests in `test_client.py` verify breadcrumb is prepended
(with and without context)
- [x] Full test suite passes (140/140)
- [ ] Manual: run `dremio query run "SELECT 1"` against Dremio Cloud and
verify the breadcrumb appears in the job's SQL via
`sys.project.history.jobs`
JIRA: [DX-117497](https://dremio.atlassian.net/browse/DX-117497)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
[DX-117497]:
https://dremio.atlassian.net/browse/DX-117497?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 85f20fa commit 2532cb2
2 files changed
Lines changed: 40 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
167 | | - | |
| 167 | + | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
100 | 101 | | |
101 | 102 | | |
102 | 103 | | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
0 commit comments