Commit 3096de8
feat(integrations): add Snowflake PAT integration (#6407)
* feat(integrations): add Snowflake PAT integration
* fix(snowflake): scope block params by operation
* refactor(integrations): simplify Snowflake safeguards
* refactor(snowflake): isolate statement capabilities
* fix(snowflake): localize required user agent
* chore(snowflake): limit changes to integration scope
* 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 tile
* fix(snowflake): emit task history time bounds as literals
TASK_HISTORY only accepts bind variables for RESULT_LIMIT and TASK_NAME per
BCR-1410, and that change explicitly excludes a bind passed through another
function first. A bind in SCHEDULED_TIME_RANGE_START/END is therefore dropped
without an error, so the requested window became a no-op and the function fell
back to returning the most recent runs. Emit validated literals instead, which
also restores Snowflake's seven-day range error.
Also reject a fractional skip-file percentage at the block boundary rather than
in the builder, and correct the cancel description: a cancelled child marks the
task graph run failed, so downstream tasks are skipped rather than continuing.
---------
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Waleed Latif <walif6@gmail.com>1 parent 5620017 commit 3096de8
40 files changed
Lines changed: 6532 additions & 7 deletions
File tree
- apps
- docs
- components
- ui
- content/docs/en/integrations
- sim
- blocks
- blocks
- components
- lib/integrations
- tools
- generated
- snowflake
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8574 | 8574 | | |
8575 | 8575 | | |
8576 | 8576 | | |
8577 | | - | |
| 8577 | + | |
8578 | 8578 | | |
8579 | 8579 | | |
8580 | | - | |
| 8580 | + | |
| 8581 | + | |
8581 | 8582 | | |
8582 | 8583 | | |
8583 | 8584 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
215 | 216 | | |
216 | 217 | | |
217 | 218 | | |
| |||
498 | 499 | | |
499 | 500 | | |
500 | 501 | | |
| 502 | + | |
501 | 503 | | |
502 | 504 | | |
503 | 505 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
| 226 | + | |
226 | 227 | | |
227 | 228 | | |
228 | 229 | | |
| |||
Large diffs are not rendered by default.
0 commit comments