PostgreSQL
PostgreSQL connector allows querying PostgreSQL databases.
Config Schema
| Field | Type | Required | Description |
|---|---|---|---|
| type | string | yes | constant: postgres |
| hosts | string[] | yes | List of database hosts |
| database | string | yes | Database name |
| user | string | yes | Username |
| password | string | yes | Password |
| port | integer | yes | TCP port (default 5432) |
| schema | string | no | instead of “public” it could be custom |
| tls_file | string | no | PEM-encoded certificate for TLS |
| enable_tls | boolean | no | Enable TLS/SSL connection |
| conn_string | string | no | DSN-like connection string |
Config example:
type: postgreshosts: - localhostdatabase: mydbuser: postgrespassword: secretport: 5432schema: salestls_file: "" # Optional PEM-encoded certificateenable_tls: false # Enable TLS/SSL connectionOr as alternative with plain DSN:
type: postgresconn_string: postgresql://my_user:my_pass@localhost:5432/mydbDeploy PostgreSQL Sample Databases
- You can deploy sample database using a docker and example of DVD store data DVDStore Sample Database