Files
superset2/docs/src/pages/docs/Connecting to Databases/postgres.mdx
T
Srini Kadamati bbdb4ee24f docs: multiple small fixes around databases (#14321)
* docs: multiple small fixes around databases

* add link to postgres SSL options
2021-04-28 10:30:28 -04:00

44 lines
1.2 KiB
Plaintext

---
name: Postgres
menu: Connecting to Databases
route: /docs/databases/postgres
index: 21
version: 1
---
## Postgres
Note that the Postgres connector library [psycopg2](https://www.psycopg.org/docs/) comes out of the
box with Superset.
Postgres sample connection parameters:
- **User Name**: UserName
- **Password**: DBPassword
- **Database Host**:
- For Localhost: localhost or 127.0.0.1
- For On Prem: IP address or Host name
- For AWS Endpoint
- **Database Name**: Database Name
- **Port**: default 5432
The connection string looks like:
```
postgresql://{username}:{password}@{host}:{port}/{database}
```
You can require SSL by adding `?sslmode=require` at the end:
```
postgresql://{username}:{password}@{host}:{port}/{database}?sslmode=require
```
You can read about the other SSL modes that Postgres supports in
[Table 31-1 from this documentation](https://www.postgresql.org/docs/9.1/libpq-ssl.html).
More information about PostgreSQL connection options can be found in the
[SQLAlchemy docs](https://docs.sqlalchemy.org/en/13/dialects/postgresql.html#module-sqlalchemy.dialects.postgresql.psycopg2)
and the
[PostgreSQL docs](https://www.postgresql.org/docs/9.1/libpq-connect.html#LIBPQ-PQCONNECTDBPARAMS).