PageSourceSearch

https://stackql.io/assets/js/96f8a7d7.5b5099d8.js

js stackql.io collected 2026-09-25 21:06:17 UTC 7,591 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkstackql_io||=[]).push([[17935],{34066(e,a,t){t.r(a),t.d(a,{default:()=>l,metadata:()=>r});var r=t(71618),s=t(74848),n=t(28453);const i={authorsImageUrls:[void 0]};function c(e){const a={a:"a",code:"code",h2:"h2",li:"li",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,n.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(a.p,{children:"If you have access to a Databricks workspace, you can run StackQL queries directly from the Databricks Web Terminal using your Databricks identity."}),"\n",(0,s.jsx)(a.h2,{id:"how-it-works",children:"How It Works"}),"\n",(0,s.jsxs)(a.p,{children:["Download the latest release of ",(0,s.jsx)(a.code,{children:"stackql"}),", then run the convenience script included (similar scripts are included for other cloud provider terminals - e.g. AWS Cloud Shell)."]}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-bash",children:"curl -L https://bit.ly/stackql-zip -O && unzip stackql-zip\nsh stackql-databricks-shell.sh\n"})}),"\n",(0,s.jsx)("video",{controls:!0,width:"100%",preload:"metadata",children:(0,s.jsx)("source",{src:"https://pub-690c90d9ca2e4ad09b9455b620bd429f.r2.dev/databricks-stackql-web-terminal-demo.mp4",type:"video/mp4"})}),"\n",(0,s.jsx)(a.h2,{id:"example-queries",children:"Example Queries"}),"\n",(0,s.jsxs)(a.p,{children:["Here are the sample queries run in the video, just change the ",(0,s.jsx)(a.code,{children:"deployment_name"})," for your workspace."]}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.strong,{children:"User entitlements"})}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"SELECT\n  deployment_name,\n  id,\n  userName,\n  displayName,\n  entitlement\nFROM databricks_workspace.iam.vw_user_entitlements\nWHERE deployment_name = 'dbc-74aa95f7-8c7e';\n"})}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.strong,{children:"All workspace settings"})}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"SELECT * FROM\n  databricks_workspace.settings.vw_all_settings\nWHERE deployment_name = 'dbc-74aa95f7-8c7e';\n"})}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.strong,{children:"Tag policies filtered by key prefix"})}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"SELECT\n  tag_key as key,\n  description\nFROM databricks_workspace.tags.tag_policies\nWHERE deployment_name = 'dbc-74aa95f7-8c7e'\nAND tag_key LIKE 'class%';\n"})}),"\n",(0,s.jsx)(a.p,{children:(0,s.jsx)(a.strong,{children:"Catalog count by type"})}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-sql",children:"SELECT\n  catalog_type,\n  COUNT(*) as num_catalogs\nFROM databricks_workspace.catalog.catalogs\nWHERE deployment_name = 'dbc-74aa95f7-8c7e'\nGROUP BY catalog_type;\n"})}),"\n",(0,s.jsx)(a.h2,{id:"provider-coverage",children:"Provider Coverage"}),"\n",(0,s.jsxs)(a.p,{children:["The ",(0,s.jsx)(a.code,{children:"databricks_workspace"})," provider covers workspace related services, the ",(0,s.jsx)(a.code,{children:"databricks_account"})," provider covers account-level operations including provisioning, billing, and account IAM."]}),"\n",(0,s.jsx)(a.p,{children:"The web terminal flow covers workspace-scoped queries using the token of the logged-in user. For account-level queries (provisioning, billing, account IAM), you need a Databricks service principal with account admin rights and OAuth2 credentials:"}),"\n",(0,s.jsx)(a.pre,{children:(0,s.jsx)(a.code,{className:"language-bash",children:'export DATABRICKS_ACCOUNT_ID="your-account-id"\nexport DATABRICKS_CLIENT_ID="your-client-id"\nexport DATABRICKS_CLIENT_SECRET="your-client-secret"\n'})}),"\n",(0,s.jsx)(a.p,{children:"These are the same variables used by the Databricks CLI and Terraform provider, so if you already have those configured the auth story is identical."}),"\n",(0,s.jsx)(a.h2,{id:"get-started",children:"Get Started"}),"\n",(0,s.jsx)(a.p,{children:"Full provider documentation:"}),"\n",(0,s.jsxs)(a.ul,{children:["\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"https://databricks-workspace-provider.stackql.io/",children:(0,s.jsx)(a.strong,{children:"Databricks Workspace Provider for StackQL"})})}),"\n",(0,s.jsx)(a.li,{children:(0,s.jsx)(a.a,{href:"https://databricks-account-provider.stackql.io/",children:(0,s.jsx)(a.strong,{children:"Databricks Account Provider for StackQL"})})}),"\n"]}),"\n",(0,s.jsxs)(a.p,{children:["Visti ",(0,s.jsx)(a.a,{href:"https://github.com/stackql/stackql",children:(0,s.jsx)(a.strong,{children:"StackQL on GitHub"})}),"."]})]})}function l(e={}){const{wrapper:a}={...(0,n.R)(),...e.components};return a?(0,s.jsx)(a,{...e,children:(0,s.jsx)(c,{...e})}):c(e)}t.d(a,["assets",0,i,"contentTitle",0,void 0,"frontMatter",0,{slug:"stackql-in-databricks-web-terminal",title:"Run StackQL Queries from the Databricks Web Terminal",hide_table_of_contents:!1,authors:["jeffreyaven"],image:"/img/blog/stackql-databricks-provider-featured-image.png",description:"Run StackQL SQL queries against your Databricks workspace directly from the Databricks web terminal.",keywords:["stackql","databricks","sql","databricks workspace"],tags:["stackql","databricks","sql","databricks workspace"]},"toc",0,[{value:"How It Works",id:"how-it-works",level:2},{value:"Example Queries",id:"example-queries",level:2},{value:"Provider Coverage",id:"provider-coverage",level:2},{value:"Get Started",id:"get-started",level:2}]])},28453(e,a,t){t.d(a,{R:()=>i,x:()=>c});var r=t(96540);const s={},n=r.createContext(s);function i(e){const a=r.useContext(n);return r.useMemo(function(){return"function"==typeof e?e(a):{...a,...e}},[a,e])}function c(e){let a;return a=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:i(e.components),r.createElement(n.Provider,{value:a},e.children)}},71618(e){e.exports=JSON.parse('{"permalink":"/blog/stackql-in-databricks-web-terminal","editUrl":"https://github.com/stackql/stackql.io/edit/main/blog/2026-02-21-stackql-in-databricks-web-terminal.md","
1source":"@site/blog/2026-02-21-stackql-in-databricks-web-terminal.md","title":"Run StackQL Queries from the Databricks Web Terminal","description":"Run StackQL SQL queries against your Databricks workspace directly from the Databricks web terminal.","date":"2026-02-21T00:00:00.000Z","tags":[{"inline":true,"label":"stackql","permalink":"/blog/tags/stackql"},{"inline":true,"label":"databricks","permalink":"/blog/tags/databricks"},{"inline":true,"label":"sql","permalink":"/blog/tags/sql"},{"inline":true,"label":"databricks workspace","permalink":"/blog/tags/databricks-workspace"}],"readingTime":1.54,"hasTruncateMarker":false,"authors":[{"name":"Jeffrey Aven","title":"Technologist and Cloud Consultant","url":"https://www.linkedin.com/in/jeffreyaven/","key":"jeffreyaven","page":null}],"frontMatter":{"slug":"stackql-in-databricks-web-terminal","title":"Run StackQL Queries from the Databricks Web Terminal","hide_table_of_contents":false,"authors":["jeffreyaven"],"image":"/img/blog/stackql-databricks-provider-featured-image.png","description":"Run StackQL SQL queries against your Databricks workspace directly from the Databricks web terminal.","keywords":["stackql","databricks","sql","databricks workspace"],"tags":["stackql","databricks","sql","databricks workspace"]},"unlisted":false,"prevItem":{"title":"stackql-deploy 2.0 - Rewritten in Rust","permalink":"/blog/stackql-deploy-2-0-rust-rewrite"},"nextItem":{"title":"New Databricks Providers for StackQL Released","permalink":"/blog/new-databricks-providers-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.