blob: 30dee5cd214ae929bc104542c7b654d3e36a3f0f [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[35],{LcNd:function(e,t,a){"use strict";a.r(t),a.d(t,"_frontmatter",(function(){return c})),a.d(t,"default",(function(){return l}));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=s.a;function l(e){var t=e.components,a=Object(o.a)(e,["components"]);return Object(r.b)(b,Object(n.a)({},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",{href:"https://www.psycopg.org/docs/",parentName:"p"},"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",{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",{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",{href:"https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#module-sqlalchemy.dialects.postgresql.psycopg2",parentName:"p"},"SQLAlchemy docs"),"\nand the\n",Object(r.b)("a",{href:"https://www.postgresql.org/docs/9.1/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS",parentName:"p"},"PostgreSQL docs"),"."))}void 0!==l&&l&&l===Object(l)&&Object.isExtensible(l)&&!l.hasOwnProperty("__filemeta")&&Object.defineProperty(l,"__filemeta",{configurable:!0,value:{name:"MDXContent",filename:"src/pages/docs/Connecting to Databases/postgres.mdx"}}),l.isMDXComponent=!0}}]);
//# sourceMappingURL=component---src-pages-docs-connecting-to-databases-postgres-mdx-f06cc644ddf7759d8aaf.js.map