Commit c4d3718
committed
fix(snowflake): correct SQL generation, transport, and param conventions
Address defects found by validation against the Snowflake SQL API v2 and
SQL reference docs.
SQL generation:
- lift PARSE_JSON out of the VALUES clause into a projecting SELECT; the
previous form is rejected for any object or array value
- escape backslashes as well as quotes in string literals, closing a COPY
option injection through the user-or-llm stagePath and pattern fields
- reject "--" in stage paths, which commented out every following clause
- emit COPY INTO clauses in the documented positional order
- exclude only view types in introspect_schema so temporary, external, and
event tables are visible
- use plain equality in MERGE and reject null or duplicate match keys
- bound rows and bound-value bytes for every statement, measured in UTF-8
- reject qualified task names, which TASK_HISTORY silently ignores
- replace a raw NUL byte in the source with its escape sequence
Transport:
- read DML stats from the documented top-level ResultSet property
- drop Link-header and 391908 paging, which belong to the retired API, and
report partition completeness as unknown rather than falsely complete
- require a 2xx status before trusting a success SQLSTATE
- cap response bodies and fail closed on invalid session context names
Conventions:
- inline shared params into each tool instead of cross-file spreads, which
also lets the docs generator emit host and apiKey
- use the official Snowflake brand mark on a white tile1 parent 22fde60 commit c4d3718
33 files changed
Lines changed: 2020 additions & 376 deletions
File tree
- apps
- docs
- components
- content/docs/en/integrations
- sim
- blocks/blocks
- components
- lib/integrations
- tools
- generated
- snowflake
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8555 | 8555 | | |
8556 | 8556 | | |
8557 | 8557 | | |
8558 | | - | |
| 8558 | + | |
8559 | 8559 | | |
8560 | 8560 | | |
8561 | | - | |
| 8561 | + | |
| 8562 | + | |
8562 | 8563 | | |
8563 | 8564 | | |
8564 | 8565 | | |
| |||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
| 51 | + | |
52 | 52 | | |
53 | | - | |
54 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
55 | 61 | | |
56 | | - | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
57 | 66 | | |
58 | 67 | | |
59 | 68 | | |
| |||
80 | 89 | | |
81 | 90 | | |
82 | 91 | | |
83 | | - | |
| 92 | + | |
84 | 93 | | |
85 | 94 | | |
86 | 95 | | |
| |||
105 | 114 | | |
106 | 115 | | |
107 | 116 | | |
108 | | - | |
| 117 | + | |
109 | 118 | | |
110 | 119 | | |
111 | 120 | | |
| |||
157 | 166 | | |
158 | 167 | | |
159 | 168 | | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
160 | 177 | | |
161 | 178 | | |
162 | 179 | | |
| |||
208 | 225 | | |
209 | 226 | | |
210 | 227 | | |
211 | | - | |
| 228 | + | |
212 | 229 | | |
213 | 230 | | |
214 | 231 | | |
| |||
240 | 257 | | |
241 | 258 | | |
242 | 259 | | |
243 | | - | |
| 260 | + | |
244 | 261 | | |
245 | | - | |
| 262 | + | |
246 | 263 | | |
247 | 264 | | |
248 | 265 | | |
249 | 266 | | |
250 | 267 | | |
251 | | - | |
| 268 | + | |
252 | 269 | | |
253 | 270 | | |
254 | 271 | | |
| |||
275 | 292 | | |
276 | 293 | | |
277 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
278 | 301 | | |
279 | 302 | | |
280 | 303 | | |
| |||
356 | 379 | | |
357 | 380 | | |
358 | 381 | | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
359 | 388 | | |
360 | 389 | | |
361 | 390 | | |
362 | 391 | | |
363 | 392 | | |
364 | | - | |
| 393 | + | |
365 | 394 | | |
366 | 395 | | |
367 | 396 | | |
| |||
415 | 444 | | |
416 | 445 | | |
417 | 446 | | |
418 | | - | |
| 447 | + | |
419 | 448 | | |
420 | 449 | | |
421 | 450 | | |
| |||
468 | 497 | | |
469 | 498 | | |
470 | 499 | | |
471 | | - | |
| 500 | + | |
472 | 501 | | |
473 | 502 | | |
474 | 503 | | |
475 | 504 | | |
476 | 505 | | |
477 | 506 | | |
478 | 507 | | |
479 | | - | |
| 508 | + | |
480 | 509 | | |
481 | 510 | | |
482 | 511 | | |
483 | 512 | | |
484 | 513 | | |
485 | 514 | | |
486 | 515 | | |
487 | | - | |
| 516 | + | |
488 | 517 | | |
489 | 518 | | |
490 | 519 | | |
| |||
494 | 523 | | |
495 | 524 | | |
496 | 525 | | |
497 | | - | |
| 526 | + | |
498 | 527 | | |
499 | 528 | | |
500 | 529 | | |
| |||
544 | 573 | | |
545 | 574 | | |
546 | 575 | | |
547 | | - | |
| 576 | + | |
548 | 577 | | |
549 | 578 | | |
550 | 579 | | |
551 | 580 | | |
552 | 581 | | |
553 | | - | |
| 582 | + | |
554 | 583 | | |
555 | 584 | | |
556 | 585 | | |
| |||
560 | 589 | | |
561 | 590 | | |
562 | 591 | | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
563 | 596 | | |
564 | 597 | | |
565 | 598 | | |
| |||
573 | 606 | | |
574 | 607 | | |
575 | 608 | | |
576 | | - | |
| 609 | + | |
| 610 | + | |
577 | 611 | | |
578 | 612 | | |
579 | 613 | | |
| |||
604 | 638 | | |
605 | 639 | | |
606 | 640 | | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
607 | 646 | | |
608 | 647 | | |
609 | 648 | | |
610 | | - | |
611 | | - | |
612 | | - | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
613 | 664 | | |
614 | 665 | | |
615 | 666 | | |
| |||
620 | 671 | | |
621 | 672 | | |
622 | 673 | | |
623 | | - | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
624 | 679 | | |
625 | 680 | | |
626 | | - | |
627 | | - | |
628 | | - | |
629 | | - | |
630 | | - | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
631 | 695 | | |
632 | 696 | | |
633 | 697 | | |
| |||
645 | 709 | | |
646 | 710 | | |
647 | 711 | | |
648 | | - | |
| 712 | + | |
649 | 713 | | |
650 | 714 | | |
651 | 715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8555 | 8555 | | |
8556 | 8556 | | |
8557 | 8557 | | |
8558 | | - | |
| 8558 | + | |
8559 | 8559 | | |
8560 | 8560 | | |
8561 | | - | |
| 8561 | + | |
| 8562 | + | |
8562 | 8563 | | |
8563 | 8564 | | |
8564 | 8565 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18157 | 18157 | | |
18158 | 18158 | | |
18159 | 18159 | | |
18160 | | - | |
| 18160 | + | |
18161 | 18161 | | |
18162 | 18162 | | |
18163 | 18163 | | |
| |||
18187 | 18187 | | |
18188 | 18188 | | |
18189 | 18189 | | |
18190 | | - | |
| 18190 | + | |
18191 | 18191 | | |
18192 | 18192 | | |
18193 | 18193 | | |
| |||
18230 | 18230 | | |
18231 | 18231 | | |
18232 | 18232 | | |
18233 | | - | |
18234 | | - | |
| 18233 | + | |
| 18234 | + | |
18235 | 18235 | | |
18236 | 18236 | | |
18237 | 18237 | | |
| |||
0 commit comments