1"use strict";(self.webpackChunkposthog_com=self.webpackChunkposthog_com||[]).push([[1765],{36501:function(e,t,o){o.d(t,{b:function(){return s}});o(63629);const s={name:"PostHog context warehouse",url:"/context-warehouse",children:[{name:"PostHog context warehouse"},{name:"Overview",url:"/context-warehouse"},{name:"Start here",url:"/context-warehouse/use-cases"},{name:"Is PostHog warehouse native?",url:"/context-warehouse/warehouse-native"},{name:"The context gap report",url:"/the-context-gap-report"},{name:"Data tools"},{name:"Managed Warehouse",url:"/context-warehouse/managed-warehouse"},{name:"PostHog AI",url:"/context-warehouse/posthog-ai"},{name:"Data sources & import (ELT)",url:"/context-warehouse/sources"},{name:"CDP",url:"/cdp"},{name:"Data modeling",url:"/context-warehouse/data-modeling"},{name:"SQL editor",url:"/context-warehouse/sql-editor"},{name:"Business intelligence (BI)",url:"/context-warehouse/business-intelligence"},{name:"Reverse ETL & export",url:"/context-warehouse/reverse-etl-export"},{name:"Integrations"},{name:"Integration library",url:"/context-warehouse/integrations-library"}]}},86771:function(e,t,o){o.r(t),o.d(t,{default:function(){return h}});var s=o(53109),n=o(36501),a=o(33721),r=o(8462),i=o(2212),c=o(56380),l=o(52914),u=o(86070);const d=()=>(0,u.jsx)(a.s,{items:n.b.children}),p=[{title:"Direct data access",description:"Query all your data in PostHog, including PostHog-specific tables (events, persons) and synced warehouse sources"},{title:"HogQL support",description:"Uses PostHog's SQL variant with simplified property access (dot notation like properties.$current_url), null handling, and ClickHouse functions"},{title:"Autocomplete",description:"Intelligent code completion for tables, columns, and SQL keywords to speed up query writing"},{title:"Schema browser",description:"View and search the schema of all available sources, PostHog tables, and saved views directly in the editor"},{title:"Save as views",description:"Save queries as views accessible from the data warehouse tab, visible to all project users"},{title:"Draft queries",description:"Save draft queries for later without cluttering the saved views list",comingSoon:!0},{title:"Trino syntax support",description:"Full support for Trino SQL syntax and functions when connected to a managed Trino warehouse",comingSoon:!0},{title:"Add queries to notebooks",description:"Use PostHog notebooks to collect warehouse info, research topics, or just as a scratch pad"},{title:"Write SQL without knowing SQL",description:"Let PostHog AI write SQL for you"},{title:"Simplified syntax",description:"Access properties with dot notation like properties.$browser"},{title:"Smart joins",description:"Automatic joins between events, persons, and groups"},{title:"Product functions",description:"Built-in functions for cohorts, feature flags, and more"},{title:"Time zone handling",description:"Automatic time zone conversion for your project"}];function h(){const e=p.map(e=>({cells:[{content:(0,u.jsx)("span",{className:"font-bold",children:e.title})},{content:e.description,className:"text-sm"},{content:e.comingSoon?(0,u.jsx)("span",{className:"rounded-sm bg-highlight py-0.5 px-1 text-xs font-bold text-red dark:text-yellow",children:"Coming soon"}):"â
",className:"text-xl"}]}));return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(r.Ay,{title:"SQL editor - PostHog context warehouse",description:"Unify and query data from any source and analyze it alongside your product data.",image:"https://res.cloudinary.com/dmukukwp6/image/upload/dw_temp_528efa76a2.png"}),(0,u.jsxs)(s.Ay,{leftSidebar:(0,u.jsx)(d,{}),title:"SQL editor",children:[(0,u.jsx)("p",{children:"PostHog's SQL editor allows you to run ad-hoc queries directly against your data warehouse using PostHog SQL - a SQL dialect optimized for analytics. Analyze and model your product data alongside data from any source, all within PostHog."}),(0,u.jsx)(c.G,{imageLight:"https://res.cloudinary.com/dmukukwp6/image/upload/screenshot_data_warehouse_light_b0cdbebe8f.png",imageDark:"https://res.cloudinary.com/dmukukwp6/image/upload/screenshot_data_warehouse_dark_8f465ecfaa.png",alt:"PostHog SQL editor screenshot",classes:"roun
1ded",zoom:!1}),(0,u.jsx)("h3",{children:"Features"}),(0,u.jsx)(l.A,{columns:[{name:"Feature",width:"minmax(150px, 1fr)",align:"left"},{name:"Description",width:"minmax(300px, 2fr)",align:"left"},{name:"",width:"60px",align:"center"}],rows:e,editable:!1}),(0,u.jsx)("p",{children:(0,u.jsx)(i.A,{to:"/docs/data-warehouse/sql",state:{newWindow:!0},children:"Read the SQL editor docs â"})})]})]})}}}]); 2//# sourceMappingURL=component---src-pages-context-warehouse-sql-editor-tsx-06764ee46f35cb633710.js.map
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.