[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-anthropic-snowflake-api":3,"mdc--prvvvh-key":36,"related-repo-anthropic-snowflake-api":2737,"related-org-anthropic-snowflake-api":2850},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":26,"repoUrl":27,"updatedAt":28,"license":29,"forks":30,"topics":31,"repo":32,"sourceUrl":34,"mdContent":35},"snowflake-api","run SQL queries against Snowflake","Run SQL against Snowflake — submit statements, poll async handles, fetch result partitions, cancel, and browse warehouses\u002Fdatabases\u002Fschemas\u002Ftables. Use this whenever the user wants to query Snowflake, ask \"what tables are in this schema\", check a warehouse's status, or mentions `snowflakecomputing.com`, `\u002Fapi\u002Fv2\u002Fstatements`, or a Snowflake account identifier (like `xy12345.us-east-1`). Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"anthropic","Anthropic","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fanthropic.png","anthropics",[13,17,20,23],{"name":14,"slug":15,"type":16},"Data Analysis","data-analysis","tag",{"name":18,"slug":19,"type":16},"Database","database",{"name":21,"slug":22,"type":16},"SQL","sql",{"name":24,"slug":25,"type":16},"Snowflake","snowflake",30,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins","2026-06-24T07:46:31.0608",null,12,[],{"repoUrl":27,"stars":26,"forks":30,"topics":33,"description":29},[],"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Ftree\u002FHEAD\u002Fsnowflake\u002Fskills\u002Fsnowflake-api","---\nname: snowflake-api\ndescription: Run SQL against Snowflake — submit statements, poll async handles, fetch result partitions, cancel, and browse warehouses\u002Fdatabases\u002Fschemas\u002Ftables. Use this whenever the user wants to query Snowflake, ask \"what tables are in this schema\", check a warehouse's status, or mentions `snowflakecomputing.com`, `\u002Fapi\u002Fv2\u002Fstatements`, or a Snowflake account identifier (like `xy12345.us-east-1`). Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.\n---\n\nSnowflake's SQL API v2 (`\u002Fapi\u002Fv2\u002Fstatements`) is a thin REST layer for running SQL and fetching results.\nPOST a SQL string, get back a **statement handle** and either the result (for fast queries) or a\n`202 Accepted` to poll. Large results are split into **partitions** you fetch one at a time. There\nis no separate \"list tables\" endpoint — catalog browsing is just SQL (`SHOW TABLES`,\n`INFORMATION_SCHEMA`).\n\n## Request setup\n\nAuthentication is handled by the runtime — credentials are injected into outbound requests to this\nAPI, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.\nCredential variables exist only to keep requests well-formed; if one is unset, set it to any\nplaceholder value. A persistent `401` means the credential isn't configured for this workspace —\nreport that instead of debugging auth.\n\nThe **account identifier** must be real — it's the hostname. It's the part of the Snowflake URL\nbefore `.snowflakecomputing.com` — e.g. `xy12345.us-east-1` or an org-style `myorg-myaccount`.\n\n```bash\nexport SNOWFLAKE_ACCOUNT=\"xy12345.us-east-1\"           # your account identifier — must be real\nexport SNOWFLAKE_BASE=\"https:\u002F\u002F${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com\"\nexport SNOWFLAKE_TOKEN=\"placeholder\"                   # injected by the runtime; any value works\nexport SNOWFLAKE_TOKEN_TYPE=\"${SNOWFLAKE_TOKEN_TYPE:-OAUTH}\"   # leave as provided by the runtime\n```\n\n### Helper and sanity check\n\nEvery request carries the same headers. Define a helper once:\n\n```bash\nsnowapi() {\n  curl -sS --compressed \"$@\" \\\n    -H \"Authorization: Bearer ${SNOWFLAKE_TOKEN}\" \\\n    -H \"X-Snowflake-Authorization-Token-Type: ${SNOWFLAKE_TOKEN_TYPE}\" \\\n    -H \"Content-Type: application\u002Fjson\" -H \"Accept: application\u002Fjson\" \\\n    -H \"User-Agent: curl-sql-api\u002F1.0\"\n}\n```\n\n(`User-Agent` is required — Snowflake rejects requests without one. `--compressed` matters for\nresult partitions, which come back with `Content-Encoding: gzip`.)\n\n**Sanity check** — confirm the account identifier is right and the workspace is wired up:\n\n```bash\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\" \\\n  -d '{\"statement\":\"SELECT CURRENT_USER(), CURRENT_ROLE(), CURRENT_WAREHOUSE()\",\"timeout\":10}' | jq .\n# Returns the configured user\u002Frole\u002Fwarehouse on success.\n```\n\n## Core operations\n\n### 1. Run a statement (`scripts\u002Fsnow_query.sh`)\n\nRun SQL through the bundled script (path is relative to this skill's directory): it submits the\nstatement, polls the handle until it finishes, walks every result partition (gzip handled), and\nemits decoded rows. Use it for any single-statement query, `SHOW`, or `DESCRIBE`.\n\n```bash\nscripts\u002Fsnow_query.sh --warehouse MY_WH --bind TEXT:1996-01-01 \\\n  'SELECT o_orderdate, COUNT(*) n FROM snowflake_sample_data.tpch_sf1.orders\n   WHERE o_orderdate >= ? GROUP BY 1 ORDER BY 1 LIMIT 20'\n```\n\n- SQL is one quoted argument or stdin. Instance specifics come from `SNOWFLAKE_ACCOUNT` \u002F\n  `SNOWFLAKE_TOKEN` \u002F `SNOWFLAKE_TOKEN_TYPE` above (`SNOWFLAKE_BASE_URL` overrides the host).\n- `--warehouse` \u002F `--database` \u002F `--schema` \u002F `--role` set the session context (each falls back to\n  the user's Snowflake default if omitted); `--tag` sets `QUERY_TAG` for auditing.\n- `--bind TYPE:VALUE` (repeatable) binds positional `?` placeholders in order — prefer it over\n  splicing values into the SQL string. Types are the binding types in `references\u002Fapi.md`.\n- `--timeout` (default 300 s) is the server-side execution cap — a statement that exceeds it is\n  cancelled; `--max-wait` (default 600 s) is how long the script polls before giving up.\n- `--max-rows N` caps fetched rows (default 10000, `0` = everything); `--json` emits one JSON object\n  per row instead of TSV with a header. Handle, row counts, and errors go to stderr.\n- Cells are emitted as the API's raw string encodings (so dates are epoch-days, timestamps are epoch\n  seconds — see the gotcha under Error handling).\n- Exit codes: `0` success, `1` request or SQL failed (Snowflake's `code`\u002F`sqlState`\u002F`message` on\n  stderr), `2` gave up after `--max-wait` while still running — the handle is on stderr; fetch or\n  cancel it with the endpoints below.\n\nIf the script errors, read it — it's plain `curl` + `jq` — and debug against `references\u002Fapi.md`.\nFor multi-statement requests, idempotent `requestId` retries, array bindings, cancel, or fetching\nresults from a handle you already have, use the endpoints below directly.\n\n### 2. Fetch results from an existing handle\n\n`GET \u002Fapi\u002Fv2\u002Fstatements\u002F{handle}` — the recovery path after the script's exit-2 timeout, or for any\nhandle you obtained elsewhere. `202` = still running (poll again with a `sleep`), `200` = done with\npartition 0 of the results inline, `422` = the statement failed.\n\n```bash\nsnowapi \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\u002F${HANDLE}\" -o \u002Ftmp\u002Fsf.json -w '%{http_code}\\n'\njq '{cols: [.resultSetMetaData.rowType[]?.name], parts: .resultSetMetaData.partitionInfo, rows: .data[:5]}' \u002Ftmp\u002Fsf.json\n```\n\n- Columns are in `resultSetMetaData.rowType[]`; rows in `data[]` as arrays of strings (encoding\n  table in `references\u002Fapi.md`, section Result metadata & partitions).\n- `resultSetMetaData.partitionInfo[]` lists every partition with its `rowCount`. Fetch the rest with\n  `?partition=N` for `N` from 1 to `partitionInfo|length - 1`. Partitions are stable (fetch in\n  parallel or out of order), gzip-compressed after the first (the helper's `--compressed` handles\n  it), and carry only `data` — no metadata.\n- Results are retained for **24 hours** after the statement finishes; past that the handle returns\n  `404`.\n\n### 3. Cancel a running statement\n\n```bash\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\u002F${HANDLE}\u002Fcancel\" | jq .\n```\n\nCancellation is best-effort. If the statement already finished, this is a no-op.\n\n### 4. Idempotent submits with `requestId`\n\nIf a POST might be retried (flaky network, timeout), pass a client-generated UUID as `requestId`. A\nretry with the same `requestId` and `retry=true` returns the original statement's handle instead of\nrunning it again.\n\n```bash\nRID=$(uuidgen)\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements?requestId=${RID}\" -d '{\"statement\":\"INSERT INTO t VALUES (1)\",\"warehouse\":\"MY_WH\"}'\n# On timeout, retry:\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements?requestId=${RID}&retry=true\" -d '{\"statement\":\"INSERT INTO t VALUES (1)\",\"warehouse\":\"MY_WH\"}'\n```\n\n### 5. Run multiple statements in one request\n\nSeparate with `;` and set `MULTI_STATEMENT_COUNT` to the exact count (or `0` for \"any number\").\nReturns a parent handle plus per-child handles.\n\n```bash\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\" -d '{\n  \"statement\": \"CREATE TEMP TABLE tmp AS SELECT 1 AS x; SELECT * FROM tmp;\",\n  \"warehouse\": \"MY_WH\",\n  \"parameters\": {\"MULTI_STATEMENT_COUNT\": \"2\"}\n}' | jq '{parent: .statementHandle, children: .statementHandles, msg: .message}'\n```\n\nFetch each child's results via its own handle. `BEGIN`\u002F`COMMIT`\u002F`ROLLBACK`, `USE`, `ALTER SESSION`,\nand temporary table\u002Fstage creation are only supported *inside* a multi-statement request — as a\nsingle statement they fail with a `422`. Bindings are not supported in multi-statement requests.\n\n### 6. Browse the catalog (databases, schemas, tables, columns)\n\nThere are no REST catalog endpoints — use `SHOW`\u002F`DESCRIBE`, which run as ordinary statements. A\nfailure (no such object, no privilege) comes back as `422` with `{code, message, sqlState}` and no\n`data` key — guard for it once, then assume `.data` on subsequent calls:\n\n```bash\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\" -d '{\"statement\":\"SHOW DATABASES\",\"timeout\":20}' \\\n  | jq -r 'if .data then (.data[] | @tsv) else \"error \\(.code \u002F\u002F \"?\"): \\(.message \u002F\u002F .)\" end'\n```\n\nSwap the `statement` for any of: `SHOW SCHEMAS IN DATABASE MY_DB`,\n`SHOW TABLES IN SCHEMA MY_DB.PUBLIC`, `DESCRIBE TABLE MY_DB.PUBLIC.EVENTS`,\n`SHOW WAREHOUSES LIKE 'MY_WH'` (column 2 = state: `STARTED`\u002F`SUSPENDED`\u002F`RESUMING`\u002F`SUSPENDING`).\n\nFor predictable column sets across versions, query `INFORMATION_SCHEMA` instead — e.g.\n`SELECT table_name, row_count, bytes FROM my_db.information_schema.tables WHERE table_schema='PUBLIC'`\nor `SELECT column_name, data_type, is_nullable FROM my_db.information_schema.columns WHERE table_schema='PUBLIC' AND table_name='EVENTS' ORDER BY ordinal_position`.\n\nTo label rows by column name, zip `resultSetMetaData.rowType[].name` with each `data[]` row:\n`jq '[.resultSetMetaData.rowType[]?.name] as $c | .data[] | [$c,.] | transpose | map({key:.[0],value:.[1]}) | from_entries'`.\n\n## Pagination\n\nPagination is **partitions**, not cursors. `resultSetMetaData.partitionInfo` is an array of\n`{\"rowCount\", \"uncompressedSize\"}` entries; loop indices, no next-token. Each partition is bounded\nto keep response sizes manageable (roughly a few thousand rows or ~10 MB uncompressed).\n\n## Rate limits\n\nSnowflake doesn't publish a fixed requests-per-second cap on the SQL API. The limits you actually\nhit are:\n\n- **Concurrent statements per warehouse** (`MAX_CONCURRENCY_LEVEL`, default 8) — excess queries\n  queue inside Snowflake, not at the HTTP layer, so you won't get a `429`; they'll just sit in\n  `QUEUED` state.\n- **`429 Too Many Requests`** does happen if you hammer the poll endpoint. Back off and respect\n  `Retry-After` if present.\n- **Credential lifetime** — the runtime supplies and renews the credential. A persistent `401` means\n  the configured credential needs fixing — report it rather than trying to re-authenticate.\n\nPoll with a `sleep`, not a hot loop — and keep `timeout` in the POST reasonably high so most queries\nreturn inline without polling at all.\n\n## Error handling\n\nSnowflake returns the HTTP status plus a JSON body with `code`, `sqlState`, `message`, and\n`statementHandle`. The `code` is a Snowflake-specific numeric string (e.g. `\"390302\"`).\n\n- **`200`** — Finished, results inline. Read `data[]`. Check `resultSetMetaData.partitionInfo` for more pages.\n- **`202`** — Still running (or submitted async). Poll `GET ...\u002Fstatements\u002F{handle}`. Body carries `statementStatusUrl` and `message`.\n- **`400`** — Malformed request. Read `message`. Common causes: missing `Content-Type`, bad JSON, wrong binding index (bindings are 1-indexed strings: `\"1\"`, `\"2\"`, one per `?`).\n- **`401`** — Credential missing or rejected. Check `SNOWFLAKE_ACCOUNT` points at the right account and the token\u002Ftype headers are present. If it persists, the credential isn't configured for this workspace — report it.\n- **`404`** — Handle not found. Results are retained 24 h; past that the handle is gone. Or the handle is wrong.\n- **`408`** — Statement exceeded the request's `timeout` and was cancelled. Raise (or omit) `timeout` and resubmit.\n- **`422`** — Statement failed (SQL error, cancelled). `message` and `sqlState` carry the SQL error. Don't retry blindly.\n- **`429`** — Rate limited. Back off per `Retry-After`.\n- **`503` \u002F `504`** — Transient. Retry with backoff. For POSTs, retry with the same `requestId` + `retry=true` to stay idempotent.\n\nGotchas worth calling out:\n\n- **Everything is uppercase by default.** Unquoted identifiers resolve uppercased.\n  `SHOW TABLES IN schema my_db.public` and `MY_DB.PUBLIC` are the same; `\"my_db\".\"public\"` is not.\n- **Bind placeholders in the SQL are `?`**, and **bindings are a 1-indexed string-keyed object**,\n  not an array: `{\"1\": {...}, \"2\": {...}}`. Values are always strings regardless of `type`. See\n  `references\u002Fapi.md` (Bindings) for the type list and array-binding form.\n- **`data[]` values are all strings**, and dates\u002Ftimestamps are **not** ISO — `date` is days since\n  epoch (`\"18262\"`), `timestamp_*` is epoch seconds with a 9-decimal fraction. Parse against\n  `resultSetMetaData.rowType[].type`; the full per-type encoding table is in `references\u002Fapi.md`\n  (Result metadata & partitions).\n- **Warehouse is required for anything that scans data.** Metadata-only statements (most `SHOW`\n  commands, `DESCRIBE`) don't need one, but `SELECT` does. A missing warehouse fails with a clear\n  message. Queries on a suspended warehouse auto-resume it (startup delay), and each resume incurs a\n  60 s billing minimum (per warehouse start, not per query) — batch small lookups where you can.\n\n## Going deeper\n\n`references\u002Fapi.md` has the fuller reference — the complete request body fields, the\n`resultSetMetaData` shape, all the `parameters` session options, multi-statement and child-handle\nmechanics, the monitoring endpoints (`\u002Fapi\u002Fv2\u002Fstatements\u002F{handle}` status values), and notes on\nbinding types and VARIANT\u002FARRAY handling. Read it when you need the exact shape for something not\ncovered above.\n",{"data":37,"body":38},{"name":4,"description":6},{"type":39,"children":40},"root",[41,97,104,117,153,340,347,352,556,585,595,691,697,711,731,795,1016,1052,1058,1101,1198,1306,1312,1383,1388,1399,1426,1594,1600,1628,1739,1796,1802,1850,1943,2013,2040,2067,2073,2100,2106,2111,2187,2207,2213,2259,2513,2518,2691,2697,2731],{"type":42,"tag":43,"props":44,"children":45},"element","p",{},[46,49,56,58,64,66,72,74,79,81,87,89,95],{"type":47,"value":48},"text","Snowflake's SQL API v2 (",{"type":42,"tag":50,"props":51,"children":53},"code",{"className":52},[],[54],{"type":47,"value":55},"\u002Fapi\u002Fv2\u002Fstatements",{"type":47,"value":57},") is a thin REST layer for running SQL and fetching results.\nPOST a SQL string, get back a ",{"type":42,"tag":59,"props":60,"children":61},"strong",{},[62],{"type":47,"value":63},"statement handle",{"type":47,"value":65}," and either the result (for fast queries) or a\n",{"type":42,"tag":50,"props":67,"children":69},{"className":68},[],[70],{"type":47,"value":71},"202 Accepted",{"type":47,"value":73}," to poll. Large results are split into ",{"type":42,"tag":59,"props":75,"children":76},{},[77],{"type":47,"value":78},"partitions",{"type":47,"value":80}," you fetch one at a time. There\nis no separate \"list tables\" endpoint — catalog browsing is just SQL (",{"type":42,"tag":50,"props":82,"children":84},{"className":83},[],[85],{"type":47,"value":86},"SHOW TABLES",{"type":47,"value":88},",\n",{"type":42,"tag":50,"props":90,"children":92},{"className":91},[],[93],{"type":47,"value":94},"INFORMATION_SCHEMA",{"type":47,"value":96},").",{"type":42,"tag":98,"props":99,"children":101},"h2",{"id":100},"request-setup",[102],{"type":47,"value":103},"Request setup",{"type":42,"tag":43,"props":105,"children":106},{},[107,109,115],{"type":47,"value":108},"Authentication is handled by the runtime — credentials are injected into outbound requests to this\nAPI, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.\nCredential variables exist only to keep requests well-formed; if one is unset, set it to any\nplaceholder value. A persistent ",{"type":42,"tag":50,"props":110,"children":112},{"className":111},[],[113],{"type":47,"value":114},"401",{"type":47,"value":116}," means the credential isn't configured for this workspace —\nreport that instead of debugging auth.",{"type":42,"tag":43,"props":118,"children":119},{},[120,122,127,129,135,137,143,145,151],{"type":47,"value":121},"The ",{"type":42,"tag":59,"props":123,"children":124},{},[125],{"type":47,"value":126},"account identifier",{"type":47,"value":128}," must be real — it's the hostname. It's the part of the Snowflake URL\nbefore ",{"type":42,"tag":50,"props":130,"children":132},{"className":131},[],[133],{"type":47,"value":134},".snowflakecomputing.com",{"type":47,"value":136}," — e.g. ",{"type":42,"tag":50,"props":138,"children":140},{"className":139},[],[141],{"type":47,"value":142},"xy12345.us-east-1",{"type":47,"value":144}," or an org-style ",{"type":42,"tag":50,"props":146,"children":148},{"className":147},[],[149],{"type":47,"value":150},"myorg-myaccount",{"type":47,"value":152},".",{"type":42,"tag":154,"props":155,"children":160},"pre",{"className":156,"code":157,"language":158,"meta":159,"style":159},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export SNOWFLAKE_ACCOUNT=\"xy12345.us-east-1\"           # your account identifier — must be real\nexport SNOWFLAKE_BASE=\"https:\u002F\u002F${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com\"\nexport SNOWFLAKE_TOKEN=\"placeholder\"                   # injected by the runtime; any value works\nexport SNOWFLAKE_TOKEN_TYPE=\"${SNOWFLAKE_TOKEN_TYPE:-OAUTH}\"   # leave as provided by the runtime\n","bash","",[161],{"type":42,"tag":50,"props":162,"children":163},{"__ignoreMap":159},[164,208,258,293],{"type":42,"tag":165,"props":166,"children":169},"span",{"class":167,"line":168},"line",1,[170,176,182,188,193,198,202],{"type":42,"tag":165,"props":171,"children":173},{"style":172},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[174],{"type":47,"value":175},"export",{"type":42,"tag":165,"props":177,"children":179},{"style":178},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[180],{"type":47,"value":181}," SNOWFLAKE_ACCOUNT",{"type":42,"tag":165,"props":183,"children":185},{"style":184},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[186],{"type":47,"value":187},"=",{"type":42,"tag":165,"props":189,"children":190},{"style":184},[191],{"type":47,"value":192},"\"",{"type":42,"tag":165,"props":194,"children":196},{"style":195},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[197],{"type":47,"value":142},{"type":42,"tag":165,"props":199,"children":200},{"style":184},[201],{"type":47,"value":192},{"type":42,"tag":165,"props":203,"children":205},{"style":204},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[206],{"type":47,"value":207},"           # your account identifier — must be real\n",{"type":42,"tag":165,"props":209,"children":211},{"class":167,"line":210},2,[212,216,221,225,229,234,239,244,249,253],{"type":42,"tag":165,"props":213,"children":214},{"style":172},[215],{"type":47,"value":175},{"type":42,"tag":165,"props":217,"children":218},{"style":178},[219],{"type":47,"value":220}," SNOWFLAKE_BASE",{"type":42,"tag":165,"props":222,"children":223},{"style":184},[224],{"type":47,"value":187},{"type":42,"tag":165,"props":226,"children":227},{"style":184},[228],{"type":47,"value":192},{"type":42,"tag":165,"props":230,"children":231},{"style":195},[232],{"type":47,"value":233},"https:\u002F\u002F",{"type":42,"tag":165,"props":235,"children":236},{"style":184},[237],{"type":47,"value":238},"${",{"type":42,"tag":165,"props":240,"children":241},{"style":178},[242],{"type":47,"value":243},"SNOWFLAKE_ACCOUNT",{"type":42,"tag":165,"props":245,"children":246},{"style":184},[247],{"type":47,"value":248},"}",{"type":42,"tag":165,"props":250,"children":251},{"style":195},[252],{"type":47,"value":134},{"type":42,"tag":165,"props":254,"children":255},{"style":184},[256],{"type":47,"value":257},"\"\n",{"type":42,"tag":165,"props":259,"children":261},{"class":167,"line":260},3,[262,266,271,275,279,284,288],{"type":42,"tag":165,"props":263,"children":264},{"style":172},[265],{"type":47,"value":175},{"type":42,"tag":165,"props":267,"children":268},{"style":178},[269],{"type":47,"value":270}," SNOWFLAKE_TOKEN",{"type":42,"tag":165,"props":272,"children":273},{"style":184},[274],{"type":47,"value":187},{"type":42,"tag":165,"props":276,"children":277},{"style":184},[278],{"type":47,"value":192},{"type":42,"tag":165,"props":280,"children":281},{"style":195},[282],{"type":47,"value":283},"placeholder",{"type":42,"tag":165,"props":285,"children":286},{"style":184},[287],{"type":47,"value":192},{"type":42,"tag":165,"props":289,"children":290},{"style":204},[291],{"type":47,"value":292},"                   # injected by the runtime; any value works\n",{"type":42,"tag":165,"props":294,"children":296},{"class":167,"line":295},4,[297,301,306,310,315,320,325,330,335],{"type":42,"tag":165,"props":298,"children":299},{"style":172},[300],{"type":47,"value":175},{"type":42,"tag":165,"props":302,"children":303},{"style":178},[304],{"type":47,"value":305}," SNOWFLAKE_TOKEN_TYPE",{"type":42,"tag":165,"props":307,"children":308},{"style":184},[309],{"type":47,"value":187},{"type":42,"tag":165,"props":311,"children":312},{"style":184},[313],{"type":47,"value":314},"\"${",{"type":42,"tag":165,"props":316,"children":317},{"style":178},[318],{"type":47,"value":319},"SNOWFLAKE_TOKEN_TYPE",{"type":42,"tag":165,"props":321,"children":322},{"style":184},[323],{"type":47,"value":324},":-",{"type":42,"tag":165,"props":326,"children":327},{"style":178},[328],{"type":47,"value":329},"OAUTH",{"type":42,"tag":165,"props":331,"children":332},{"style":184},[333],{"type":47,"value":334},"}\"",{"type":42,"tag":165,"props":336,"children":337},{"style":204},[338],{"type":47,"value":339},"   # leave as provided by the runtime\n",{"type":42,"tag":341,"props":342,"children":344},"h3",{"id":343},"helper-and-sanity-check",[345],{"type":47,"value":346},"Helper and sanity check",{"type":42,"tag":43,"props":348,"children":349},{},[350],{"type":47,"value":351},"Every request carries the same headers. Define a helper once:",{"type":42,"tag":154,"props":353,"children":355},{"className":156,"code":354,"language":158,"meta":159,"style":159},"snowapi() {\n  curl -sS --compressed \"$@\" \\\n    -H \"Authorization: Bearer ${SNOWFLAKE_TOKEN}\" \\\n    -H \"X-Snowflake-Authorization-Token-Type: ${SNOWFLAKE_TOKEN_TYPE}\" \\\n    -H \"Content-Type: application\u002Fjson\" -H \"Accept: application\u002Fjson\" \\\n    -H \"User-Agent: curl-sql-api\u002F1.0\"\n}\n",[356],{"type":42,"tag":50,"props":357,"children":358},{"__ignoreMap":159},[359,378,417,451,483,526,547],{"type":42,"tag":165,"props":360,"children":361},{"class":167,"line":168},[362,368,373],{"type":42,"tag":165,"props":363,"children":365},{"style":364},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[366],{"type":47,"value":367},"snowapi",{"type":42,"tag":165,"props":369,"children":370},{"style":184},[371],{"type":47,"value":372},"()",{"type":42,"tag":165,"props":374,"children":375},{"style":184},[376],{"type":47,"value":377}," {\n",{"type":42,"tag":165,"props":379,"children":380},{"class":167,"line":210},[381,387,392,397,402,408,412],{"type":42,"tag":165,"props":382,"children":384},{"style":383},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[385],{"type":47,"value":386},"  curl",{"type":42,"tag":165,"props":388,"children":389},{"style":195},[390],{"type":47,"value":391}," -sS",{"type":42,"tag":165,"props":393,"children":394},{"style":195},[395],{"type":47,"value":396}," --compressed",{"type":42,"tag":165,"props":398,"children":399},{"style":184},[400],{"type":47,"value":401}," \"",{"type":42,"tag":165,"props":403,"children":405},{"style":404},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[406],{"type":47,"value":407},"$@",{"type":42,"tag":165,"props":409,"children":410},{"style":184},[411],{"type":47,"value":192},{"type":42,"tag":165,"props":413,"children":414},{"style":178},[415],{"type":47,"value":416}," \\\n",{"type":42,"tag":165,"props":418,"children":419},{"class":167,"line":260},[420,425,429,434,438,443,447],{"type":42,"tag":165,"props":421,"children":422},{"style":195},[423],{"type":47,"value":424},"    -H",{"type":42,"tag":165,"props":426,"children":427},{"style":184},[428],{"type":47,"value":401},{"type":42,"tag":165,"props":430,"children":431},{"style":195},[432],{"type":47,"value":433},"Authorization: Bearer ",{"type":42,"tag":165,"props":435,"children":436},{"style":184},[437],{"type":47,"value":238},{"type":42,"tag":165,"props":439,"children":440},{"style":178},[441],{"type":47,"value":442},"SNOWFLAKE_TOKEN",{"type":42,"tag":165,"props":444,"children":445},{"style":184},[446],{"type":47,"value":334},{"type":42,"tag":165,"props":448,"children":449},{"style":178},[450],{"type":47,"value":416},{"type":42,"tag":165,"props":452,"children":453},{"class":167,"line":295},[454,458,462,467,471,475,479],{"type":42,"tag":165,"props":455,"children":456},{"style":195},[457],{"type":47,"value":424},{"type":42,"tag":165,"props":459,"children":460},{"style":184},[461],{"type":47,"value":401},{"type":42,"tag":165,"props":463,"children":464},{"style":195},[465],{"type":47,"value":466},"X-Snowflake-Authorization-Token-Type: ",{"type":42,"tag":165,"props":468,"children":469},{"style":184},[470],{"type":47,"value":238},{"type":42,"tag":165,"props":472,"children":473},{"style":178},[474],{"type":47,"value":319},{"type":42,"tag":165,"props":476,"children":477},{"style":184},[478],{"type":47,"value":334},{"type":42,"tag":165,"props":480,"children":481},{"style":178},[482],{"type":47,"value":416},{"type":42,"tag":165,"props":484,"children":486},{"class":167,"line":485},5,[487,491,495,500,504,509,513,518,522],{"type":42,"tag":165,"props":488,"children":489},{"style":195},[490],{"type":47,"value":424},{"type":42,"tag":165,"props":492,"children":493},{"style":184},[494],{"type":47,"value":401},{"type":42,"tag":165,"props":496,"children":497},{"style":195},[498],{"type":47,"value":499},"Content-Type: application\u002Fjson",{"type":42,"tag":165,"props":501,"children":502},{"style":184},[503],{"type":47,"value":192},{"type":42,"tag":165,"props":505,"children":506},{"style":195},[507],{"type":47,"value":508}," -H",{"type":42,"tag":165,"props":510,"children":511},{"style":184},[512],{"type":47,"value":401},{"type":42,"tag":165,"props":514,"children":515},{"style":195},[516],{"type":47,"value":517},"Accept: application\u002Fjson",{"type":42,"tag":165,"props":519,"children":520},{"style":184},[521],{"type":47,"value":192},{"type":42,"tag":165,"props":523,"children":524},{"style":178},[525],{"type":47,"value":416},{"type":42,"tag":165,"props":527,"children":529},{"class":167,"line":528},6,[530,534,538,543],{"type":42,"tag":165,"props":531,"children":532},{"style":195},[533],{"type":47,"value":424},{"type":42,"tag":165,"props":535,"children":536},{"style":184},[537],{"type":47,"value":401},{"type":42,"tag":165,"props":539,"children":540},{"style":195},[541],{"type":47,"value":542},"User-Agent: curl-sql-api\u002F1.0",{"type":42,"tag":165,"props":544,"children":545},{"style":184},[546],{"type":47,"value":257},{"type":42,"tag":165,"props":548,"children":550},{"class":167,"line":549},7,[551],{"type":42,"tag":165,"props":552,"children":553},{"style":184},[554],{"type":47,"value":555},"}\n",{"type":42,"tag":43,"props":557,"children":558},{},[559,561,567,569,575,577,583],{"type":47,"value":560},"(",{"type":42,"tag":50,"props":562,"children":564},{"className":563},[],[565],{"type":47,"value":566},"User-Agent",{"type":47,"value":568}," is required — Snowflake rejects requests without one. ",{"type":42,"tag":50,"props":570,"children":572},{"className":571},[],[573],{"type":47,"value":574},"--compressed",{"type":47,"value":576}," matters for\nresult partitions, which come back with ",{"type":42,"tag":50,"props":578,"children":580},{"className":579},[],[581],{"type":47,"value":582},"Content-Encoding: gzip",{"type":47,"value":584},".)",{"type":42,"tag":43,"props":586,"children":587},{},[588,593],{"type":42,"tag":59,"props":589,"children":590},{},[591],{"type":47,"value":592},"Sanity check",{"type":47,"value":594}," — confirm the account identifier is right and the workspace is wired up:",{"type":42,"tag":154,"props":596,"children":598},{"className":156,"code":597,"language":158,"meta":159,"style":159},"snowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\" \\\n  -d '{\"statement\":\"SELECT CURRENT_USER(), CURRENT_ROLE(), CURRENT_WAREHOUSE()\",\"timeout\":10}' | jq .\n# Returns the configured user\u002Frole\u002Fwarehouse on success.\n",[599],{"type":42,"tag":50,"props":600,"children":601},{"__ignoreMap":159},[602,645,683],{"type":42,"tag":165,"props":603,"children":604},{"class":167,"line":168},[605,609,614,619,624,629,633,637,641],{"type":42,"tag":165,"props":606,"children":607},{"style":383},[608],{"type":47,"value":367},{"type":42,"tag":165,"props":610,"children":611},{"style":195},[612],{"type":47,"value":613}," -X",{"type":42,"tag":165,"props":615,"children":616},{"style":195},[617],{"type":47,"value":618}," POST",{"type":42,"tag":165,"props":620,"children":621},{"style":184},[622],{"type":47,"value":623}," \"${",{"type":42,"tag":165,"props":625,"children":626},{"style":178},[627],{"type":47,"value":628},"SNOWFLAKE_BASE",{"type":42,"tag":165,"props":630,"children":631},{"style":184},[632],{"type":47,"value":248},{"type":42,"tag":165,"props":634,"children":635},{"style":195},[636],{"type":47,"value":55},{"type":42,"tag":165,"props":638,"children":639},{"style":184},[640],{"type":47,"value":192},{"type":42,"tag":165,"props":642,"children":643},{"style":178},[644],{"type":47,"value":416},{"type":42,"tag":165,"props":646,"children":647},{"class":167,"line":210},[648,653,658,663,668,673,678],{"type":42,"tag":165,"props":649,"children":650},{"style":195},[651],{"type":47,"value":652},"  -d",{"type":42,"tag":165,"props":654,"children":655},{"style":184},[656],{"type":47,"value":657}," '",{"type":42,"tag":165,"props":659,"children":660},{"style":195},[661],{"type":47,"value":662},"{\"statement\":\"SELECT CURRENT_USER(), CURRENT_ROLE(), CURRENT_WAREHOUSE()\",\"timeout\":10}",{"type":42,"tag":165,"props":664,"children":665},{"style":184},[666],{"type":47,"value":667},"'",{"type":42,"tag":165,"props":669,"children":670},{"style":184},[671],{"type":47,"value":672}," |",{"type":42,"tag":165,"props":674,"children":675},{"style":383},[676],{"type":47,"value":677}," jq",{"type":42,"tag":165,"props":679,"children":680},{"style":195},[681],{"type":47,"value":682}," .\n",{"type":42,"tag":165,"props":684,"children":685},{"class":167,"line":260},[686],{"type":42,"tag":165,"props":687,"children":688},{"style":204},[689],{"type":47,"value":690},"# Returns the configured user\u002Frole\u002Fwarehouse on success.\n",{"type":42,"tag":98,"props":692,"children":694},{"id":693},"core-operations",[695],{"type":47,"value":696},"Core operations",{"type":42,"tag":341,"props":698,"children":700},{"id":699},"_1-run-a-statement-scriptssnow_querysh",[701,703,709],{"type":47,"value":702},"1. Run a statement (",{"type":42,"tag":50,"props":704,"children":706},{"className":705},[],[707],{"type":47,"value":708},"scripts\u002Fsnow_query.sh",{"type":47,"value":710},")",{"type":42,"tag":43,"props":712,"children":713},{},[714,716,722,724,730],{"type":47,"value":715},"Run SQL through the bundled script (path is relative to this skill's directory): it submits the\nstatement, polls the handle until it finishes, walks every result partition (gzip handled), and\nemits decoded rows. Use it for any single-statement query, ",{"type":42,"tag":50,"props":717,"children":719},{"className":718},[],[720],{"type":47,"value":721},"SHOW",{"type":47,"value":723},", or ",{"type":42,"tag":50,"props":725,"children":727},{"className":726},[],[728],{"type":47,"value":729},"DESCRIBE",{"type":47,"value":152},{"type":42,"tag":154,"props":732,"children":734},{"className":156,"code":733,"language":158,"meta":159,"style":159},"scripts\u002Fsnow_query.sh --warehouse MY_WH --bind TEXT:1996-01-01 \\\n  'SELECT o_orderdate, COUNT(*) n FROM snowflake_sample_data.tpch_sf1.orders\n   WHERE o_orderdate >= ? GROUP BY 1 ORDER BY 1 LIMIT 20'\n",[735],{"type":42,"tag":50,"props":736,"children":737},{"__ignoreMap":159},[738,769,782],{"type":42,"tag":165,"props":739,"children":740},{"class":167,"line":168},[741,745,750,755,760,765],{"type":42,"tag":165,"props":742,"children":743},{"style":383},[744],{"type":47,"value":708},{"type":42,"tag":165,"props":746,"children":747},{"style":195},[748],{"type":47,"value":749}," --warehouse",{"type":42,"tag":165,"props":751,"children":752},{"style":195},[753],{"type":47,"value":754}," MY_WH",{"type":42,"tag":165,"props":756,"children":757},{"style":195},[758],{"type":47,"value":759}," --bind",{"type":42,"tag":165,"props":761,"children":762},{"style":195},[763],{"type":47,"value":764}," TEXT:1996-01-01",{"type":42,"tag":165,"props":766,"children":767},{"style":178},[768],{"type":47,"value":416},{"type":42,"tag":165,"props":770,"children":771},{"class":167,"line":210},[772,777],{"type":42,"tag":165,"props":773,"children":774},{"style":184},[775],{"type":47,"value":776},"  '",{"type":42,"tag":165,"props":778,"children":779},{"style":195},[780],{"type":47,"value":781},"SELECT o_orderdate, COUNT(*) n FROM snowflake_sample_data.tpch_sf1.orders\n",{"type":42,"tag":165,"props":783,"children":784},{"class":167,"line":260},[785,790],{"type":42,"tag":165,"props":786,"children":787},{"style":195},[788],{"type":47,"value":789},"   WHERE o_orderdate >= ? GROUP BY 1 ORDER BY 1 LIMIT 20",{"type":42,"tag":165,"props":791,"children":792},{"style":184},[793],{"type":47,"value":794},"'\n",{"type":42,"tag":796,"props":797,"children":798},"ul",{},[799,834,882,908,927,954,959],{"type":42,"tag":800,"props":801,"children":802},"li",{},[803,805,810,812,817,819,824,826,832],{"type":47,"value":804},"SQL is one quoted argument or stdin. Instance specifics come from ",{"type":42,"tag":50,"props":806,"children":808},{"className":807},[],[809],{"type":47,"value":243},{"type":47,"value":811}," \u002F\n",{"type":42,"tag":50,"props":813,"children":815},{"className":814},[],[816],{"type":47,"value":442},{"type":47,"value":818}," \u002F ",{"type":42,"tag":50,"props":820,"children":822},{"className":821},[],[823],{"type":47,"value":319},{"type":47,"value":825}," above (",{"type":42,"tag":50,"props":827,"children":829},{"className":828},[],[830],{"type":47,"value":831},"SNOWFLAKE_BASE_URL",{"type":47,"value":833}," overrides the host).",{"type":42,"tag":800,"props":835,"children":836},{},[837,843,844,850,851,857,858,864,866,872,874,880],{"type":42,"tag":50,"props":838,"children":840},{"className":839},[],[841],{"type":47,"value":842},"--warehouse",{"type":47,"value":818},{"type":42,"tag":50,"props":845,"children":847},{"className":846},[],[848],{"type":47,"value":849},"--database",{"type":47,"value":818},{"type":42,"tag":50,"props":852,"children":854},{"className":853},[],[855],{"type":47,"value":856},"--schema",{"type":47,"value":818},{"type":42,"tag":50,"props":859,"children":861},{"className":860},[],[862],{"type":47,"value":863},"--role",{"type":47,"value":865}," set the session context (each falls back to\nthe user's Snowflake default if omitted); ",{"type":42,"tag":50,"props":867,"children":869},{"className":868},[],[870],{"type":47,"value":871},"--tag",{"type":47,"value":873}," sets ",{"type":42,"tag":50,"props":875,"children":877},{"className":876},[],[878],{"type":47,"value":879},"QUERY_TAG",{"type":47,"value":881}," for auditing.",{"type":42,"tag":800,"props":883,"children":884},{},[885,891,893,899,901,907],{"type":42,"tag":50,"props":886,"children":888},{"className":887},[],[889],{"type":47,"value":890},"--bind TYPE:VALUE",{"type":47,"value":892}," (repeatable) binds positional ",{"type":42,"tag":50,"props":894,"children":896},{"className":895},[],[897],{"type":47,"value":898},"?",{"type":47,"value":900}," placeholders in order — prefer it over\nsplicing values into the SQL string. Types are the binding types in ",{"type":42,"tag":50,"props":902,"children":904},{"className":903},[],[905],{"type":47,"value":906},"references\u002Fapi.md",{"type":47,"value":152},{"type":42,"tag":800,"props":909,"children":910},{},[911,917,919,925],{"type":42,"tag":50,"props":912,"children":914},{"className":913},[],[915],{"type":47,"value":916},"--timeout",{"type":47,"value":918}," (default 300 s) is the server-side execution cap — a statement that exceeds it is\ncancelled; ",{"type":42,"tag":50,"props":920,"children":922},{"className":921},[],[923],{"type":47,"value":924},"--max-wait",{"type":47,"value":926}," (default 600 s) is how long the script polls before giving up.",{"type":42,"tag":800,"props":928,"children":929},{},[930,936,938,944,946,952],{"type":42,"tag":50,"props":931,"children":933},{"className":932},[],[934],{"type":47,"value":935},"--max-rows N",{"type":47,"value":937}," caps fetched rows (default 10000, ",{"type":42,"tag":50,"props":939,"children":941},{"className":940},[],[942],{"type":47,"value":943},"0",{"type":47,"value":945}," = everything); ",{"type":42,"tag":50,"props":947,"children":949},{"className":948},[],[950],{"type":47,"value":951},"--json",{"type":47,"value":953}," emits one JSON object\nper row instead of TSV with a header. Handle, row counts, and errors go to stderr.",{"type":42,"tag":800,"props":955,"children":956},{},[957],{"type":47,"value":958},"Cells are emitted as the API's raw string encodings (so dates are epoch-days, timestamps are epoch\nseconds — see the gotcha under Error handling).",{"type":42,"tag":800,"props":960,"children":961},{},[962,964,969,971,977,979,984,986,992,993,999,1001,1007,1009,1014],{"type":47,"value":963},"Exit codes: ",{"type":42,"tag":50,"props":965,"children":967},{"className":966},[],[968],{"type":47,"value":943},{"type":47,"value":970}," success, ",{"type":42,"tag":50,"props":972,"children":974},{"className":973},[],[975],{"type":47,"value":976},"1",{"type":47,"value":978}," request or SQL failed (Snowflake's ",{"type":42,"tag":50,"props":980,"children":982},{"className":981},[],[983],{"type":47,"value":50},{"type":47,"value":985},"\u002F",{"type":42,"tag":50,"props":987,"children":989},{"className":988},[],[990],{"type":47,"value":991},"sqlState",{"type":47,"value":985},{"type":42,"tag":50,"props":994,"children":996},{"className":995},[],[997],{"type":47,"value":998},"message",{"type":47,"value":1000}," on\nstderr), ",{"type":42,"tag":50,"props":1002,"children":1004},{"className":1003},[],[1005],{"type":47,"value":1006},"2",{"type":47,"value":1008}," gave up after ",{"type":42,"tag":50,"props":1010,"children":1012},{"className":1011},[],[1013],{"type":47,"value":924},{"type":47,"value":1015}," while still running — the handle is on stderr; fetch or\ncancel it with the endpoints below.",{"type":42,"tag":43,"props":1017,"children":1018},{},[1019,1021,1027,1029,1035,1037,1042,1044,1050],{"type":47,"value":1020},"If the script errors, read it — it's plain ",{"type":42,"tag":50,"props":1022,"children":1024},{"className":1023},[],[1025],{"type":47,"value":1026},"curl",{"type":47,"value":1028}," + ",{"type":42,"tag":50,"props":1030,"children":1032},{"className":1031},[],[1033],{"type":47,"value":1034},"jq",{"type":47,"value":1036}," — and debug against ",{"type":42,"tag":50,"props":1038,"children":1040},{"className":1039},[],[1041],{"type":47,"value":906},{"type":47,"value":1043},".\nFor multi-statement requests, idempotent ",{"type":42,"tag":50,"props":1045,"children":1047},{"className":1046},[],[1048],{"type":47,"value":1049},"requestId",{"type":47,"value":1051}," retries, array bindings, cancel, or fetching\nresults from a handle you already have, use the endpoints below directly.",{"type":42,"tag":341,"props":1053,"children":1055},{"id":1054},"_2-fetch-results-from-an-existing-handle",[1056],{"type":47,"value":1057},"2. Fetch results from an existing handle",{"type":42,"tag":43,"props":1059,"children":1060},{},[1061,1067,1069,1075,1077,1083,1085,1091,1093,1099],{"type":42,"tag":50,"props":1062,"children":1064},{"className":1063},[],[1065],{"type":47,"value":1066},"GET \u002Fapi\u002Fv2\u002Fstatements\u002F{handle}",{"type":47,"value":1068}," — the recovery path after the script's exit-2 timeout, or for any\nhandle you obtained elsewhere. ",{"type":42,"tag":50,"props":1070,"children":1072},{"className":1071},[],[1073],{"type":47,"value":1074},"202",{"type":47,"value":1076}," = still running (poll again with a ",{"type":42,"tag":50,"props":1078,"children":1080},{"className":1079},[],[1081],{"type":47,"value":1082},"sleep",{"type":47,"value":1084},"), ",{"type":42,"tag":50,"props":1086,"children":1088},{"className":1087},[],[1089],{"type":47,"value":1090},"200",{"type":47,"value":1092}," = done with\npartition 0 of the results inline, ",{"type":42,"tag":50,"props":1094,"children":1096},{"className":1095},[],[1097],{"type":47,"value":1098},"422",{"type":47,"value":1100}," = the statement failed.",{"type":42,"tag":154,"props":1102,"children":1104},{"className":156,"code":1103,"language":158,"meta":159,"style":159},"snowapi \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\u002F${HANDLE}\" -o \u002Ftmp\u002Fsf.json -w '%{http_code}\\n'\njq '{cols: [.resultSetMetaData.rowType[]?.name], parts: .resultSetMetaData.partitionInfo, rows: .data[:5]}' \u002Ftmp\u002Fsf.json\n",[1105],{"type":42,"tag":50,"props":1106,"children":1107},{"__ignoreMap":159},[1108,1173],{"type":42,"tag":165,"props":1109,"children":1110},{"class":167,"line":168},[1111,1115,1119,1123,1127,1132,1136,1141,1145,1150,1155,1160,1164,1169],{"type":42,"tag":165,"props":1112,"children":1113},{"style":383},[1114],{"type":47,"value":367},{"type":42,"tag":165,"props":1116,"children":1117},{"style":184},[1118],{"type":47,"value":623},{"type":42,"tag":165,"props":1120,"children":1121},{"style":178},[1122],{"type":47,"value":628},{"type":42,"tag":165,"props":1124,"children":1125},{"style":184},[1126],{"type":47,"value":248},{"type":42,"tag":165,"props":1128,"children":1129},{"style":195},[1130],{"type":47,"value":1131},"\u002Fapi\u002Fv2\u002Fstatements\u002F",{"type":42,"tag":165,"props":1133,"children":1134},{"style":184},[1135],{"type":47,"value":238},{"type":42,"tag":165,"props":1137,"children":1138},{"style":178},[1139],{"type":47,"value":1140},"HANDLE",{"type":42,"tag":165,"props":1142,"children":1143},{"style":184},[1144],{"type":47,"value":334},{"type":42,"tag":165,"props":1146,"children":1147},{"style":195},[1148],{"type":47,"value":1149}," -o",{"type":42,"tag":165,"props":1151,"children":1152},{"style":195},[1153],{"type":47,"value":1154}," \u002Ftmp\u002Fsf.json",{"type":42,"tag":165,"props":1156,"children":1157},{"style":195},[1158],{"type":47,"value":1159}," -w",{"type":42,"tag":165,"props":1161,"children":1162},{"style":184},[1163],{"type":47,"value":657},{"type":42,"tag":165,"props":1165,"children":1166},{"style":195},[1167],{"type":47,"value":1168},"%{http_code}\\n",{"type":42,"tag":165,"props":1170,"children":1171},{"style":184},[1172],{"type":47,"value":794},{"type":42,"tag":165,"props":1174,"children":1175},{"class":167,"line":210},[1176,1180,1184,1189,1193],{"type":42,"tag":165,"props":1177,"children":1178},{"style":383},[1179],{"type":47,"value":1034},{"type":42,"tag":165,"props":1181,"children":1182},{"style":184},[1183],{"type":47,"value":657},{"type":42,"tag":165,"props":1185,"children":1186},{"style":195},[1187],{"type":47,"value":1188},"{cols: [.resultSetMetaData.rowType[]?.name], parts: .resultSetMetaData.partitionInfo, rows: .data[:5]}",{"type":42,"tag":165,"props":1190,"children":1191},{"style":184},[1192],{"type":47,"value":667},{"type":42,"tag":165,"props":1194,"children":1195},{"style":195},[1196],{"type":47,"value":1197}," \u002Ftmp\u002Fsf.json\n",{"type":42,"tag":796,"props":1199,"children":1200},{},[1201,1229,1287],{"type":42,"tag":800,"props":1202,"children":1203},{},[1204,1206,1212,1214,1220,1222,1227],{"type":47,"value":1205},"Columns are in ",{"type":42,"tag":50,"props":1207,"children":1209},{"className":1208},[],[1210],{"type":47,"value":1211},"resultSetMetaData.rowType[]",{"type":47,"value":1213},"; rows in ",{"type":42,"tag":50,"props":1215,"children":1217},{"className":1216},[],[1218],{"type":47,"value":1219},"data[]",{"type":47,"value":1221}," as arrays of strings (encoding\ntable in ",{"type":42,"tag":50,"props":1223,"children":1225},{"className":1224},[],[1226],{"type":47,"value":906},{"type":47,"value":1228},", section Result metadata & partitions).",{"type":42,"tag":800,"props":1230,"children":1231},{},[1232,1238,1240,1246,1248,1254,1256,1262,1264,1270,1272,1277,1279,1285],{"type":42,"tag":50,"props":1233,"children":1235},{"className":1234},[],[1236],{"type":47,"value":1237},"resultSetMetaData.partitionInfo[]",{"type":47,"value":1239}," lists every partition with its ",{"type":42,"tag":50,"props":1241,"children":1243},{"className":1242},[],[1244],{"type":47,"value":1245},"rowCount",{"type":47,"value":1247},". Fetch the rest with\n",{"type":42,"tag":50,"props":1249,"children":1251},{"className":1250},[],[1252],{"type":47,"value":1253},"?partition=N",{"type":47,"value":1255}," for ",{"type":42,"tag":50,"props":1257,"children":1259},{"className":1258},[],[1260],{"type":47,"value":1261},"N",{"type":47,"value":1263}," from 1 to ",{"type":42,"tag":50,"props":1265,"children":1267},{"className":1266},[],[1268],{"type":47,"value":1269},"partitionInfo|length - 1",{"type":47,"value":1271},". Partitions are stable (fetch in\nparallel or out of order), gzip-compressed after the first (the helper's ",{"type":42,"tag":50,"props":1273,"children":1275},{"className":1274},[],[1276],{"type":47,"value":574},{"type":47,"value":1278}," handles\nit), and carry only ",{"type":42,"tag":50,"props":1280,"children":1282},{"className":1281},[],[1283],{"type":47,"value":1284},"data",{"type":47,"value":1286}," — no metadata.",{"type":42,"tag":800,"props":1288,"children":1289},{},[1290,1292,1297,1299,1305],{"type":47,"value":1291},"Results are retained for ",{"type":42,"tag":59,"props":1293,"children":1294},{},[1295],{"type":47,"value":1296},"24 hours",{"type":47,"value":1298}," after the statement finishes; past that the handle returns\n",{"type":42,"tag":50,"props":1300,"children":1302},{"className":1301},[],[1303],{"type":47,"value":1304},"404",{"type":47,"value":152},{"type":42,"tag":341,"props":1307,"children":1309},{"id":1308},"_3-cancel-a-running-statement",[1310],{"type":47,"value":1311},"3. Cancel a running statement",{"type":42,"tag":154,"props":1313,"children":1315},{"className":156,"code":1314,"language":158,"meta":159,"style":159},"snowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\u002F${HANDLE}\u002Fcancel\" | jq .\n",[1316],{"type":42,"tag":50,"props":1317,"children":1318},{"__ignoreMap":159},[1319],{"type":42,"tag":165,"props":1320,"children":1321},{"class":167,"line":168},[1322,1326,1330,1334,1338,1342,1346,1350,1354,1358,1362,1367,1371,1375,1379],{"type":42,"tag":165,"props":1323,"children":1324},{"style":383},[1325],{"type":47,"value":367},{"type":42,"tag":165,"props":1327,"children":1328},{"style":195},[1329],{"type":47,"value":613},{"type":42,"tag":165,"props":1331,"children":1332},{"style":195},[1333],{"type":47,"value":618},{"type":42,"tag":165,"props":1335,"children":1336},{"style":184},[1337],{"type":47,"value":623},{"type":42,"tag":165,"props":1339,"children":1340},{"style":178},[1341],{"type":47,"value":628},{"type":42,"tag":165,"props":1343,"children":1344},{"style":184},[1345],{"type":47,"value":248},{"type":42,"tag":165,"props":1347,"children":1348},{"style":195},[1349],{"type":47,"value":1131},{"type":42,"tag":165,"props":1351,"children":1352},{"style":184},[1353],{"type":47,"value":238},{"type":42,"tag":165,"props":1355,"children":1356},{"style":178},[1357],{"type":47,"value":1140},{"type":42,"tag":165,"props":1359,"children":1360},{"style":184},[1361],{"type":47,"value":248},{"type":42,"tag":165,"props":1363,"children":1364},{"style":195},[1365],{"type":47,"value":1366},"\u002Fcancel",{"type":42,"tag":165,"props":1368,"children":1369},{"style":184},[1370],{"type":47,"value":192},{"type":42,"tag":165,"props":1372,"children":1373},{"style":184},[1374],{"type":47,"value":672},{"type":42,"tag":165,"props":1376,"children":1377},{"style":383},[1378],{"type":47,"value":677},{"type":42,"tag":165,"props":1380,"children":1381},{"style":195},[1382],{"type":47,"value":682},{"type":42,"tag":43,"props":1384,"children":1385},{},[1386],{"type":47,"value":1387},"Cancellation is best-effort. If the statement already finished, this is a no-op.",{"type":42,"tag":341,"props":1389,"children":1391},{"id":1390},"_4-idempotent-submits-with-requestid",[1392,1394],{"type":47,"value":1393},"4. Idempotent submits with ",{"type":42,"tag":50,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":47,"value":1049},{"type":42,"tag":43,"props":1400,"children":1401},{},[1402,1404,1409,1411,1416,1418,1424],{"type":47,"value":1403},"If a POST might be retried (flaky network, timeout), pass a client-generated UUID as ",{"type":42,"tag":50,"props":1405,"children":1407},{"className":1406},[],[1408],{"type":47,"value":1049},{"type":47,"value":1410},". A\nretry with the same ",{"type":42,"tag":50,"props":1412,"children":1414},{"className":1413},[],[1415],{"type":47,"value":1049},{"type":47,"value":1417}," and ",{"type":42,"tag":50,"props":1419,"children":1421},{"className":1420},[],[1422],{"type":47,"value":1423},"retry=true",{"type":47,"value":1425}," returns the original statement's handle instead of\nrunning it again.",{"type":42,"tag":154,"props":1427,"children":1429},{"className":156,"code":1428,"language":158,"meta":159,"style":159},"RID=$(uuidgen)\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements?requestId=${RID}\" -d '{\"statement\":\"INSERT INTO t VALUES (1)\",\"warehouse\":\"MY_WH\"}'\n# On timeout, retry:\nsnowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements?requestId=${RID}&retry=true\" -d '{\"statement\":\"INSERT INTO t VALUES (1)\",\"warehouse\":\"MY_WH\"}'\n",[1430],{"type":42,"tag":50,"props":1431,"children":1432},{"__ignoreMap":159},[1433,1456,1518,1526],{"type":42,"tag":165,"props":1434,"children":1435},{"class":167,"line":168},[1436,1441,1446,1451],{"type":42,"tag":165,"props":1437,"children":1438},{"style":178},[1439],{"type":47,"value":1440},"RID",{"type":42,"tag":165,"props":1442,"children":1443},{"style":184},[1444],{"type":47,"value":1445},"=$(",{"type":42,"tag":165,"props":1447,"children":1448},{"style":383},[1449],{"type":47,"value":1450},"uuidgen",{"type":42,"tag":165,"props":1452,"children":1453},{"style":184},[1454],{"type":47,"value":1455},")\n",{"type":42,"tag":165,"props":1457,"children":1458},{"class":167,"line":210},[1459,1463,1467,1471,1475,1479,1483,1488,1492,1496,1500,1505,1509,1514],{"type":42,"tag":165,"props":1460,"children":1461},{"style":383},[1462],{"type":47,"value":367},{"type":42,"tag":165,"props":1464,"children":1465},{"style":195},[1466],{"type":47,"value":613},{"type":42,"tag":165,"props":1468,"children":1469},{"style":195},[1470],{"type":47,"value":618},{"type":42,"tag":165,"props":1472,"children":1473},{"style":184},[1474],{"type":47,"value":623},{"type":42,"tag":165,"props":1476,"children":1477},{"style":178},[1478],{"type":47,"value":628},{"type":42,"tag":165,"props":1480,"children":1481},{"style":184},[1482],{"type":47,"value":248},{"type":42,"tag":165,"props":1484,"children":1485},{"style":195},[1486],{"type":47,"value":1487},"\u002Fapi\u002Fv2\u002Fstatements?requestId=",{"type":42,"tag":165,"props":1489,"children":1490},{"style":184},[1491],{"type":47,"value":238},{"type":42,"tag":165,"props":1493,"children":1494},{"style":178},[1495],{"type":47,"value":1440},{"type":42,"tag":165,"props":1497,"children":1498},{"style":184},[1499],{"type":47,"value":334},{"type":42,"tag":165,"props":1501,"children":1502},{"style":195},[1503],{"type":47,"value":1504}," -d",{"type":42,"tag":165,"props":1506,"children":1507},{"style":184},[1508],{"type":47,"value":657},{"type":42,"tag":165,"props":1510,"children":1511},{"style":195},[1512],{"type":47,"value":1513},"{\"statement\":\"INSERT INTO t VALUES (1)\",\"warehouse\":\"MY_WH\"}",{"type":42,"tag":165,"props":1515,"children":1516},{"style":184},[1517],{"type":47,"value":794},{"type":42,"tag":165,"props":1519,"children":1520},{"class":167,"line":260},[1521],{"type":42,"tag":165,"props":1522,"children":1523},{"style":204},[1524],{"type":47,"value":1525},"# On timeout, retry:\n",{"type":42,"tag":165,"props":1527,"children":1528},{"class":167,"line":295},[1529,1533,1537,1541,1545,1549,1553,1557,1561,1565,1569,1574,1578,1582,1586,1590],{"type":42,"tag":165,"props":1530,"children":1531},{"style":383},[1532],{"type":47,"value":367},{"type":42,"tag":165,"props":1534,"children":1535},{"style":195},[1536],{"type":47,"value":613},{"type":42,"tag":165,"props":1538,"children":1539},{"style":195},[1540],{"type":47,"value":618},{"type":42,"tag":165,"props":1542,"children":1543},{"style":184},[1544],{"type":47,"value":623},{"type":42,"tag":165,"props":1546,"children":1547},{"style":178},[1548],{"type":47,"value":628},{"type":42,"tag":165,"props":1550,"children":1551},{"style":184},[1552],{"type":47,"value":248},{"type":42,"tag":165,"props":1554,"children":1555},{"style":195},[1556],{"type":47,"value":1487},{"type":42,"tag":165,"props":1558,"children":1559},{"style":184},[1560],{"type":47,"value":238},{"type":42,"tag":165,"props":1562,"children":1563},{"style":178},[1564],{"type":47,"value":1440},{"type":42,"tag":165,"props":1566,"children":1567},{"style":184},[1568],{"type":47,"value":248},{"type":42,"tag":165,"props":1570,"children":1571},{"style":195},[1572],{"type":47,"value":1573},"&retry=true",{"type":42,"tag":165,"props":1575,"children":1576},{"style":184},[1577],{"type":47,"value":192},{"type":42,"tag":165,"props":1579,"children":1580},{"style":195},[1581],{"type":47,"value":1504},{"type":42,"tag":165,"props":1583,"children":1584},{"style":184},[1585],{"type":47,"value":657},{"type":42,"tag":165,"props":1587,"children":1588},{"style":195},[1589],{"type":47,"value":1513},{"type":42,"tag":165,"props":1591,"children":1592},{"style":184},[1593],{"type":47,"value":794},{"type":42,"tag":341,"props":1595,"children":1597},{"id":1596},"_5-run-multiple-statements-in-one-request",[1598],{"type":47,"value":1599},"5. Run multiple statements in one request",{"type":42,"tag":43,"props":1601,"children":1602},{},[1603,1605,1611,1613,1619,1621,1626],{"type":47,"value":1604},"Separate with ",{"type":42,"tag":50,"props":1606,"children":1608},{"className":1607},[],[1609],{"type":47,"value":1610},";",{"type":47,"value":1612}," and set ",{"type":42,"tag":50,"props":1614,"children":1616},{"className":1615},[],[1617],{"type":47,"value":1618},"MULTI_STATEMENT_COUNT",{"type":47,"value":1620}," to the exact count (or ",{"type":42,"tag":50,"props":1622,"children":1624},{"className":1623},[],[1625],{"type":47,"value":943},{"type":47,"value":1627}," for \"any number\").\nReturns a parent handle plus per-child handles.",{"type":42,"tag":154,"props":1629,"children":1631},{"className":156,"code":1630,"language":158,"meta":159,"style":159},"snowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\" -d '{\n  \"statement\": \"CREATE TEMP TABLE tmp AS SELECT 1 AS x; SELECT * FROM tmp;\",\n  \"warehouse\": \"MY_WH\",\n  \"parameters\": {\"MULTI_STATEMENT_COUNT\": \"2\"}\n}' | jq '{parent: .statementHandle, children: .statementHandles, msg: .message}'\n",[1632],{"type":42,"tag":50,"props":1633,"children":1634},{"__ignoreMap":159},[1635,1683,1691,1699,1707],{"type":42,"tag":165,"props":1636,"children":1637},{"class":167,"line":168},[1638,1642,1646,1650,1654,1658,1662,1666,1670,1674,1678],{"type":42,"tag":165,"props":1639,"children":1640},{"style":383},[1641],{"type":47,"value":367},{"type":42,"tag":165,"props":1643,"children":1644},{"style":195},[1645],{"type":47,"value":613},{"type":42,"tag":165,"props":1647,"children":1648},{"style":195},[1649],{"type":47,"value":618},{"type":42,"tag":165,"props":1651,"children":1652},{"style":184},[1653],{"type":47,"value":623},{"type":42,"tag":165,"props":1655,"children":1656},{"style":178},[1657],{"type":47,"value":628},{"type":42,"tag":165,"props":1659,"children":1660},{"style":184},[1661],{"type":47,"value":248},{"type":42,"tag":165,"props":1663,"children":1664},{"style":195},[1665],{"type":47,"value":55},{"type":42,"tag":165,"props":1667,"children":1668},{"style":184},[1669],{"type":47,"value":192},{"type":42,"tag":165,"props":1671,"children":1672},{"style":195},[1673],{"type":47,"value":1504},{"type":42,"tag":165,"props":1675,"children":1676},{"style":184},[1677],{"type":47,"value":657},{"type":42,"tag":165,"props":1679,"children":1680},{"style":195},[1681],{"type":47,"value":1682},"{\n",{"type":42,"tag":165,"props":1684,"children":1685},{"class":167,"line":210},[1686],{"type":42,"tag":165,"props":1687,"children":1688},{"style":195},[1689],{"type":47,"value":1690},"  \"statement\": \"CREATE TEMP TABLE tmp AS SELECT 1 AS x; SELECT * FROM tmp;\",\n",{"type":42,"tag":165,"props":1692,"children":1693},{"class":167,"line":260},[1694],{"type":42,"tag":165,"props":1695,"children":1696},{"style":195},[1697],{"type":47,"value":1698},"  \"warehouse\": \"MY_WH\",\n",{"type":42,"tag":165,"props":1700,"children":1701},{"class":167,"line":295},[1702],{"type":42,"tag":165,"props":1703,"children":1704},{"style":195},[1705],{"type":47,"value":1706},"  \"parameters\": {\"MULTI_STATEMENT_COUNT\": \"2\"}\n",{"type":42,"tag":165,"props":1708,"children":1709},{"class":167,"line":485},[1710,1714,1718,1722,1726,1730,1735],{"type":42,"tag":165,"props":1711,"children":1712},{"style":195},[1713],{"type":47,"value":248},{"type":42,"tag":165,"props":1715,"children":1716},{"style":184},[1717],{"type":47,"value":667},{"type":42,"tag":165,"props":1719,"children":1720},{"style":184},[1721],{"type":47,"value":672},{"type":42,"tag":165,"props":1723,"children":1724},{"style":383},[1725],{"type":47,"value":677},{"type":42,"tag":165,"props":1727,"children":1728},{"style":184},[1729],{"type":47,"value":657},{"type":42,"tag":165,"props":1731,"children":1732},{"style":195},[1733],{"type":47,"value":1734},"{parent: .statementHandle, children: .statementHandles, msg: .message}",{"type":42,"tag":165,"props":1736,"children":1737},{"style":184},[1738],{"type":47,"value":794},{"type":42,"tag":43,"props":1740,"children":1741},{},[1742,1744,1750,1751,1757,1758,1764,1766,1772,1773,1779,1781,1787,1789,1794],{"type":47,"value":1743},"Fetch each child's results via its own handle. ",{"type":42,"tag":50,"props":1745,"children":1747},{"className":1746},[],[1748],{"type":47,"value":1749},"BEGIN",{"type":47,"value":985},{"type":42,"tag":50,"props":1752,"children":1754},{"className":1753},[],[1755],{"type":47,"value":1756},"COMMIT",{"type":47,"value":985},{"type":42,"tag":50,"props":1759,"children":1761},{"className":1760},[],[1762],{"type":47,"value":1763},"ROLLBACK",{"type":47,"value":1765},", ",{"type":42,"tag":50,"props":1767,"children":1769},{"className":1768},[],[1770],{"type":47,"value":1771},"USE",{"type":47,"value":1765},{"type":42,"tag":50,"props":1774,"children":1776},{"className":1775},[],[1777],{"type":47,"value":1778},"ALTER SESSION",{"type":47,"value":1780},",\nand temporary table\u002Fstage creation are only supported ",{"type":42,"tag":1782,"props":1783,"children":1784},"em",{},[1785],{"type":47,"value":1786},"inside",{"type":47,"value":1788}," a multi-statement request — as a\nsingle statement they fail with a ",{"type":42,"tag":50,"props":1790,"children":1792},{"className":1791},[],[1793],{"type":47,"value":1098},{"type":47,"value":1795},". Bindings are not supported in multi-statement requests.",{"type":42,"tag":341,"props":1797,"children":1799},{"id":1798},"_6-browse-the-catalog-databases-schemas-tables-columns",[1800],{"type":47,"value":1801},"6. Browse the catalog (databases, schemas, tables, columns)",{"type":42,"tag":43,"props":1803,"children":1804},{},[1805,1807,1812,1813,1818,1820,1825,1827,1833,1835,1840,1842,1848],{"type":47,"value":1806},"There are no REST catalog endpoints — use ",{"type":42,"tag":50,"props":1808,"children":1810},{"className":1809},[],[1811],{"type":47,"value":721},{"type":47,"value":985},{"type":42,"tag":50,"props":1814,"children":1816},{"className":1815},[],[1817],{"type":47,"value":729},{"type":47,"value":1819},", which run as ordinary statements. A\nfailure (no such object, no privilege) comes back as ",{"type":42,"tag":50,"props":1821,"children":1823},{"className":1822},[],[1824],{"type":47,"value":1098},{"type":47,"value":1826}," with ",{"type":42,"tag":50,"props":1828,"children":1830},{"className":1829},[],[1831],{"type":47,"value":1832},"{code, message, sqlState}",{"type":47,"value":1834}," and no\n",{"type":42,"tag":50,"props":1836,"children":1838},{"className":1837},[],[1839],{"type":47,"value":1284},{"type":47,"value":1841}," key — guard for it once, then assume ",{"type":42,"tag":50,"props":1843,"children":1845},{"className":1844},[],[1846],{"type":47,"value":1847},".data",{"type":47,"value":1849}," on subsequent calls:",{"type":42,"tag":154,"props":1851,"children":1853},{"className":156,"code":1852,"language":158,"meta":159,"style":159},"snowapi -X POST \"${SNOWFLAKE_BASE}\u002Fapi\u002Fv2\u002Fstatements\" -d '{\"statement\":\"SHOW DATABASES\",\"timeout\":20}' \\\n  | jq -r 'if .data then (.data[] | @tsv) else \"error \\(.code \u002F\u002F \"?\"): \\(.message \u002F\u002F .)\" end'\n",[1854],{"type":42,"tag":50,"props":1855,"children":1856},{"__ignoreMap":159},[1857,1913],{"type":42,"tag":165,"props":1858,"children":1859},{"class":167,"line":168},[1860,1864,1868,1872,1876,1880,1884,1888,1892,1896,1900,1905,1909],{"type":42,"tag":165,"props":1861,"children":1862},{"style":383},[1863],{"type":47,"value":367},{"type":42,"tag":165,"props":1865,"children":1866},{"style":195},[1867],{"type":47,"value":613},{"type":42,"tag":165,"props":1869,"children":1870},{"style":195},[1871],{"type":47,"value":618},{"type":42,"tag":165,"props":1873,"children":1874},{"style":184},[1875],{"type":47,"value":623},{"type":42,"tag":165,"props":1877,"children":1878},{"style":178},[1879],{"type":47,"value":628},{"type":42,"tag":165,"props":1881,"children":1882},{"style":184},[1883],{"type":47,"value":248},{"type":42,"tag":165,"props":1885,"children":1886},{"style":195},[1887],{"type":47,"value":55},{"type":42,"tag":165,"props":1889,"children":1890},{"style":184},[1891],{"type":47,"value":192},{"type":42,"tag":165,"props":1893,"children":1894},{"style":195},[1895],{"type":47,"value":1504},{"type":42,"tag":165,"props":1897,"children":1898},{"style":184},[1899],{"type":47,"value":657},{"type":42,"tag":165,"props":1901,"children":1902},{"style":195},[1903],{"type":47,"value":1904},"{\"statement\":\"SHOW DATABASES\",\"timeout\":20}",{"type":42,"tag":165,"props":1906,"children":1907},{"style":184},[1908],{"type":47,"value":667},{"type":42,"tag":165,"props":1910,"children":1911},{"style":178},[1912],{"type":47,"value":416},{"type":42,"tag":165,"props":1914,"children":1915},{"class":167,"line":210},[1916,1921,1925,1930,1934,1939],{"type":42,"tag":165,"props":1917,"children":1918},{"style":184},[1919],{"type":47,"value":1920},"  |",{"type":42,"tag":165,"props":1922,"children":1923},{"style":383},[1924],{"type":47,"value":677},{"type":42,"tag":165,"props":1926,"children":1927},{"style":195},[1928],{"type":47,"value":1929}," -r",{"type":42,"tag":165,"props":1931,"children":1932},{"style":184},[1933],{"type":47,"value":657},{"type":42,"tag":165,"props":1935,"children":1936},{"style":195},[1937],{"type":47,"value":1938},"if .data then (.data[] | @tsv) else \"error \\(.code \u002F\u002F \"?\"): \\(.message \u002F\u002F .)\" end",{"type":42,"tag":165,"props":1940,"children":1941},{"style":184},[1942],{"type":47,"value":794},{"type":42,"tag":43,"props":1944,"children":1945},{},[1946,1948,1954,1956,1962,1963,1969,1970,1976,1977,1983,1985,1991,1992,1998,1999,2005,2006,2012],{"type":47,"value":1947},"Swap the ",{"type":42,"tag":50,"props":1949,"children":1951},{"className":1950},[],[1952],{"type":47,"value":1953},"statement",{"type":47,"value":1955}," for any of: ",{"type":42,"tag":50,"props":1957,"children":1959},{"className":1958},[],[1960],{"type":47,"value":1961},"SHOW SCHEMAS IN DATABASE MY_DB",{"type":47,"value":88},{"type":42,"tag":50,"props":1964,"children":1966},{"className":1965},[],[1967],{"type":47,"value":1968},"SHOW TABLES IN SCHEMA MY_DB.PUBLIC",{"type":47,"value":1765},{"type":42,"tag":50,"props":1971,"children":1973},{"className":1972},[],[1974],{"type":47,"value":1975},"DESCRIBE TABLE MY_DB.PUBLIC.EVENTS",{"type":47,"value":88},{"type":42,"tag":50,"props":1978,"children":1980},{"className":1979},[],[1981],{"type":47,"value":1982},"SHOW WAREHOUSES LIKE 'MY_WH'",{"type":47,"value":1984}," (column 2 = state: ",{"type":42,"tag":50,"props":1986,"children":1988},{"className":1987},[],[1989],{"type":47,"value":1990},"STARTED",{"type":47,"value":985},{"type":42,"tag":50,"props":1993,"children":1995},{"className":1994},[],[1996],{"type":47,"value":1997},"SUSPENDED",{"type":47,"value":985},{"type":42,"tag":50,"props":2000,"children":2002},{"className":2001},[],[2003],{"type":47,"value":2004},"RESUMING",{"type":47,"value":985},{"type":42,"tag":50,"props":2007,"children":2009},{"className":2008},[],[2010],{"type":47,"value":2011},"SUSPENDING",{"type":47,"value":96},{"type":42,"tag":43,"props":2014,"children":2015},{},[2016,2018,2023,2025,2031,2033,2039],{"type":47,"value":2017},"For predictable column sets across versions, query ",{"type":42,"tag":50,"props":2019,"children":2021},{"className":2020},[],[2022],{"type":47,"value":94},{"type":47,"value":2024}," instead — e.g.\n",{"type":42,"tag":50,"props":2026,"children":2028},{"className":2027},[],[2029],{"type":47,"value":2030},"SELECT table_name, row_count, bytes FROM my_db.information_schema.tables WHERE table_schema='PUBLIC'",{"type":47,"value":2032},"\nor ",{"type":42,"tag":50,"props":2034,"children":2036},{"className":2035},[],[2037],{"type":47,"value":2038},"SELECT column_name, data_type, is_nullable FROM my_db.information_schema.columns WHERE table_schema='PUBLIC' AND table_name='EVENTS' ORDER BY ordinal_position",{"type":47,"value":152},{"type":42,"tag":43,"props":2041,"children":2042},{},[2043,2045,2051,2053,2058,2060,2066],{"type":47,"value":2044},"To label rows by column name, zip ",{"type":42,"tag":50,"props":2046,"children":2048},{"className":2047},[],[2049],{"type":47,"value":2050},"resultSetMetaData.rowType[].name",{"type":47,"value":2052}," with each ",{"type":42,"tag":50,"props":2054,"children":2056},{"className":2055},[],[2057],{"type":47,"value":1219},{"type":47,"value":2059}," row:\n",{"type":42,"tag":50,"props":2061,"children":2063},{"className":2062},[],[2064],{"type":47,"value":2065},"jq '[.resultSetMetaData.rowType[]?.name] as $c | .data[] | [$c,.] | transpose | map({key:.[0],value:.[1]}) | from_entries'",{"type":47,"value":152},{"type":42,"tag":98,"props":2068,"children":2070},{"id":2069},"pagination",[2071],{"type":47,"value":2072},"Pagination",{"type":42,"tag":43,"props":2074,"children":2075},{},[2076,2078,2082,2084,2090,2092,2098],{"type":47,"value":2077},"Pagination is ",{"type":42,"tag":59,"props":2079,"children":2080},{},[2081],{"type":47,"value":78},{"type":47,"value":2083},", not cursors. ",{"type":42,"tag":50,"props":2085,"children":2087},{"className":2086},[],[2088],{"type":47,"value":2089},"resultSetMetaData.partitionInfo",{"type":47,"value":2091}," is an array of\n",{"type":42,"tag":50,"props":2093,"children":2095},{"className":2094},[],[2096],{"type":47,"value":2097},"{\"rowCount\", \"uncompressedSize\"}",{"type":47,"value":2099}," entries; loop indices, no next-token. Each partition is bounded\nto keep response sizes manageable (roughly a few thousand rows or ~10 MB uncompressed).",{"type":42,"tag":98,"props":2101,"children":2103},{"id":2102},"rate-limits",[2104],{"type":47,"value":2105},"Rate limits",{"type":42,"tag":43,"props":2107,"children":2108},{},[2109],{"type":47,"value":2110},"Snowflake doesn't publish a fixed requests-per-second cap on the SQL API. The limits you actually\nhit are:",{"type":42,"tag":796,"props":2112,"children":2113},{},[2114,2148,2170],{"type":42,"tag":800,"props":2115,"children":2116},{},[2117,2122,2124,2130,2132,2138,2140,2146],{"type":42,"tag":59,"props":2118,"children":2119},{},[2120],{"type":47,"value":2121},"Concurrent statements per warehouse",{"type":47,"value":2123}," (",{"type":42,"tag":50,"props":2125,"children":2127},{"className":2126},[],[2128],{"type":47,"value":2129},"MAX_CONCURRENCY_LEVEL",{"type":47,"value":2131},", default 8) — excess queries\nqueue inside Snowflake, not at the HTTP layer, so you won't get a ",{"type":42,"tag":50,"props":2133,"children":2135},{"className":2134},[],[2136],{"type":47,"value":2137},"429",{"type":47,"value":2139},"; they'll just sit in\n",{"type":42,"tag":50,"props":2141,"children":2143},{"className":2142},[],[2144],{"type":47,"value":2145},"QUEUED",{"type":47,"value":2147}," state.",{"type":42,"tag":800,"props":2149,"children":2150},{},[2151,2160,2162,2168],{"type":42,"tag":59,"props":2152,"children":2153},{},[2154],{"type":42,"tag":50,"props":2155,"children":2157},{"className":2156},[],[2158],{"type":47,"value":2159},"429 Too Many Requests",{"type":47,"value":2161}," does happen if you hammer the poll endpoint. Back off and respect\n",{"type":42,"tag":50,"props":2163,"children":2165},{"className":2164},[],[2166],{"type":47,"value":2167},"Retry-After",{"type":47,"value":2169}," if present.",{"type":42,"tag":800,"props":2171,"children":2172},{},[2173,2178,2180,2185],{"type":42,"tag":59,"props":2174,"children":2175},{},[2176],{"type":47,"value":2177},"Credential lifetime",{"type":47,"value":2179}," — the runtime supplies and renews the credential. A persistent ",{"type":42,"tag":50,"props":2181,"children":2183},{"className":2182},[],[2184],{"type":47,"value":114},{"type":47,"value":2186}," means\nthe configured credential needs fixing — report it rather than trying to re-authenticate.",{"type":42,"tag":43,"props":2188,"children":2189},{},[2190,2192,2197,2199,2205],{"type":47,"value":2191},"Poll with a ",{"type":42,"tag":50,"props":2193,"children":2195},{"className":2194},[],[2196],{"type":47,"value":1082},{"type":47,"value":2198},", not a hot loop — and keep ",{"type":42,"tag":50,"props":2200,"children":2202},{"className":2201},[],[2203],{"type":47,"value":2204},"timeout",{"type":47,"value":2206}," in the POST reasonably high so most queries\nreturn inline without polling at all.",{"type":42,"tag":98,"props":2208,"children":2210},{"id":2209},"error-handling",[2211],{"type":47,"value":2212},"Error handling",{"type":42,"tag":43,"props":2214,"children":2215},{},[2216,2218,2223,2224,2229,2230,2235,2237,2243,2245,2250,2252,2258],{"type":47,"value":2217},"Snowflake returns the HTTP status plus a JSON body with ",{"type":42,"tag":50,"props":2219,"children":2221},{"className":2220},[],[2222],{"type":47,"value":50},{"type":47,"value":1765},{"type":42,"tag":50,"props":2225,"children":2227},{"className":2226},[],[2228],{"type":47,"value":991},{"type":47,"value":1765},{"type":42,"tag":50,"props":2231,"children":2233},{"className":2232},[],[2234],{"type":47,"value":998},{"type":47,"value":2236},", and\n",{"type":42,"tag":50,"props":2238,"children":2240},{"className":2239},[],[2241],{"type":47,"value":2242},"statementHandle",{"type":47,"value":2244},". The ",{"type":42,"tag":50,"props":2246,"children":2248},{"className":2247},[],[2249],{"type":47,"value":50},{"type":47,"value":2251}," is a Snowflake-specific numeric string (e.g. ",{"type":42,"tag":50,"props":2253,"children":2255},{"className":2254},[],[2256],{"type":47,"value":2257},"\"390302\"",{"type":47,"value":96},{"type":42,"tag":796,"props":2260,"children":2261},{},[2262,2289,2323,2373,2393,2406,2434,2460,2479],{"type":42,"tag":800,"props":2263,"children":2264},{},[2265,2273,2275,2280,2282,2287],{"type":42,"tag":59,"props":2266,"children":2267},{},[2268],{"type":42,"tag":50,"props":2269,"children":2271},{"className":2270},[],[2272],{"type":47,"value":1090},{"type":47,"value":2274}," — Finished, results inline. Read ",{"type":42,"tag":50,"props":2276,"children":2278},{"className":2277},[],[2279],{"type":47,"value":1219},{"type":47,"value":2281},". Check ",{"type":42,"tag":50,"props":2283,"children":2285},{"className":2284},[],[2286],{"type":47,"value":2089},{"type":47,"value":2288}," for more pages.",{"type":42,"tag":800,"props":2290,"children":2291},{},[2292,2300,2302,2308,2310,2316,2317,2322],{"type":42,"tag":59,"props":2293,"children":2294},{},[2295],{"type":42,"tag":50,"props":2296,"children":2298},{"className":2297},[],[2299],{"type":47,"value":1074},{"type":47,"value":2301}," — Still running (or submitted async). Poll ",{"type":42,"tag":50,"props":2303,"children":2305},{"className":2304},[],[2306],{"type":47,"value":2307},"GET ...\u002Fstatements\u002F{handle}",{"type":47,"value":2309},". Body carries ",{"type":42,"tag":50,"props":2311,"children":2313},{"className":2312},[],[2314],{"type":47,"value":2315},"statementStatusUrl",{"type":47,"value":1417},{"type":42,"tag":50,"props":2318,"children":2320},{"className":2319},[],[2321],{"type":47,"value":998},{"type":47,"value":152},{"type":42,"tag":800,"props":2324,"children":2325},{},[2326,2335,2337,2342,2344,2350,2352,2358,2359,2365,2367,2372],{"type":42,"tag":59,"props":2327,"children":2328},{},[2329],{"type":42,"tag":50,"props":2330,"children":2332},{"className":2331},[],[2333],{"type":47,"value":2334},"400",{"type":47,"value":2336}," — Malformed request. Read ",{"type":42,"tag":50,"props":2338,"children":2340},{"className":2339},[],[2341],{"type":47,"value":998},{"type":47,"value":2343},". Common causes: missing ",{"type":42,"tag":50,"props":2345,"children":2347},{"className":2346},[],[2348],{"type":47,"value":2349},"Content-Type",{"type":47,"value":2351},", bad JSON, wrong binding index (bindings are 1-indexed strings: ",{"type":42,"tag":50,"props":2353,"children":2355},{"className":2354},[],[2356],{"type":47,"value":2357},"\"1\"",{"type":47,"value":1765},{"type":42,"tag":50,"props":2360,"children":2362},{"className":2361},[],[2363],{"type":47,"value":2364},"\"2\"",{"type":47,"value":2366},", one per ",{"type":42,"tag":50,"props":2368,"children":2370},{"className":2369},[],[2371],{"type":47,"value":898},{"type":47,"value":96},{"type":42,"tag":800,"props":2374,"children":2375},{},[2376,2384,2386,2391],{"type":42,"tag":59,"props":2377,"children":2378},{},[2379],{"type":42,"tag":50,"props":2380,"children":2382},{"className":2381},[],[2383],{"type":47,"value":114},{"type":47,"value":2385}," — Credential missing or rejected. Check ",{"type":42,"tag":50,"props":2387,"children":2389},{"className":2388},[],[2390],{"type":47,"value":243},{"type":47,"value":2392}," points at the right account and the token\u002Ftype headers are present. If it persists, the credential isn't configured for this workspace — report it.",{"type":42,"tag":800,"props":2394,"children":2395},{},[2396,2404],{"type":42,"tag":59,"props":2397,"children":2398},{},[2399],{"type":42,"tag":50,"props":2400,"children":2402},{"className":2401},[],[2403],{"type":47,"value":1304},{"type":47,"value":2405}," — Handle not found. Results are retained 24 h; past that the handle is gone. Or the handle is wrong.",{"type":42,"tag":800,"props":2407,"children":2408},{},[2409,2418,2420,2425,2427,2432],{"type":42,"tag":59,"props":2410,"children":2411},{},[2412],{"type":42,"tag":50,"props":2413,"children":2415},{"className":2414},[],[2416],{"type":47,"value":2417},"408",{"type":47,"value":2419}," — Statement exceeded the request's ",{"type":42,"tag":50,"props":2421,"children":2423},{"className":2422},[],[2424],{"type":47,"value":2204},{"type":47,"value":2426}," and was cancelled. Raise (or omit) ",{"type":42,"tag":50,"props":2428,"children":2430},{"className":2429},[],[2431],{"type":47,"value":2204},{"type":47,"value":2433}," and resubmit.",{"type":42,"tag":800,"props":2435,"children":2436},{},[2437,2445,2447,2452,2453,2458],{"type":42,"tag":59,"props":2438,"children":2439},{},[2440],{"type":42,"tag":50,"props":2441,"children":2443},{"className":2442},[],[2444],{"type":47,"value":1098},{"type":47,"value":2446}," — Statement failed (SQL error, cancelled). ",{"type":42,"tag":50,"props":2448,"children":2450},{"className":2449},[],[2451],{"type":47,"value":998},{"type":47,"value":1417},{"type":42,"tag":50,"props":2454,"children":2456},{"className":2455},[],[2457],{"type":47,"value":991},{"type":47,"value":2459}," carry the SQL error. Don't retry blindly.",{"type":42,"tag":800,"props":2461,"children":2462},{},[2463,2471,2473,2478],{"type":42,"tag":59,"props":2464,"children":2465},{},[2466],{"type":42,"tag":50,"props":2467,"children":2469},{"className":2468},[],[2470],{"type":47,"value":2137},{"type":47,"value":2472}," — Rate limited. Back off per ",{"type":42,"tag":50,"props":2474,"children":2476},{"className":2475},[],[2477],{"type":47,"value":2167},{"type":47,"value":152},{"type":42,"tag":800,"props":2480,"children":2481},{},[2482,2498,2500,2505,2506,2511],{"type":42,"tag":59,"props":2483,"children":2484},{},[2485,2491,2492],{"type":42,"tag":50,"props":2486,"children":2488},{"className":2487},[],[2489],{"type":47,"value":2490},"503",{"type":47,"value":818},{"type":42,"tag":50,"props":2493,"children":2495},{"className":2494},[],[2496],{"type":47,"value":2497},"504",{"type":47,"value":2499}," — Transient. Retry with backoff. For POSTs, retry with the same ",{"type":42,"tag":50,"props":2501,"children":2503},{"className":2502},[],[2504],{"type":47,"value":1049},{"type":47,"value":1028},{"type":42,"tag":50,"props":2507,"children":2509},{"className":2508},[],[2510],{"type":47,"value":1423},{"type":47,"value":2512}," to stay idempotent.",{"type":42,"tag":43,"props":2514,"children":2515},{},[2516],{"type":47,"value":2517},"Gotchas worth calling out:",{"type":42,"tag":796,"props":2519,"children":2520},{},[2521,2554,2599,2659],{"type":42,"tag":800,"props":2522,"children":2523},{},[2524,2529,2531,2537,2538,2544,2546,2552],{"type":42,"tag":59,"props":2525,"children":2526},{},[2527],{"type":47,"value":2528},"Everything is uppercase by default.",{"type":47,"value":2530}," Unquoted identifiers resolve uppercased.\n",{"type":42,"tag":50,"props":2532,"children":2534},{"className":2533},[],[2535],{"type":47,"value":2536},"SHOW TABLES IN schema my_db.public",{"type":47,"value":1417},{"type":42,"tag":50,"props":2539,"children":2541},{"className":2540},[],[2542],{"type":47,"value":2543},"MY_DB.PUBLIC",{"type":47,"value":2545}," are the same; ",{"type":42,"tag":50,"props":2547,"children":2549},{"className":2548},[],[2550],{"type":47,"value":2551},"\"my_db\".\"public\"",{"type":47,"value":2553}," is not.",{"type":42,"tag":800,"props":2555,"children":2556},{},[2557,2567,2569,2574,2576,2582,2584,2590,2592,2597],{"type":42,"tag":59,"props":2558,"children":2559},{},[2560,2562],{"type":47,"value":2561},"Bind placeholders in the SQL are ",{"type":42,"tag":50,"props":2563,"children":2565},{"className":2564},[],[2566],{"type":47,"value":898},{"type":47,"value":2568},", and ",{"type":42,"tag":59,"props":2570,"children":2571},{},[2572],{"type":47,"value":2573},"bindings are a 1-indexed string-keyed object",{"type":47,"value":2575},",\nnot an array: ",{"type":42,"tag":50,"props":2577,"children":2579},{"className":2578},[],[2580],{"type":47,"value":2581},"{\"1\": {...}, \"2\": {...}}",{"type":47,"value":2583},". Values are always strings regardless of ",{"type":42,"tag":50,"props":2585,"children":2587},{"className":2586},[],[2588],{"type":47,"value":2589},"type",{"type":47,"value":2591},". See\n",{"type":42,"tag":50,"props":2593,"children":2595},{"className":2594},[],[2596],{"type":47,"value":906},{"type":47,"value":2598}," (Bindings) for the type list and array-binding form.",{"type":42,"tag":800,"props":2600,"children":2601},{},[2602,2612,2614,2619,2621,2627,2629,2635,2636,2642,2644,2650,2652,2657],{"type":42,"tag":59,"props":2603,"children":2604},{},[2605,2610],{"type":42,"tag":50,"props":2606,"children":2608},{"className":2607},[],[2609],{"type":47,"value":1219},{"type":47,"value":2611}," values are all strings",{"type":47,"value":2613},", and dates\u002Ftimestamps are ",{"type":42,"tag":59,"props":2615,"children":2616},{},[2617],{"type":47,"value":2618},"not",{"type":47,"value":2620}," ISO — ",{"type":42,"tag":50,"props":2622,"children":2624},{"className":2623},[],[2625],{"type":47,"value":2626},"date",{"type":47,"value":2628}," is days since\nepoch (",{"type":42,"tag":50,"props":2630,"children":2632},{"className":2631},[],[2633],{"type":47,"value":2634},"\"18262\"",{"type":47,"value":1084},{"type":42,"tag":50,"props":2637,"children":2639},{"className":2638},[],[2640],{"type":47,"value":2641},"timestamp_*",{"type":47,"value":2643}," is epoch seconds with a 9-decimal fraction. Parse against\n",{"type":42,"tag":50,"props":2645,"children":2647},{"className":2646},[],[2648],{"type":47,"value":2649},"resultSetMetaData.rowType[].type",{"type":47,"value":2651},"; the full per-type encoding table is in ",{"type":42,"tag":50,"props":2653,"children":2655},{"className":2654},[],[2656],{"type":47,"value":906},{"type":47,"value":2658},"\n(Result metadata & partitions).",{"type":42,"tag":800,"props":2660,"children":2661},{},[2662,2667,2669,2674,2676,2681,2683,2689],{"type":42,"tag":59,"props":2663,"children":2664},{},[2665],{"type":47,"value":2666},"Warehouse is required for anything that scans data.",{"type":47,"value":2668}," Metadata-only statements (most ",{"type":42,"tag":50,"props":2670,"children":2672},{"className":2671},[],[2673],{"type":47,"value":721},{"type":47,"value":2675},"\ncommands, ",{"type":42,"tag":50,"props":2677,"children":2679},{"className":2678},[],[2680],{"type":47,"value":729},{"type":47,"value":2682},") don't need one, but ",{"type":42,"tag":50,"props":2684,"children":2686},{"className":2685},[],[2687],{"type":47,"value":2688},"SELECT",{"type":47,"value":2690}," does. A missing warehouse fails with a clear\nmessage. Queries on a suspended warehouse auto-resume it (startup delay), and each resume incurs a\n60 s billing minimum (per warehouse start, not per query) — batch small lookups where you can.",{"type":42,"tag":98,"props":2692,"children":2694},{"id":2693},"going-deeper",[2695],{"type":47,"value":2696},"Going deeper",{"type":42,"tag":43,"props":2698,"children":2699},{},[2700,2705,2707,2713,2715,2721,2723,2729],{"type":42,"tag":50,"props":2701,"children":2703},{"className":2702},[],[2704],{"type":47,"value":906},{"type":47,"value":2706}," has the fuller reference — the complete request body fields, the\n",{"type":42,"tag":50,"props":2708,"children":2710},{"className":2709},[],[2711],{"type":47,"value":2712},"resultSetMetaData",{"type":47,"value":2714}," shape, all the ",{"type":42,"tag":50,"props":2716,"children":2718},{"className":2717},[],[2719],{"type":47,"value":2720},"parameters",{"type":47,"value":2722}," session options, multi-statement and child-handle\nmechanics, the monitoring endpoints (",{"type":42,"tag":50,"props":2724,"children":2726},{"className":2725},[],[2727],{"type":47,"value":2728},"\u002Fapi\u002Fv2\u002Fstatements\u002F{handle}",{"type":47,"value":2730}," status values), and notes on\nbinding types and VARIANT\u002FARRAY handling. Read it when you need the exact shape for something not\ncovered above.",{"type":42,"tag":2732,"props":2733,"children":2734},"style",{},[2735],{"type":47,"value":2736},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2738,"total":2849},[2739,2755,2768,2787,2803,2822,2836],{"slug":2740,"name":2740,"fn":2741,"description":2742,"org":2743,"tags":2744,"stars":26,"repoUrl":27,"updatedAt":2754},"asana-api","manage Asana tasks and projects","Read and manage Asana tasks, projects, sections, comments, and workspaces. Use this whenever the user wants to list or search tasks, create or update a task, complete a task, comment on a task, move tasks between projects or sections, look up a project or workspace, or ask \"what's on my Asana list\" — even if they don't say \"API\". Also use it for any app.asana.com URL or an Asana task\u002Fproject gid. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2745,2748,2751],{"name":2746,"slug":2747,"type":16},"Productivity","productivity",{"name":2749,"slug":2750,"type":16},"Project Management","project-management",{"name":2752,"slug":2753,"type":16},"Task Management","task-management","2026-06-24T07:44:51.70496",{"slug":2756,"name":2756,"fn":2757,"description":2758,"org":2759,"tags":2760,"stars":26,"repoUrl":27,"updatedAt":2767},"bigquery-api","run SQL queries against BigQuery","Run SQL against Google BigQuery and browse its catalog — submit queries (sync or async), poll job status, page through results, list datasets\u002Ftables, and read table schemas. Use this whenever the user wants to query a BigQuery table, ask \"what's in this dataset\", check a BigQuery job's status, or mentions bigquery.googleapis.com or a `project.dataset.table` path. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2761,2762,2763,2766],{"name":14,"slug":15,"type":16},{"name":18,"slug":19,"type":16},{"name":2764,"slug":2765,"type":16},"Google Cloud","google-cloud",{"name":21,"slug":22,"type":16},"2026-06-24T07:45:14.797877",{"slug":2769,"name":2769,"fn":2770,"description":2771,"org":2772,"tags":2773,"stars":26,"repoUrl":27,"updatedAt":2786},"config-guide","configure Claude agent settings and scopes","Reference guide for configuring @Claude agents — agents, agent scopes, identity profiles, presets, connections, rules, GitHub repositories, and custom instructions. Explains the inheritance model and configuration best practices.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2774,2777,2780,2783],{"name":2775,"slug":2776,"type":16},"Agents","agents",{"name":2778,"slug":2779,"type":16},"Claude API","claude-api",{"name":2781,"slug":2782,"type":16},"Configuration","configuration",{"name":2784,"slug":2785,"type":16},"GitHub","github","2026-06-25T07:41:36.617524",{"slug":2788,"name":2788,"fn":2789,"description":2790,"org":2791,"tags":2792,"stars":26,"repoUrl":27,"updatedAt":2802},"confluence-api","manage Confluence Cloud content","Read, search, and manage Confluence Cloud pages, spaces, blog posts, comments, attachments, and labels. Use this whenever the user wants to find a page, read a doc, search the wiki with CQL, create or update a page, add a comment, list pages in a space, pull an attachment, or ask \"what does the wiki say about X\" — even if they don't say \"API\". Also use it for any *.atlassian.net\u002Fwiki URL, or a CQL string when the context is wiki content rather than tickets. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2793,2796,2799],{"name":2794,"slug":2795,"type":16},"Confluence","confluence",{"name":2797,"slug":2798,"type":16},"Documentation","documentation",{"name":2800,"slug":2801,"type":16},"Knowledge Management","knowledge-management","2026-06-25T07:41:43.531982",{"slug":2804,"name":2804,"fn":2805,"description":2806,"org":2807,"tags":2808,"stars":26,"repoUrl":27,"updatedAt":2821},"datadog-api","manage Datadog monitoring and telemetry","Query and manage Datadog monitoring data — logs, metrics, monitors, dashboards, events, SLOs, traces, and incidents. Use this whenever the user wants to search logs, look at a metric, check which monitors are alerting, investigate a trace, pull SLO status, mute an alert, or ask \"what's happening in Datadog\" — even if they don't say \"API\". Also use it for any URL under *.datadoghq.com. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2809,2812,2815,2818],{"name":2810,"slug":2811,"type":16},"API Development","api-development",{"name":2813,"slug":2814,"type":16},"Datadog","datadog",{"name":2816,"slug":2817,"type":16},"Monitoring","monitoring",{"name":2819,"slug":2820,"type":16},"Observability","observability","2026-06-24T07:46:42.266372",{"slug":2823,"name":2823,"fn":2824,"description":2825,"org":2826,"tags":2827,"stars":26,"repoUrl":27,"updatedAt":2835},"debug-plugins","diagnose Claude plugin loading failures","Diagnose why a plugin or skill configured in @Claude admin settings isn't loading. Checks mount directories, the Claude Code launch command, and startup logs from inside the running container, then explains what failed and how to fix it.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2828,2829,2832],{"name":2778,"slug":2779,"type":16},{"name":2830,"slug":2831,"type":16},"Debugging","debugging",{"name":2833,"slug":2834,"type":16},"Plugin Development","plugin-development","2026-06-24T07:46:32.792809",{"slug":2837,"name":2837,"fn":2838,"description":2839,"org":2840,"tags":2841,"stars":26,"repoUrl":27,"updatedAt":2848},"enterprise-search","search company enterprise knowledge index","Search the company's enterprise knowledge index. Use this FIRST when starting any task that touches company-specific context - projects, people, policies, internal docs, prior decisions - before searching individual sources like Drive, Slack, or Jira directly. Also use it when the user asks \"do we have a doc about X\", \"what's our policy on Y\", or references internal initiatives by name. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2842,2844,2845],{"name":2843,"slug":2837,"type":16},"Enterprise Search",{"name":2800,"slug":2801,"type":16},{"name":2846,"slug":2847,"type":16},"Research","research","2026-06-24T07:46:40.641837",18,{"items":2851,"total":3030},[2852,2873,2887,2899,2914,2925,2946,2966,2980,2993,3001,3014],{"slug":2853,"name":2853,"fn":2854,"description":2855,"org":2856,"tags":2857,"stars":2870,"repoUrl":2871,"updatedAt":2872},"algorithmic-art","create algorithmic art with p5.js","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2858,2861,2864,2867],{"name":2859,"slug":2860,"type":16},"Creative","creative",{"name":2862,"slug":2863,"type":16},"Design","design",{"name":2865,"slug":2866,"type":16},"Generative Art","generative-art",{"name":2868,"slug":2869,"type":16},"JavaScript","javascript",161831,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fskills","2026-04-06T17:56:15.455818",{"slug":2874,"name":2874,"fn":2875,"description":2876,"org":2877,"tags":2878,"stars":2870,"repoUrl":2871,"updatedAt":2886},"brand-guidelines","apply Anthropic brand colors and typography","Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2879,2882,2883],{"name":2880,"slug":2881,"type":16},"Branding","branding",{"name":2862,"slug":2863,"type":16},{"name":2884,"slug":2885,"type":16},"Typography","typography","2026-04-06T17:56:05.042852",{"slug":2888,"name":2888,"fn":2889,"description":2890,"org":2891,"tags":2892,"stars":2870,"repoUrl":2871,"updatedAt":2898},"canvas-design","create posters and visual art as PNG or PDF","Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2893,2894,2895],{"name":2859,"slug":2860,"type":16},{"name":2862,"slug":2863,"type":16},{"name":2896,"slug":2897,"type":16},"PDF","pdf","2026-04-06T17:56:03.794732",{"slug":2779,"name":2779,"fn":2900,"description":2901,"org":2902,"tags":2903,"stars":2870,"repoUrl":2871,"updatedAt":2913},"build apps with the Claude API","Reference for the Claude API \u002F Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration.\nTRIGGER — read BEFORE opening the target file; don't skip because it \"looks like a one-liner\" — whenever: the prompt names Claude\u002FAnthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing\u002Fmodel choice\u002Flimits\u002Fcaching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent\u002FMCP\u002Ftool-definition\u002Fmulti-agent\u002FRAG\u002FLLM-judge\u002Fcomputer-use; generate\u002Fsummarize\u002Fextract\u002Fclassify\u002Frewrite\u002Fconverse over NL; debugging refusals\u002Fcutoffs\u002Fstreaming\u002Ftool-calls\u002Ftokens).\nSKIP only when another provider is being worked on (overrides all triggers): OpenAI\u002FGPT\u002FGemini\u002FLlama\u002FMistral\u002FCohere\u002FOllama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2904,2905,2906,2909,2910],{"name":2775,"slug":2776,"type":16},{"name":9,"slug":8,"type":16},{"name":2907,"slug":2908,"type":16},"Anthropic SDK","anthropic-sdk",{"name":2778,"slug":2779,"type":16},{"name":2911,"slug":2912,"type":16},"LLM","llm","2026-07-28T05:36:08.213335",{"slug":2915,"name":2915,"fn":2916,"description":2917,"org":2918,"tags":2919,"stars":2870,"repoUrl":2871,"updatedAt":2924},"doc-coauthoring","co-author documentation and technical specs","Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2920,2921],{"name":2797,"slug":2798,"type":16},{"name":2922,"slug":2923,"type":16},"Technical Writing","technical-writing","2026-04-06T17:56:14.18897",{"slug":2926,"name":2926,"fn":2927,"description":2928,"org":2929,"tags":2930,"stars":2870,"repoUrl":2871,"updatedAt":2945},"docx","create and edit Word documents","Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2931,2934,2936,2939,2942],{"name":2932,"slug":2933,"type":16},"Documents","documents",{"name":2935,"slug":2926,"type":16},"DOCX",{"name":2937,"slug":2938,"type":16},"Office","office",{"name":2940,"slug":2941,"type":16},"Templates","templates",{"name":2943,"slug":2944,"type":16},"Word","word","2026-07-18T05:16:23.136271",{"slug":2947,"name":2947,"fn":2948,"description":2949,"org":2950,"tags":2951,"stars":2870,"repoUrl":2871,"updatedAt":2965},"frontend-design","design production-grade frontend interfaces","Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2952,2953,2956,2959,2962],{"name":2862,"slug":2863,"type":16},{"name":2954,"slug":2955,"type":16},"Frontend","frontend",{"name":2957,"slug":2958,"type":16},"React","react",{"name":2960,"slug":2961,"type":16},"Tailwind CSS","tailwind-css",{"name":2963,"slug":2964,"type":16},"UI Components","ui-components","2026-04-06T17:56:16.723469",{"slug":2967,"name":2967,"fn":2968,"description":2969,"org":2970,"tags":2971,"stars":2870,"repoUrl":2871,"updatedAt":2979},"internal-comms","write internal company communications","A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2972,2975,2976],{"name":2973,"slug":2974,"type":16},"Communications","communications",{"name":2940,"slug":2941,"type":16},{"name":2977,"slug":2978,"type":16},"Writing","writing","2026-04-06T17:56:20.695522",{"slug":2981,"name":2981,"fn":2982,"description":2983,"org":2984,"tags":2985,"stars":2870,"repoUrl":2871,"updatedAt":2992},"mcp-builder","build MCP servers","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node\u002FTypeScript (MCP SDK).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2986,2987,2988,2989],{"name":2775,"slug":2776,"type":16},{"name":2810,"slug":2811,"type":16},{"name":2911,"slug":2912,"type":16},{"name":2990,"slug":2991,"type":16},"MCP","mcp","2026-04-06T17:56:10.357665",{"slug":2897,"name":2897,"fn":2994,"description":2995,"org":2996,"tags":2997,"stars":2870,"repoUrl":2871,"updatedAt":3000},"read edit and manipulate PDF files","Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text\u002Ftables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting\u002Fdecrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2998,2999],{"name":2932,"slug":2933,"type":16},{"name":2896,"slug":2897,"type":16},"2026-04-06T17:56:02.483316",{"slug":3002,"name":3002,"fn":3003,"description":3004,"org":3005,"tags":3006,"stars":2870,"repoUrl":2871,"updatedAt":3013},"pptx","create and edit PowerPoint presentations","Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3007,3010],{"name":3008,"slug":3009,"type":16},"PowerPoint","powerpoint",{"name":3011,"slug":3012,"type":16},"Presentations","presentations","2026-07-18T05:16:24.1471",{"slug":3015,"name":3015,"fn":3016,"description":3017,"org":3018,"tags":3019,"stars":2870,"repoUrl":2871,"updatedAt":3029},"skill-creator","create and optimize agent skills","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3020,3021,3022,3025,3028],{"name":2775,"slug":2776,"type":16},{"name":2797,"slug":2798,"type":16},{"name":3023,"slug":3024,"type":16},"Evals","evals",{"name":3026,"slug":3027,"type":16},"Performance","performance",{"name":2922,"slug":2923,"type":16},"2026-04-19T06:45:40.804",490]