PostgreSQL Database
Connection:
-
Prerequisites: Obtain the database host, port, and credentials (username and password) with read access to the databases you want to query.
-
Adding the connection: Go to Integrations > PostgreSQL in the Playbooks dashboard. Enter your database connection details. This includes your host, port, username and password.
-
Testing the Integration: Create a playbook that includes a step to run a simple SELECT query against your PostgreSQL database and verify the results are fetched correctly.
Querying:
After adding postgreSQL as a connection, you can do the following:
- Run a query on PostgreSQL.
PostgreSQL limited access
To restrict permissions to the users accessing PostgreSQL instance via Playbooks, we recommend creating a custom role with the minimal permissions to get the relevant data. Here are 3 queries that you can run in your pgSQL query console to create a new account:
Create a new user:
CREATE USER demo_video WITH PASSWORD '%3v8923nv3yn5I';
Give required permissions to the user:
GRANT SELECT ON table_name TO demo_video;
Verify permissions granted:
SELECT *
FROM information_schema.role_table_grants
WHERE grantee = 'demo_video';
Updated 7 months ago