Commit e2a85e6
feat: Add Notebook-scoped packages for command submits or notebook job run (#1321)
<!-- Please review our pull request review process in CONTRIBUTING.md
before your proceed. -->
Resolves #1320
<!---
Include the number of the issue addressed by this PR above if
applicable.
Example:
resolves #1234
Please review our pull request review process in CONTRIBUTING.md before
your proceed.
-->
### Description
Add feature to install packages in Notebook-scoped environment for
PythonCommandSubmitt and PythonNotebookUploader classes
#### Execution Test
I made the changes and tested it in our environment, looking that the
compiled code now have the prepended package installation
##### All purpose cluster
<img width="1240" height="740" alt="image"
src="https://github.com/user-attachments/assets/4c75aae2-6740-49b5-9e6e-d7676a6aac02"
/>
##### Serverless cluster
<img width="1228" height="716" alt="image"
src="https://github.com/user-attachments/assets/1d91cae9-6cdf-4836-a86f-18d6156c5f99"
/>
#### Job cluster
<img width="1241" height="353" alt="image"
src="https://github.com/user-attachments/assets/546480f2-ee4c-47de-87af-9cb6adf9f851"
/>
### Checklist
- [x] I have run this code in development and it appears to resolve the
stated issue
- [x] This PR includes tests, or tests are not required/relevant for
this PR
- [x] I have updated the `CHANGELOG.md` and added information about my
change to the "dbt-databricks next" section.
---------
Signed-off-by: Federico Manuel Gomez Peter <federico.gomez@payclip.com>
Co-authored-by: tejassp-db <241722411+tejassp-db@users.noreply.github.com>
Co-authored-by: Shubham Dhal <shubham.dhal@databricks.com>1 parent 54e8040 commit e2a85e6
File tree
9 files changed
+678
-17
lines changed- dbt/adapters/databricks/python_models
- docs
- tests
- functional/adapter/python_model
- unit/python
9 files changed
+678
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
3 | 7 | | |
4 | 8 | | |
5 | 9 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
27 | 35 | | |
28 | 36 | | |
29 | 37 | | |
| |||
42 | 50 | | |
43 | 51 | | |
44 | 52 | | |
| 53 | + | |
45 | 54 | | |
46 | 55 | | |
47 | 56 | | |
| |||
69 | 78 | | |
70 | 79 | | |
71 | 80 | | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
72 | 89 | | |
73 | 90 | | |
74 | 91 | | |
| |||
Lines changed: 81 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
13 | 16 | | |
14 | 17 | | |
15 | 18 | | |
| 19 | + | |
16 | 20 | | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
20 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
22 | 29 | | |
23 | 30 | | |
24 | 31 | | |
25 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
26 | 61 | | |
27 | 62 | | |
28 | 63 | | |
| |||
63 | 98 | | |
64 | 99 | | |
65 | 100 | | |
66 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
67 | 106 | | |
68 | 107 | | |
69 | 108 | | |
70 | 109 | | |
| 110 | + | |
71 | 111 | | |
72 | 112 | | |
73 | 113 | | |
74 | 114 | | |
75 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
76 | 119 | | |
77 | 120 | | |
78 | 121 | | |
| |||
252 | 295 | | |
253 | 296 | | |
254 | 297 | | |
| 298 | + | |
255 | 299 | | |
256 | | - | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
257 | 306 | | |
258 | 307 | | |
259 | 308 | | |
260 | | - | |
261 | | - | |
262 | | - | |
263 | | - | |
264 | | - | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
265 | 316 | | |
266 | 317 | | |
267 | 318 | | |
| |||
286 | 337 | | |
287 | 338 | | |
288 | 339 | | |
289 | | - | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
290 | 344 | | |
291 | 345 | | |
292 | 346 | | |
| |||
335 | 389 | | |
336 | 390 | | |
337 | 391 | | |
| 392 | + | |
338 | 393 | | |
339 | 394 | | |
340 | 395 | | |
341 | 396 | | |
342 | 397 | | |
| 398 | + | |
343 | 399 | | |
344 | 400 | | |
345 | 401 | | |
| |||
356 | 412 | | |
357 | 413 | | |
358 | 414 | | |
359 | | - | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
360 | 418 | | |
361 | 419 | | |
362 | 420 | | |
363 | 421 | | |
364 | 422 | | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
365 | 426 | | |
366 | 427 | | |
367 | 428 | | |
| |||
444 | 505 | | |
445 | 506 | | |
446 | 507 | | |
447 | | - | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
448 | 514 | | |
449 | 515 | | |
450 | 516 | | |
| |||
572 | 638 | | |
573 | 639 | | |
574 | 640 | | |
| 641 | + | |
575 | 642 | | |
576 | 643 | | |
577 | 644 | | |
| |||
581 | 648 | | |
582 | 649 | | |
583 | 650 | | |
| 651 | + | |
584 | 652 | | |
585 | 653 | | |
586 | 654 | | |
| |||
599 | 667 | | |
600 | 668 | | |
601 | 669 | | |
| 670 | + | |
602 | 671 | | |
603 | 672 | | |
604 | 673 | | |
| |||
611 | 680 | | |
612 | 681 | | |
613 | 682 | | |
| 683 | + | |
614 | 684 | | |
615 | 685 | | |
616 | 686 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
73 | 78 | | |
74 | 79 | | |
75 | 80 | | |
| |||
173 | 178 | | |
174 | 179 | | |
175 | 180 | | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
176 | 240 | | |
177 | 241 | | |
178 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
337 | 337 | | |
338 | 338 | | |
339 | 339 | | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
0 commit comments