blob: cc0c376eb1a41ef7ecafe11cc37784e3a8eb19db [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{LcNd:function(e,t,a){"use strict";a.r(t),a.d(t,"_frontmatter",(function(){return c})),a.d(t,"default",(function(){return p}));var n=a("k1TG"),o=a("8o2o"),r=(a("q1tI"),a("7ljp")),s=a("hhGP"),c=(a("qKvR"),{});void 0!==c&&c&&c===Object(c)&&Object.isExtensible(c)&&!c.hasOwnProperty("__filemeta")&&Object.defineProperty(c,"__filemeta",{configurable:!0,value:{name:"_frontmatter",filename:"src/pages/docs/Connecting to Databases/postgres.mdx"}});var b={_frontmatter:c},l=s.a;function p(e){var t=e.components,a=Object(o.a)(e,["components"]);return Object(r.b)(l,Object(n.a)({},b,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(n.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(n.a)({parentName:"pre"},{}),"postgresql+psycopg2://{username}:{password}@{host}:{port}/{database}\n")),Object(r.b)("p",null,"Extra parameters:"),Object(r.b)("pre",null,Object(r.b)("code",Object(n.a)({parentName:"pre"},{}),"?sslmode=require\n")),Object(r.b)("p",null,"More information about PostgreSQL connection options can be found in the\n",Object(r.b)("a",Object(n.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(n.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-76f415116962a6843593.js.map