blob: ea540ce8c11a1c6795935485206984a0d17823c4 [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[39],{LcNd:function(e,t,a){"use strict";a.r(t),a.d(t,"_frontmatter",(function(){return b})),a.d(t,"default",(function(){return p}));var o=a("k1TG"),n=a("8o2o"),r=(a("q1tI"),a("7ljp")),s=a("hhGP"),b=(a("qKvR"),{});void 0!==b&&b&&b===Object(b)&&Object.isExtensible(b)&&!b.hasOwnProperty("__filemeta")&&Object.defineProperty(b,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/pages/docs/Connecting to Databases/postgres.mdx"}});var c={_frontmatter:b},l=s.a;function p(e){var t=e.components,a=Object(n.a)(e,["components"]);return Object(r.b)(l,Object(o.a)({},c,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)("h2",{id:"postgres"},"Postgres"),Object(r.b)("p",null,"Note that the Postgres connector library ",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://www.psycopg.org/docs/"}),"psycopg2")," comes out of the\nbox with Superset."),Object(r.b)("p",null,"Postgres sample connection parameters:"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"User Name"),": UserName"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Password"),": DBPassword"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Database Host"),":",Object(r.b)("ul",{parentName:"li"},Object(r.b)("li",{parentName:"ul"},"For Localhost: localhost or 127.0.0.1"),Object(r.b)("li",{parentName:"ul"},"For On Prem: IP address or Host name"),Object(r.b)("li",{parentName:"ul"},"For AWS Endpoint"))),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Database Name"),": Database Name"),Object(r.b)("li",{parentName:"ul"},Object(r.b)("strong",{parentName:"li"},"Port"),": default 5432")),Object(r.b)("p",null,"The connection string looks like:"),Object(r.b)("pre",null,Object(r.b)("code",Object(o.a)({parentName:"pre"},{}),"postgresql://{username}:{password}@{host}:{port}/{database}\n")),Object(r.b)("p",null,"You can require SSL by adding ",Object(r.b)("inlineCode",{parentName:"p"},"?sslmode=require")," at the end:"),Object(r.b)("pre",null,Object(r.b)("code",Object(o.a)({parentName:"pre"},{}),"postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=require\n")),Object(r.b)("p",null,"You can read about the other SSL modes that Postgres supports in\n",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://www.postgresql.org/docs/9.1/libpq-ssl.html"}),"Table 31-1 from this documentation"),"."),Object(r.b)("p",null,"More information about PostgreSQL connection options can be found in the\n",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#module-sqlalchemy.dialects.postgresql.psycopg2"}),"SQLAlchemy docs"),"\nand the\n",Object(r.b)("a",Object(o.a)({parentName:"p"},{href:"https://www.postgresql.org/docs/9.1/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS"}),"PostgreSQL docs"),"."))}void 0!==p&&p&&p===Object(p)&&Object.isExtensible(p)&&!p.hasOwnProperty("__filemeta")&&Object.defineProperty(p,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/pages/docs/Connecting to Databases/postgres.mdx"}}),p.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-pages-docs-connecting-to-databases-postgres-mdx-cb1d74f0b4ac332bd74d.js.map