{"title":"Hex","description":"Connect Hex to Altertable for collaborative analysis with SQL, Python, and R. Access all connected data sources via federated queries.","order":920,"askSuggestions":["What should I enter as the database in Hex?","Why does a Postgres function fail in my Hex query?"],"navigation":true,"body":{"code":"var Component=(()=>{var g=Object.create;var s=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var f=Object.getOwnPropertyNames;var x=Object.getPrototypeOf,m=Object.prototype.hasOwnProperty;var S=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),b=(t,e)=>{for(var o in e)s(t,o,{get:e[o],enumerable:!0})},a=(t,e,o,i)=>{if(e&&typeof e==\"object\"||typeof e==\"function\")for(let r of f(e))!m.call(t,r)&&r!==o&&s(t,r,{get:()=>e[r],enumerable:!(i=p(e,r))||i.enumerable});return t};var y=(t,e,o)=>(o=t!=null?g(x(t)):{},a(e||!t||!t.__esModule?s(o,\"default\",{value:t,enumerable:!0}):o,t)),D=t=>a(s({},\"__esModule\",{value:!0}),t);var d=S((P,l)=>{l.exports=_jsx_runtime});var v={};b(v,{default:()=>u,frontmatter:()=>w});var n=y(d()),w={title:\"Hex\",description:\"Connect Hex to Altertable for collaborative analysis with SQL, Python, and R. Access all connected data sources via federated queries.\",order:920,askSuggestions:[\"What should I enter as the database in Hex?\",\"Why does a Postgres function fail in my Hex query?\"]};function h(t){let e={a:\"a\",code:\"code\",h1:\"h1\",h2:\"h2\",h3:\"h3\",li:\"li\",ol:\"ol\",p:\"p\",strong:\"strong\",ul:\"ul\",...t.components},{DocsPreviewDocument:o,DocsPreviewSection:i,DocsTable:r}=e;return o||c(\"DocsPreviewDocument\",!0),i||c(\"DocsPreviewSection\",!0),r||c(\"DocsTable\",!0),(0,n.jsxs)(o,{anchors:\"hex connection-setup configuration-steps verify-the-connection notes\",children:[(0,n.jsxs)(i,{sectionId:\"hex\",anchors:\"\",ancestors:\"\",index:\"0\",children:[(0,n.jsx)(e.h1,{id:\"hex\",children:\"Hex\"}),`\n`,(0,n.jsxs)(e.p,{children:[(0,n.jsx)(e.a,{href:\"https://hex.tech/\",children:\"Hex\"}),\" is a collaborative data workspace that combines SQL, Python, R, and no-code tools in a single platform. It enables data teams to explore, analyze, and share insights through interactive notebooks and dashboards.\"]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"connection-setup\",anchors:\"\",ancestors:\"\",index:\"1\",children:[(0,n.jsx)(e.h2,{id:\"connection-setup\",children:\"Connection Setup\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Hex connects to Altertable using our \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/clients/postgres\",children:\"Postgres adapter\"}),\", which works with Hex's built-in PostgreSQL database support.\"]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"configuration-steps\",anchors:\"\",ancestors:\"connection-setup\",index:\"2\",children:[(0,n.jsx)(e.h3,{id:\"configuration-steps\",children:\"Configuration Steps\"}),`\n`,(0,n.jsxs)(e.ol,{children:[`\n`,(0,n.jsxs)(e.li,{children:[\"In Hex, navigate to \",(0,n.jsx)(e.strong,{children:\"Data\"}),\" \\u2192 \",(0,n.jsx)(e.strong,{children:\"Warehouse\"}),\" \\u2192 \",(0,n.jsx)(e.strong,{children:\"Add data connection\"})]}),`\n`,(0,n.jsxs)(e.li,{children:[\"Select \",(0,n.jsx)(e.strong,{children:\"Postgres\"}),\" as the connection type\"]}),`\n`,(0,n.jsx)(e.li,{children:\"Configure the connection with the following details:\"}),`\n`]}),`\n`,(0,n.jsx)(r,{columns:[\"Field\",\"Value\"],data:[{Field:\"Display name\",Value:\"`Altertable` (or your preferred name)\"},{Field:\"Host\",Value:\"`postgres.altertable.ai`\"},{Field:\"Port\",Value:\"`443`\"},{Field:\"Database\",Value:\"Your Altertable catalog name\"},{Field:\"Username\",Value:\"Your lakehouse username\"},{Field:\"Password\",Value:\"Your lakehouse password\"},{Field:\"SSL/TLS\",Value:\"\\u2713 **Required**\"}]}),`\n`,(0,n.jsxs)(e.ol,{start:\"4\",children:[`\n`,(0,n.jsxs)(e.li,{children:[\"Click \",(0,n.jsx)(e.strong,{children:\"Save\"}),\" to save the connection\"]}),`\n`]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"verify-the-connection\",anchors:\"\",ancestors:\"\",index:\"3\",children:[(0,n.jsx)(e.h2,{id:\"verify-the-connection\",children:\"Verify the connection\"}),`\n`,(0,n.jsxs)(e.p,{children:[\"Run \",(0,n.jsx)(e.code,{children:\"SELECT 1 AS connected\"}),\" in a Hex SQL cell. Then query a table from your catalog and compare the returned rows with the source. Queries use \",(0,n.jsx)(e.a,{href:\"/docs/lakehouse/sql-engine\",children:\"DuckDB SQL\"}),\", even though the connection uses the Postgres protocol.\"]}),`\n`]}),(0,n.jsxs)(i,{sectionId:\"notes\",anchors:\"\",ancestors:\"\",index:\"4\",children:[(0,n.jsx)(e.h2,{id:\"notes\",children:\"Notes\"}),`\n`,(0,n.jsxs)(e.ul,{children:[`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"SQL Dialect\"}),\": While the connection uses the Postgres protocol, queries are executed using \",(0,n.jsx)(e.strong,{children:\"DuckDB SQL dialect\"}),\". PostgreSQL-specific functions may not be available.\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"SSL/TLS Required\"}),\": Make sure SSL/TLS is enabled in the connection settings\"]}),`\n`,(0,n.jsxs)(e.li,{children:[(0,n.jsx)(e.strong,{children:\"Catalog Name\"}),\": Enter your Altertable catalog name in the \",(0,n.jsx)(e.strong,{children:\"Database\"}),\" field\"]}),`\n`]})]})]})}function u(t={}){let{wrapper:e}=t.components||{};return e?(0,n.jsx)(e,{...t,children:(0,n.jsx)(h,{...t})}):h(t)}function c(t,e){throw new Error(\"Expected \"+(e?\"component\":\"object\")+\" `\"+t+\"` to be defined: you likely forgot to import, pass, or provide it.\")}return D(v);})();\n;return Component;"},"_id":"docs/lakehouse/clients/hex.mdx","_raw":{"sourceFilePath":"docs/lakehouse/clients/hex.mdx","sourceFileName":"hex.mdx","sourceFileDir":"docs/lakehouse/clients","contentType":"mdx","flattenedPath":"docs/lakehouse/clients/hex"},"type":"Docs","path":"/lakehouse/clients/hex","level":3,"parent":"lakehouse/clients"}