PageSourceSearch

https://stackql.io/assets/js/f46c90ff.e2505ba0.js

js stackql.io collected 2026-09-25 21:05:59 UTC 7,516 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkstackql_io||=[]).push([[15243],{66163(e,a,n){n.r(a),n.d(a,{default:()=>o,metadata:()=>t});var t=n(29443),s=n(74848),r=n(28453);const i={authorsImageUrls:[void 0]};function l(e){const a={a:"a",code:"code",p:"p",pre:"pre",strong:"strong",...(0,r.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)(a.p,{children:["The ",(0,s.jsx)(a.strong,{children:(0,s.jsx)(a.code,{children:"anthropic"})})," provider for ",(0,s.jsx)(a.a,{href:"https://github.com/stackql/stackql",children:(0,s.jsx)(a.strong,{children:(0,s.jsx)(a.code,{children:"stackql"})})})," is now available in the dev stackql provider registry. The ",(0,s.jsx)(a.code,{children:"anthropic"})," provider for ",(0,s.jsx)(a.code,{children:"stackql"})," includes services for interacting with Claude models via the Messages API. To get started download ",(0,s.jsx)(a.a,{href:"/install",children:(0,s.jsx)(a.code,{children:"stackql"})}),", set the ",(0,s.jsx)(a.code,{children:"ANTHROPIC_API_KEY"})," environment variable and use the dev registry as shown here:"]}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-bash",children:'export DEV_REG="{ \\"url\\": \\"https://registry-dev.stackql.app/providers\\" }"\r\n./stackql --registry="${DEV_REG}" shell\n'})}),"\n",(0,s.jsxs)(a.p,{children:["Then pull the ",(0,s.jsx)(a.code,{children:"anthropic"})," provider using:"]}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"REGISTRY PULL anthropic;\n"})}),"\n",(0,s.jsxs)(a.p,{children:["Now you can run some queries. Here's an example running inference against Claude using the Messages API - the request parameters are supplied in the ",(0,s.jsx)(a.code,{children:"WHERE"})," clause and the response is projected using ",(0,s.jsx)(a.code,{children:"JSON_EXTRACT"}),":"]}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"SELECT\r\n  id,\r\n  model,\r\n  stop_reason,\r\n  JSON_EXTRACT(content, '$[0].text') AS assistant_message,\r\n  JSON_EXTRACT(usage, '$.output_tokens') AS output_tokens\r\nFROM anthropic.messages.messages\r\nWHERE model = 'claude-sonnet-5'\r\nAND max_tokens = 1024\r\nAND messages = '[{\"role\": \"user\", \"content\": \"What is StackQL?\"}]';\r\n|------------------------------|-----------------|-------------|-------------------------------------------------------------|---------------|\r\n|              id              |      model      | stop_reason |                      assistant_message                      | output_tokens |\r\n|------------------------------|-----------------|-------------|-------------------------------------------------------------|---------------|\r\n| msg_01MLTLVY6XCTT2cNBeFeJzfj | claude-sonnet-5 | end_turn    | StackQL is a SQL-based framework that lets you query and    |            48 |\r\n|                              |                 |             | manage cloud and SaaS resources using familiar SQL syntax.  |               |\r\n|------------------------------|-----------------|-------------|-------------------------------------------------------------|---------------|\n"})}),"\n",(0,s.jsxs)(a.p,{children:["You can also discover which models are available and their capabilities using the ",(0,s.jsx)(a.code,{children:"vw_model_capabilities"})," view:"]}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"SELECT id, display_name, thinking, adaptive, xhigh, max_input_tokens, max_tokens\r\nFROM anthropic.models.vw_model_capabilities;\r\n|-------------------|-----------------|----------|----------|-------|------------------|------------|\r\n|        id         |  display_name   | thinking | adaptive | xhigh | max_input_tokens | max_tokens |\r\n|-------------------|-----------------|----------|----------|-------|------------------|------------|\r\n| claude-sonnet-5   | Claude Sonnet 5 | 1        | 1        | 1     |           200000 |      64000 |\r\n| claude-opus-4-8   | Claude Opus 4.8 | 1        | 1        | 1     |           200000 |      32000 |\r\n| claude-haiku-4-5  | Claude Haiku 4.5| 1        | 0        | 0     |           200000 |      64000 |\r\n|-------------------|-----------------|----------|----------|-------|------------------|------------|\n"})}),"\n",(0,s.jsx)(a.p,{children:"Like other language models, Claude's responses are stochastic, so you'll get slightly different responses each time you query."}),"\n",(0,s.jsxs)(a.p,{children:["Let us know what you think! \u2b50 us on ",(0,s.jsx)(a.a,{href:"https://github.com/stackql/stackql",children:(0,s.jsx)(a.strong,{children:"GitHub"})}),"."]})]})}function o(e={}){const{wrapper:a}={...(0,r.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}n.d(a,["assets",0,i,"contentTitle",0,void 0,"frontMatter",0,{slug:"anthropic-
1provider-for-stackql-available",title:"Anthropic Provider for StackQL Available",hide_table_of_contents:!0,authors:["jeffreyaven"],image:"/img/blog/stackql-provider-for-anthropic-released.png",description:"Query and interact with Anthropic Claude using SQL.",keywords:["stackql","anthropic","claude","llms","genai","iac","analytics"],tags:["stackql","anthropic","claude","llms","genai","iac","analytics"]},"toc",0,[]])},28453(e,a,n){n.d(a,{R:()=>i,x:()=>l});var t=n(96540);const s={},r=t.createContext(s);function i(e){const a=t.useContext(r);return t.useMemo(function(){return"function"==typeof e?e(a):{...a,...e}},[a,e])}function l(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),t.createElement(r.Provider,{value:a},e.children)}},29443(e){e.exports=JSON.parse('{"permalink":"/blog/anthropic-provider-for-stackql-available","editUrl":"https://github.com/stackql/stackql.io/edit/main/blog/2024-10-23-anthropic-provider-for-stackql-available.md","source":"@site/blog/2024-10-23-anthropic-provider-for-stackql-available.md","title":"Anthropic Provider for StackQL Available","description":"Query and interact with Anthropic Claude using SQL.","date":"2024-10-23T00:00:00.000Z","tags":[{"inline":true,"label":"stackql","permalink":"/blog/tags/stackql"},{"inline":true,"label":"anthropic","permalink":"/blog/tags/anthropic"},{"inline":true,"label":"claude","permalink":"/blog/tags/claude"},{"inline":true,"label":"llms","permalink":"/blog/tags/llms"},{"inline":true,"label":"genai","permalink":"/blog/tags/genai"},{"inline":true,"label":"iac","permalink":"/blog/tags/iac"},{"inline":true,"label":"analytics","permalink":"/blog/tags/analytics"}],"readingTime":1.38,"hasTruncateMarker":false,"authors":[{"name":"Jeffrey Aven","title":"Technologist and Cloud Consultant","url":"https://www.linkedin.com/in/jeffreyaven/","key":"jeffreyaven","page":null}],"frontMatter":{"slug":"anthropic-provider-for-stackql-available","title":"Anthropic Provider for StackQL Available","hide_table_of_contents":true,"authors":["jeffreyaven"],"image":"/img/blog/stackql-provider-for-anthropic-released.png","description":"Query and interact with Anthropic Claude using SQL.","keywords":["stackql","anthropic","claude","llms","genai","iac","analytics"],"tags":["stackql","anthropic","claude","llms","genai","iac","analytics"]},"unlisted":false,"prevItem":{"title":"Identify Outdated TLS Versions in Azure with StackQL","permalink":"/blog/use-stackql-to-identify-old-tls-versions-for-azure-services"},"nextItem":{"title":"OpenAI Provider for StackQL Available","permalink":"/blog/openai-provider-for-stackql-available"}}')}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.